Re: Wrong namespace prefix in generated documents?

2014-08-18 Thread Michael Bishop
Hi Peter and thanks for the explanation. It's been awhile; I've been on vacation for a week. Anyway, I tried what you said about the XPath expressions and it looks like you're correct. I'm using the Java core XPath libraries and the prefix I set in an instance of NamespaceContext is what dictates

Re: Wrong namespace prefix in generated documents?

2014-08-08 Thread Peter Keller
Hi Michael, OK - now this is getting to the heart of the question... On Thu, 2014-08-07 at 16:02 -0400, Michael Bishop wrote: > Hi Peter, > > You're right, I came across that table recently since I've been > working at this problem most of the day. Let me share one more thing > I've discovered.

Re: Wrong namespace prefix in generated documents?

2014-08-07 Thread Michael Bishop
Hi Peter, You're right, I came across that table recently since I've been working at this problem most of the day. Let me share one more thing I've discovered. It appears that XMLBeans has always been ignoring my namespace prefixes. In URL form, it will use the last "token" and in URN form, it wil

Re: Wrong namespace prefix in generated documents?

2014-08-07 Thread Peter Keller
Hi Michael, There is a table in the Javadocs that states which options are used by which methods: see . You have to make the prefix suggestion in the options to a save or xmlText method: they won't have any effe

Re: Wrong namespace prefix in generated documents?

2014-08-07 Thread Michael Bishop
OK, here is a test schema: http://www.w3.org/2001/XMLSchema"; xmlns:aaa="bbb:ccc:ddd:eee:fff:aaa" targetNamespace="bbb:ccc:ddd:eee:fff:aaa" elementFormDefault="qualified">

Re: Wrong namespace prefix in generated documents?

2014-08-07 Thread Michael Bishop
I've got to figure out how to debug it. Currently, it's in a Maven project with the XMLBeans plugin running the schema compilation. The map works when I call save(options) or xmlText(options), but not when the document is created (Factory.newInstance(options)). // Option that sets the namespace m

Re: Wrong namespace prefix in generated documents?

2014-08-04 Thread Cezar Andrei
Michael, That's odd, please check that your namespace URI is exactly the same in both the schema and the map you're setting. Also, make sure the prefix you want is not already used in your document with a different URI. If it's still not working and you're not afraid of debugging, you can tr

Re: Wrong namespace prefix in generated documents?

2014-08-02 Thread Michael Bishop
OK, thanks for the information. Unfortunately, this doesn't seem to fix the problem. I thought I'd tried the steps outlined in the linked blog before, but I did it again, just in case. Here's the full schema definitions: Old: http://www.w3.org/2001/XMLSchema"; *xmlns:xxx="http://..."*

Re: Wrong namespace prefix in generated documents?

2014-08-01 Thread Cezar Andrei
If you don't provide a prefix, XmlBeans will automatically pick a prefix, and it tries to pick one that is part of the URI. Cezar On 07/28/2014 01:27 PM, Michael Bishop wrote: Hello all. I've recently changed the namespace of my schema. Now I'm getting the wrong prefix name and I'm not sure w

RE: Wrong namespace prefix in generated documents?

2014-07-31 Thread Duane Zamrok
aces/ From: Michael Bishop [mailto:bisho...@gmail.com] Sent: Monday, July 28, 2014 2:28 PM To: user@xmlbeans.apache.org Subject: Wrong namespace prefix in generated documents? Hello all. I've recently changed the namespace of my schema. Now I'm getting the wrong prefix name and I'm not

Wrong namespace prefix in generated documents?

2014-07-28 Thread Michael Bishop
Hello all. I've recently changed the namespace of my schema. Now I'm getting the wrong prefix name and I'm not sure why. Old namespace was: xmlns:*xxx*="http://ccc.bbb.aaa"; New namespace is: xmlns:*xxx*="*yyy*:aaa:bbb:ccc" With the old namespace, the prefix for elements was xxx. Now with the