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 how the expression
is evaluated. So two documents:
 and  can both be
successfully queried with "//xxx:root" as long as the NamespaceContext
object maps the "xxx" prefix to the "a" namespace. In short, the
NamespaceContext for the XPath statement takes precedence and the prefixes
in the document are not significant.

Our project produces both a file specification and an application that
helps create specification compliant documents. However, someone could
create their own document outside of the application and use whatever
prefix they wish. So we have to accept different prefixes; a scenario I did
not consider previously.

Our application also exposes APIs and allows users to create plugins, so
they would be able to access the XMLBeans-generated classes directly. We'd
have mismatching prefixes if we used XmlOptions for output that a plugin
developer did not.

Your explanation has helped me understand these issues and when/why
prefixes are/aren't significant and I've been able to write unit tests to
demonstrate the understood behavior.

FWIW, the reason I'm using the Java core libraries for XPath is because I
can't get XMLBeans to do it correctly inside the NetBeans platform.
XMLBeans can't find supporting libraries across module dependencies due to
class path issues; each module has its own class path and XMLBeans only
checks it's own.

Michael




On Fri, Aug 8, 2014 at 6:58 AM, Peter Keller 
wrote:

> 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. 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 will use the first:
> >
> >
> > xmlns:aaa="http://test.example.com/TOKEN";
> > xmlns:bbb="TOKEN:xxx:yyy:zzz"
>
> I use tag (i.e. RFC4151) URI's, and XMLBeans takes the first token, like
> with URN URI's. Obviously, since all such URI's begin with "tag:", it
> can only do this for the first one that it hits. I am lucky, in that I
> don't care :-)
>
> > In other words, the declared (xmlns:...) prefixes above are never
> > honored. In both cases, TOKEN will end up being the prefix. I thought
> > this had worked before because my old namespace was:
> >
> >
> > xmlns:aaa="http://test.example.com/aaa";
> >
> >
> > Changing the trailing "aaa" in the URL will change the prefix in the
> > generated document.
> >
> >
> > So why do I need the same prefix?
> >
> >
> > Our application is transitioning from version X to version X.1.
> > Our customer has requested a namespace change to URN form.
> > We have extensive documentation and screen shots that show the old
> > prefix.
>
> Yes, I can see that this is a nuisance.
>
> > We also have XPath statements scattered throughout our application
> > that reference the old prefix.
>
> Looking at the XPath/selectPath example here:
> <
> http://xmlbeans.apache.org/docs/2.0.0/guide/conSelectingXMLwithXQueryPathXPath.html>
> I don't think that the prefix used in queryExpression needs to be the same
> as in the document, i.e. if you changed the query to this:
>
> > String queryExpression =
> > "declare namespace xq1='
> http://xmlbeans.apache.org/samples/xquery/employees';" +
> > "$this/xq1:employees/xq1:employee/xq1:phone[contains(., '(206)')]";
>
> the query should still work, even though the document has "xq" as the
> prefix. The scope of the prefix declaration here should the query only,
> and it should get mapped to the namespace itself when querying the
> document. I can't remember if I have ever tried this with XMLBeans or
> not, but it works with other XML utilities that I have used. Worth a
> try, maybe?
>
> > It was believed that it would be far less of a hassle to correct the
> > prefix than it would to correct all our documentation and XPath
> > statements.
>
> Hm, the problem is that AFAIK nothing in the XSD standard mandates the
> stability of the prefix: it is the namespace name itself that matters.
> From the XSD point of view, any application that treats the prefix as
> data has fragility built-in.
>
> > In our application, when a user creates a new instance of the
> > document, it uses Factory.newInstance() which results in a document
> > with the wrong namespace.
>
> I assume that you mean "wrong prefix" here? The namespace itself should
> be fine.
>
> > Like a lot of other applications (Word, Excel, etc.), our files reside
> > "in memory" until they are saved. So a new document would carry the
> > wrong prefix u

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. 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 will use the first:
> 
> 
> xmlns:aaa="http://test.example.com/TOKEN";
> xmlns:bbb="TOKEN:xxx:yyy:zzz"

I use tag (i.e. RFC4151) URI's, and XMLBeans takes the first token, like
with URN URI's. Obviously, since all such URI's begin with "tag:", it
can only do this for the first one that it hits. I am lucky, in that I
don't care :-)

> In other words, the declared (xmlns:...) prefixes above are never
> honored. In both cases, TOKEN will end up being the prefix. I thought
> this had worked before because my old namespace was:
> 
> 
> xmlns:aaa="http://test.example.com/aaa";
> 
> 
> Changing the trailing "aaa" in the URL will change the prefix in the
> generated document.
> 
> 
> So why do I need the same prefix?
> 
> 
> Our application is transitioning from version X to version X.1.
> Our customer has requested a namespace change to URN form.
> We have extensive documentation and screen shots that show the old
> prefix.

Yes, I can see that this is a nuisance.

> We also have XPath statements scattered throughout our application
> that reference the old prefix.

Looking at the XPath/selectPath example here:

 I don't think that the prefix used in queryExpression needs to be the same as 
in the document, i.e. if you changed the query to this:

> String queryExpression =
> "declare namespace 
> xq1='http://xmlbeans.apache.org/samples/xquery/employees';" +
> "$this/xq1:employees/xq1:employee/xq1:phone[contains(., '(206)')]";

the query should still work, even though the document has "xq" as the
prefix. The scope of the prefix declaration here should the query only,
and it should get mapped to the namespace itself when querying the
document. I can't remember if I have ever tried this with XMLBeans or
not, but it works with other XML utilities that I have used. Worth a
try, maybe?

> It was believed that it would be far less of a hassle to correct the
> prefix than it would to correct all our documentation and XPath
> statements.

Hm, the problem is that AFAIK nothing in the XSD standard mandates the
stability of the prefix: it is the namespace name itself that matters.
>From the XSD point of view, any application that treats the prefix as
data has fragility built-in.

> In our application, when a user creates a new instance of the
> document, it uses Factory.newInstance() which results in a document
> with the wrong namespace. 

I assume that you mean "wrong prefix" here? The namespace itself should
be fine.

> Like a lot of other applications (Word, Excel, etc.), our files reside
> "in memory" until they are saved. So a new document would carry the
> wrong prefix until it was saved. 

Ah, here is the fallacy, I think. When you call Factory.newInstance(),
the instantiated element doesn't carry a prefix with it as such. As far
as XMLBeans is concerned, the element's QName is
"{TOKEN:xxx:yyy:zzz}test", i.e. uses the full namespace string. The
prefix only makes its appearance when you call "save" or "xmlText", and
then you can always suggest the prefix that should be used. If you
added a suitable XmlOptions argument to every call to xmlText in your
application, would that achieve what you are after? Or are you using
XmlCursor or some other lower-level trickery to get at the xmlns
declarations?

> Even after it was saved, it would have to be reloaded by the
> application to have the correct prefix "in-memory."

Yes, if replacing every xmlText() call with xmlText(xmlOptions) isn't
feasible, I can't see any way other than save/parse to achieve this.
Using streams or Reader/Writer may be more efficient than writing to a
file and reading it back.

> Our application also has the ability to digitally sign documents.
> Signing one prefix, then saving another causes the signature to break.

I hadn't thought of this scenario, but yes, this is an example of using
the prefix as data.

> So the options are starting to look like this:
> 
> 1. Figure out why XMLBeans doesn't honor my xmlns:... declarations.
> 
> 2. Change the namespace URN to start with the desired prefix.
> Obviously, this is a workaround.
> 
> 3. Use the new prefix and change everything else to suit.
> 
> 
> So I guess my first question (in this email at least) is does XMLBeans
> ever try to honor xmlns prefix declarations?

As I said, in my understanding there is nothing to honour before
save/xmlText is called. Prefixes only materialise when the element is
serialised. Otherwise, they are only known about externally such as in
declarations i

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 will use the
first:

xmlns:aaa="http://test.example.com/TOKEN";
xmlns:bbb="TOKEN:xxx:yyy:zzz"

In other words, the declared (xmlns:...) prefixes above are never honored.
In both cases, TOKEN will end up being the prefix. I thought this had
worked before because my old namespace was:

xmlns:aaa="http://test.example.com/aaa";

Changing the trailing "aaa" in the URL will change the prefix in the
generated document.

So why do I need the same prefix?

Our application is transitioning from version X to version X.1.
Our customer has requested a namespace change to URN form.
We have extensive documentation and screen shots that show the old prefix.
We also have XPath statements scattered throughout our application that
reference the old prefix.
It was believed that it would be far less of a hassle to correct the prefix
than it would to correct all our documentation and XPath statements.

In our application, when a user creates a new instance of the document, it
uses Factory.newInstance() which results in a document with the wrong
namespace. Like a lot of other applications (Word, Excel, etc.), our files
reside "in memory" until they are saved. So a new document would carry the
wrong prefix until it was saved. Even after it was saved, it would have to
be reloaded by the application to have the correct prefix "in-memory." Our
application also has the ability to digitally sign documents. Signing one
prefix, then saving another causes the signature to break.

So the options are starting to look like this:
1. Figure out why XMLBeans doesn't honor my xmlns:... declarations.
2. Change the namespace URN to start with the desired prefix. Obviously,
this is a workaround.
3. Use the new prefix and change everything else to suit.

So I guess my first question (in this email at least) is does XMLBeans ever
try to honor xmlns prefix declarations? If so, what's wrong with the schema
I posted that causes this not to happen? Can anyone get the schema I
previously posted to use the aaa prefix as declared?

Michael


On Thu, Aug 7, 2014 at 3:32 PM, Peter Keller 
wrote:

> Hi Michael,
>
> There is a table in the Javadocs that states which options are used by
> which methods: see
> <
> http://xmlbeans.apache.org/docs/2.6.0/reference/org/apache/xmlbeans/XmlOptions.html>.
> You have to make the prefix suggestion in the options to a save or xmlText
> method: they won't have any effect in a newInstance method. What you have
> observed here is expected and documented.
>
> Maybe I'm missing something, but I can't think of any scenario where
> this is going to cause any problems. If you really need the prefix to be
> a particular string before you get to the stage of writing or saving the
> XML document, perhaps you could explain why? Then we might be able to
> think of other ways to solve the issue.
>
> Regards,
> Peter.
>
> On Thu, 2014-08-07 at 13:53 -0400, Michael Bishop wrote:
> > 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">
> >
> > 
> >
> > 
> > 
> >  > maxOccurs="1"/>
> >  > maxOccurs="1"/>
> >  > maxOccurs="1"/>
> >  > maxOccurs="1"/>
> >  > minOccurs="1" maxOccurs="1"/>
> >  > maxOccurs="1"/>
> >  > minOccurs="1" maxOccurs="1"/>
> >  > minOccurs="0" maxOccurs="1"/>
> > 
> > 
> > 
> > 
> >
> >
> > TestDocument doc = TestDocument.Factory.newInstance();
> > doc.addNewTest();
> >
> > // Wrong, default Factory output.
> > doc.xmlText(): 
> >
> >
> > // Correct output that I can't get from just the Factory.newInstance()
> > method.
> > doc.xmlText(options): 
> >
> >
> > Does anyone else get the same compilation results? Is there a reason
> > the new instances won't default to xmlns:aaa as declared? I'd be hard
> > pressed to believe that something in XMLBeans is causing this. It's
> > probably something I'm doing. Does the XSDConfig file have any
> > influence that I'm missing?
> >
> >
> > Michael Bishop
> >
> >
> >
> > On Thu, Aug 7, 2014 at 1:22 PM, Michael Bishop 
> > wrote:
> > 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 map.
> >
> > XmlOptions options = ...;
> >
> >
> > 

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 effect in a newInstance method. What you have 
observed here is expected and documented.

Maybe I'm missing something, but I can't think of any scenario where
this is going to cause any problems. If you really need the prefix to be
a particular string before you get to the stage of writing or saving the
XML document, perhaps you could explain why? Then we might be able to
think of other ways to solve the issue.

Regards,
Peter.

On Thu, 2014-08-07 at 13:53 -0400, Michael Bishop wrote:
> 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">
> 
> 
> 
> 
> 
>  maxOccurs="1"/>
>  maxOccurs="1"/>
>  maxOccurs="1"/>
>  maxOccurs="1"/>
>  minOccurs="1" maxOccurs="1"/>
>  maxOccurs="1"/>
>  minOccurs="1" maxOccurs="1"/>
>  minOccurs="0" maxOccurs="1"/>   
> 
> 
> 
> 
> 
> 
> TestDocument doc = TestDocument.Factory.newInstance();
> doc.addNewTest();
> 
> // Wrong, default Factory output.
> doc.xmlText(): 
> 
> 
> // Correct output that I can't get from just the Factory.newInstance()
> method.
> doc.xmlText(options): 
> 
> 
> Does anyone else get the same compilation results? Is there a reason
> the new instances won't default to xmlns:aaa as declared? I'd be hard
> pressed to believe that something in XMLBeans is causing this. It's
> probably something I'm doing. Does the XSDConfig file have any
> influence that I'm missing?
> 
> 
> Michael Bishop
> 
> 
> 
> On Thu, Aug 7, 2014 at 1:22 PM, Michael Bishop 
> wrote:
> 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 map.
> 
> XmlOptions options = ...;
> 
> 
> MyDoc doc = MyDoc.Factory.newInstance(options);
> 
> 
> System.out.println("Wrong prefix: " + doc.xmlText());
> 
> System.out.println("Right prefix: " + doc.xmlText(options));
> 
> 
> The schema is spread out across multiple files. I'm going to
> try to create a small test case to see if I can't reproduce
> this.
> 
> 
> 
> On Mon, Aug 4, 2014 at 4:31 PM, Cezar Andrei
>  wrote:
> 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 trace the ensureMapping method in
> Saver.java:757 .
> 
> http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Saver.java?view=markup
> 
> Cezar
> 
> 
> On 08/02/2014 02:04 PM, Michael Bishop wrote:
> 
> 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:
>  xmlns:xs="http://www.w3.org/2001/XMLSchema";
> 
> *xmlns:xxx="http://..."*
> 
>targetNamespace="http://...";
>elementFormDefault="qualified">
> 
> New:
>  xmlns:xs="http://www.w3.org/2001/XMLSchema";
> 
> *xmlns:xxx="yyy:aaa:bbb..."*
> 
>targetNamespace="yyy:..."
>  

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">


















TestDocument doc = TestDocument.Factory.newInstance();
doc.addNewTest();

// Wrong, default Factory output.
doc.xmlText(): 

// Correct output that I can't get from just the Factory.newInstance()
method.
doc.xmlText(options): 

Does anyone else get the same compilation results? Is there a reason the
new instances won't default to xmlns:aaa as declared? I'd be hard pressed
to believe that something in XMLBeans is causing this. It's probably
something I'm doing. Does the XSDConfig file have any influence that I'm
missing?

Michael Bishop


On Thu, Aug 7, 2014 at 1:22 PM, Michael Bishop  wrote:

> 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 map.
> XmlOptions options = ...;
>
> MyDoc doc = MyDoc.Factory.newInstance(options);
>
> System.out.println("Wrong prefix: " + doc.xmlText());
> System.out.println("Right prefix: " + doc.xmlText(options));
>
> The schema is spread out across multiple files. I'm going to try to create
> a small test case to see if I can't reproduce this.
>
>
> On Mon, Aug 4, 2014 at 4:31 PM, Cezar Andrei 
> wrote:
>
>> 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
>> trace the ensureMapping method in Saver.java:757 .
>> http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/
>> apache/xmlbeans/impl/store/Saver.java?view=markup
>>
>> Cezar
>>
>>
>> On 08/02/2014 02:04 PM, Michael Bishop wrote:
>>
>>> 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://..."*
>>>
>>>targetNamespace="http://...";
>>>elementFormDefault="qualified">
>>>
>>> New:
>>> http://www.w3.org/2001/XMLSchema";
>>> *xmlns:xxx="yyy:aaa:bbb..."*
>>>
>>>targetNamespace="yyy:..."
>>>elementFormDefault="qualified">
>>>
>>> As you can see, in both schemas, I'm declaring a namespace of *xxx*, but
>>> it's only honored in the old schema. The only thing that's changed between
>>> schemas is the namespace. I had a request from our customer to change it.
>>> However, a call to:
>>>
>>>
>>> MyGeneratedClass.Factory.newInstance() results in a document that looks
>>> like this:
>>>
>>> 
>>>
>>> Applying a namespace map to an XmlOptions object doesn't seem to have
>>> any effect. I've tried it with the call to 
>>> MyGeneratedClass.Factory.newInstance()
>>> and a call to MyGeneratedInstance.xmlText():
>>>
>>> XmlOptions options = new XmlOptions();
>>> Map nsMap = new HashMap<>();
>>> nsMap.put("yyy:aaa:bbb", "xxx");
>>> options.setSaveSuggestedPrefixes(nsMap);
>>>
>>> // No change to output.
>>> MyGeneratedClass.Factory.newInstance(options);
>>> MyGeneratedInstance.xmlText(options);
>>>
>>> I guess I have two questions:
>>>
>>> 1. Why is the prefix declaration in my schema being ignored? *xmlns:xxx*
>>> has never changed. It's only the value of the namespace that has changed.
>>>
>>> 2. I find it odd that Map has no effect either. Is there anything else I
>>> should be looking into? I'm not sure if my schema is somehow "wrong" or I
>>> have a setting in XMLBeans misconfigured. It's becoming more than just an
>>> annoying problem. XPath statements are now broken since they employ the
>>> *xxx* prefix. I'm not sure where to start tracking down the issue. Both the
>>> guidance and the docs seem straightforward to me, yet I can't get it to
>>> work properly.
>>>
>>>
>>> Any guidance is appreciated. I'm on XMLBeans 2.5.0. If there's anything
>>> more I can provide, I can do so.
>>>
>>> Michael Bishop
>>>
>>>
>>> On Fri, Aug 1, 2014 at 12:10 PM, Cezar Andrei >> > wrote:
>>>
>>> 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 why.
>>

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 map.
XmlOptions options = ...;

MyDoc doc = MyDoc.Factory.newInstance(options);

System.out.println("Wrong prefix: " + doc.xmlText());
System.out.println("Right prefix: " + doc.xmlText(options));

The schema is spread out across multiple files. I'm going to try to create
a small test case to see if I can't reproduce this.


On Mon, Aug 4, 2014 at 4:31 PM, Cezar Andrei 
wrote:

> 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
> trace the ensureMapping method in Saver.java:757 .
> http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/
> apache/xmlbeans/impl/store/Saver.java?view=markup
>
> Cezar
>
>
> On 08/02/2014 02:04 PM, Michael Bishop wrote:
>
>> 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://..."*
>>
>>targetNamespace="http://...";
>>elementFormDefault="qualified">
>>
>> New:
>> http://www.w3.org/2001/XMLSchema";
>> *xmlns:xxx="yyy:aaa:bbb..."*
>>
>>targetNamespace="yyy:..."
>>elementFormDefault="qualified">
>>
>> As you can see, in both schemas, I'm declaring a namespace of *xxx*, but
>> it's only honored in the old schema. The only thing that's changed between
>> schemas is the namespace. I had a request from our customer to change it.
>> However, a call to:
>>
>>
>> MyGeneratedClass.Factory.newInstance() results in a document that looks
>> like this:
>>
>> 
>>
>> Applying a namespace map to an XmlOptions object doesn't seem to have any
>> effect. I've tried it with the call to MyGeneratedClass.Factory.newInstance()
>> and a call to MyGeneratedInstance.xmlText():
>>
>> XmlOptions options = new XmlOptions();
>> Map nsMap = new HashMap<>();
>> nsMap.put("yyy:aaa:bbb", "xxx");
>> options.setSaveSuggestedPrefixes(nsMap);
>>
>> // No change to output.
>> MyGeneratedClass.Factory.newInstance(options);
>> MyGeneratedInstance.xmlText(options);
>>
>> I guess I have two questions:
>>
>> 1. Why is the prefix declaration in my schema being ignored? *xmlns:xxx*
>> has never changed. It's only the value of the namespace that has changed.
>>
>> 2. I find it odd that Map has no effect either. Is there anything else I
>> should be looking into? I'm not sure if my schema is somehow "wrong" or I
>> have a setting in XMLBeans misconfigured. It's becoming more than just an
>> annoying problem. XPath statements are now broken since they employ the
>> *xxx* prefix. I'm not sure where to start tracking down the issue. Both the
>> guidance and the docs seem straightforward to me, yet I can't get it to
>> work properly.
>>
>>
>> Any guidance is appreciated. I'm on XMLBeans 2.5.0. If there's anything
>> more I can provide, I can do so.
>>
>> Michael Bishop
>>
>>
>> On Fri, Aug 1, 2014 at 12:10 PM, Cezar Andrei > > wrote:
>>
>> 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 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 new namespace, the prefix fpr elements is *yyy*. It
>> seems switching from URL form to URI form has caused the
>> processor to start using the first part of the URI as the
>> prefix? This happens when I call the static
>> Factory.newInstance() on generated classes. Older documents
>> with the correct prefix still parse properly.
>>
>> It's not a big deal since the namespace is intact and things
>> work as they should, but I can't figure out why this is
>> happening. I don't declare xmlns:*yyy* anywhere in the schema
>> or xsdconfig files.
>>
>> Michael Bishop
>>
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>> 

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 
trace the ensureMapping method in Saver.java:757 .

http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Saver.java?view=markup

Cezar

On 08/02/2014 02:04 PM, Michael Bishop wrote:
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://..."*
   targetNamespace="http://...";
   elementFormDefault="qualified">

New:
http://www.w3.org/2001/XMLSchema";
*xmlns:xxx="yyy:aaa:bbb..."*
   targetNamespace="yyy:..."
   elementFormDefault="qualified">

As you can see, in both schemas, I'm declaring a namespace of *xxx*, 
but it's only honored in the old schema. The only thing that's changed 
between schemas is the namespace. I had a request from our customer to 
change it. However, a call to:


MyGeneratedClass.Factory.newInstance() results in a document that 
looks like this:




Applying a namespace map to an XmlOptions object doesn't seem to have 
any effect. I've tried it with the call to 
MyGeneratedClass.Factory.newInstance() and a call to 
MyGeneratedInstance.xmlText():


XmlOptions options = new XmlOptions();
Map nsMap = new HashMap<>();
nsMap.put("yyy:aaa:bbb", "xxx");
options.setSaveSuggestedPrefixes(nsMap);

// No change to output.
MyGeneratedClass.Factory.newInstance(options);
MyGeneratedInstance.xmlText(options);

I guess I have two questions:

1. Why is the prefix declaration in my schema being ignored? 
*xmlns:xxx* has never changed. It's only the value of the namespace 
that has changed.


2. I find it odd that Map has no effect either. Is there anything else 
I should be looking into? I'm not sure if my schema is somehow "wrong" 
or I have a setting in XMLBeans misconfigured. It's becoming more than 
just an annoying problem. XPath statements are now broken since they 
employ the *xxx* prefix. I'm not sure where to start tracking down the 
issue. Both the guidance and the docs seem straightforward to me, yet 
I can't get it to work properly.


Any guidance is appreciated. I'm on XMLBeans 2.5.0. If there's 
anything more I can provide, I can do so.


Michael Bishop


On Fri, Aug 1, 2014 at 12:10 PM, Cezar Andrei > wrote:


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 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 new namespace, the prefix fpr elements is *yyy*. It
seems switching from URL form to URI form has caused the
processor to start using the first part of the URI as the
prefix? This happens when I call the static
Factory.newInstance() on generated classes. Older documents
with the correct prefix still parse properly.

It's not a big deal since the namespace is intact and things
work as they should, but I can't figure out why this is
happening. I don't declare xmlns:*yyy* anywhere in the schema
or xsdconfig files.

Michael Bishop



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org

For additional commands, e-mail: user-h...@xmlbeans.apache.org






-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



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://..."*
   targetNamespace="http://...";
   elementFormDefault="qualified">

New:
http://www.w3.org/2001/XMLSchema";
   *xmlns:xxx="yyy:aaa:bbb..."*
   targetNamespace="yyy:..."
   elementFormDefault="qualified">

As you can see, in both schemas, I'm declaring a namespace of *xxx*, but
it's only honored in the old schema. The only thing that's changed between
schemas is the namespace. I had a request from our customer to change it.
However, a call to:

MyGeneratedClass.Factory.newInstance() results in a document that looks
like this:



Applying a namespace map to an XmlOptions object doesn't seem to have any
effect. I've tried it with the call to
MyGeneratedClass.Factory.newInstance() and a call to
MyGeneratedInstance.xmlText():

XmlOptions options = new XmlOptions();
Map nsMap = new HashMap<>();
nsMap.put("yyy:aaa:bbb", "xxx");
options.setSaveSuggestedPrefixes(nsMap);

// No change to output.
MyGeneratedClass.Factory.newInstance(options);
MyGeneratedInstance.xmlText(options);

I guess I have two questions:

1. Why is the prefix declaration in my schema being ignored? *xmlns:xxx*
has never changed. It's only the value of the namespace that has changed.

2. I find it odd that Map has no effect either. Is there anything else I
should be looking into? I'm not sure if my schema is somehow "wrong" or I
have a setting in XMLBeans misconfigured. It's becoming more than just an
annoying problem. XPath statements are now broken since they employ the
*xxx* prefix. I'm not sure where to start tracking down the issue. Both the
guidance and the docs seem straightforward to me, yet I can't get it to
work properly.

Any guidance is appreciated. I'm on XMLBeans 2.5.0. If there's anything
more I can provide, I can do so.

Michael Bishop


On Fri, Aug 1, 2014 at 12:10 PM, Cezar Andrei 
wrote:

> 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 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 new
>> namespace, the prefix fpr elements is *yyy*. It seems switching from URL
>> form to URI form has caused the processor to start using the first part of
>> the URI as the prefix? This happens when I call the static
>> Factory.newInstance() on generated classes. Older documents with the
>> correct prefix still parse properly.
>>
>> It's not a big deal since the namespace is intact and things work as they
>> should, but I can't figure out why this is happening. I don't declare
>> xmlns:*yyy* anywhere in the schema or xsdconfig files.
>>
>> Michael Bishop
>>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>


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 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 
new namespace, the prefix fpr elements is *yyy*. It seems switching 
from URL form to URI form has caused the processor to start using the 
first part of the URI as the prefix? This happens when I call the 
static Factory.newInstance() on generated classes. Older documents 
with the correct prefix still parse properly.


It's not a big deal since the namespace is intact and things work as 
they should, but I can't figure out why this is happening. I don't 
declare xmlns:*yyy* anywhere in the schema or xsdconfig files.


Michael Bishop



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



RE: Wrong namespace prefix in generated documents?

2014-07-31 Thread Duane Zamrok
The short answer is to use XmlOptions to configure the prefixes used in your 
XmlBeans output. Something like the following will cause it to use xxx for 
yyy:aaa:bbb:ccc. XmlBeans output is NOT tied to the prefixes you declare in 
your schema.

HashMap ns = new HashMap();
ns.put("yyy:aaa:bbb:ccc", "xxx");
// ns.put("http://ccc.bbb.aaa";, "orig");
// ns.put("urn:some.other.namespace", "pfxUwnt");
xmlOptions.setSaveSuggestedPrefixes(ns);

A longer answer is provided here 
http://codebrane.com/blog/2005/12/12/xmlbeans-and-namespaces/

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 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 new 
namespace, the prefix fpr elements is yyy. It seems switching from URL form to 
URI form has caused the processor to start using the first part of the URI as 
the prefix? This happens when I call the static Factory.newInstance() on 
generated classes. Older documents with the correct prefix still parse properly.
It's not a big deal since the namespace is intact and things work as they 
should, but I can't figure out why this is happening. I don't declare xmlns:yyy 
anywhere in the schema or xsdconfig files.
Michael Bishop


Re: Validation issues

2014-07-21 Thread Peter Keller
On Mon, 2014-07-21 at 05:50 -0700, jgagnon wrote:
> Sorry for the confusion.  My application does not deal with the Java
> implementation of any of the schema types.  It uses the information from the
> schema to determine test cases to generate and then uses the XMLBeans API
> (mainly XmlCursor) to create an XML instance.  Once the instance is complete
> I then validate it via the XmlObject.validate(XmlOptions options) method and
> save the object to a file.
>
> One of the first things I do is to compile the schema XSD (with
> XmlBeans.compileXsd(...)) to get a SchemaTypeSystem object. This provides me
> with everything else I need.
> 
> The schema defines several abstract types, each of which has some number of
> other schema types that extend them (i.e.  base="myPrefix:AbstractBaseType">).  As the program works its way through a
> document type to identify and generate test cases, when it encounters an
> element defined by an abstract type, it scans the schema for any types that
> extend that type.  It then generates the element with the type reference
> attribute to point to the specific concrete schema type.

OK - by "generates .. with the type reference..." do you mean that you
are doing something like this?

  xmlCursor.insertAttributeWithValue("type",
  "http://www.w3.org/2001/XMLSchema-instance";,
  "myPrefix:ConcreteType");

If so, it seems to me that at this point the XMLBeans API hasn't
associated "myPrefix:" with your namespace, hence the validation
failure. The cursor methods can only work with attribute values of type
java.lang.String, i.e. as far as I can see the XmlCursor API doesn't
provide a bridge between attribute _values_ and anything related to the
schema. What you actually want to insert as the attribute value is an
instance of javax.xml.namespace.QName or org.apache.xmlbeans.XmlQName
rather than a string, but it doesn't seem that there is a way of doing
that.

When the document is read back in by the command-line validator, it
interprets the value of the xsi:type attribute as a QName, so it
validates OK.

> I also generate
> the child content that is defined by the specific concrete type.
> 
> The generation logic inserts the namespace(s) as attributes of the root
> element.  I insert the "default" namespace (i.e.
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";) and the
> schema-specific namespace (e.g. xmlns:myPrefix="my-schema-site") ["myPrefix"
> and "my-schema-site" are not the actual values used, of course].

I work with documents that are very similar to yours without any
problems. There are two differences with what you are doing:

(i) I don't use XmlCursor, but rather the type-specific methods provided
by the XMLBeans-generated API, something like this:

  Instantiate an element of the correct type like this:

myConcreteType = ConcreteType.Factory.newInstance();

   then populate it and insert it into the XML instance something like
this:

  myContainingElement.setSomeElement(i, myConcreteType);

I don't set the type reference at all, it is just taken care of
automatically by the XMLBeans-generated API.

If this is not practical for you, then perhaps saving and re-parsing the
XML instance before validating would be an acceptable workaround?

(ii) the xmlns:xsi and xmlns:myprefix attributes end up in the element
that is the immediate container of the explicitly typed element rather
than the root element:

 
   
  ...
  
 

or sometimes on the typed element itself. This is a minor annoyance, and
in my hands XmlObject.setSaveAggressiveNamespaces() has no effect when
the document is saved, but it really shouldn't make any difference to
the validation.

> Regarding your comment on the schema version that is used, what can I do
> about that?  

A version 1.0 schema is still valid under the 1.1 standard: I mentioned
it only in order to be clear about which standards document I was using
to look up your error message (the clause numbers are different in the
two standards). As far as I know, if you use XMLBeans, you are using XML
Schema 1.0. Only you can decide whether that is a problem for you (it
isn't for me, FWIW). The introduction to the XML Schema 1.1 document may
be a good starting point:

<http://www.w3.org/TR/xmlschema11-1/#intro1.1>

> I insert the "standard" XML heading into the file before
> validating and saving.  E.g.   Does
> the version number here indicate the schema version number?

No, this is the version of the XML standard that is used, not of XML
Schema. Once again, only you can decide whether you have a need for XML
1.1, or if 1.0 is OK for you. As with XML Schema, there is a preamble to
the newer standard that says something about what issues it is
addressing:

<http://www.w3

Re: Validation issues

2014-07-21 Thread jgagnon
Sorry for the confusion.  My application does not deal with the Java
implementation of any of the schema types.  It uses the information from the
schema to determine test cases to generate and then uses the XMLBeans API
(mainly XmlCursor) to create an XML instance.  Once the instance is complete
I then validate it via the XmlObject.validate(XmlOptions options) method and
save the object to a file.

One of the first things I do is to compile the schema XSD (with
XmlBeans.compileXsd(...)) to get a SchemaTypeSystem object. This provides me
with everything else I need.

The schema defines several abstract types, each of which has some number of
other schema types that extend them (i.e. ).  As the program works its way through a
document type to identify and generate test cases, when it encounters an
element defined by an abstract type, it scans the schema for any types that
extend that type.  It then generates the element with the type reference
attribute to point to the specific concrete schema type.  I also generate
the child content that is defined by the specific concrete type.

The generation logic inserts the namespace(s) as attributes of the root
element.  I insert the "default" namespace (i.e.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";) and the
schema-specific namespace (e.g. xmlns:myPrefix="my-schema-site") ["myPrefix"
and "my-schema-site" are not the actual values used, of course].

As I mentioned, if I validate this using the XMLBeans command line
validator, there is no complaint, but when I used the API validator, I get
the error shown.

Regarding your comment on the schema version that is used, what can I do
about that?  I insert the "standard" XML heading into the file before
validating and saving.  E.g.   Does
the version number here indicate the schema version number?



--
View this message in context: 
http://xmlbeans.996285.n3.nabble.com/Validation-issues-tp7520p7523.html
Sent from the XMLBeans User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Validation issues

2014-07-21 Thread Peter Keller
Dear Joseph,

On Wed, 2014-07-16 at 10:15 -0700, jgagnon wrote:
> I have written an application that generates XML files that represent test
> cases for a collection of types defined by an XML schema.  Some of these
> types contain elements that are abstract.  The logic locates all concrete
> implementers of the abstract type and when an instance is generated,
> processes one of the concrete types in place of the abstract type.
> 
> It's my understanding that the element must have a type reference attribute
> that indicates the concrete type name.  So, as an example:
> 
> ...
>   
> ... content ...
>   
> ...
> 
> The schema defines the SomeElement field as being defined by an abstract
> type.  ConcreteType is one of many possible concrete implementers of that
> abstract type.
> 
> To take this a little further, a namespace entry is made in the document
> that defines a prefix for the schema types.  So, in the root element there
> would be entry like:
> 
> http://www.w3.org/2001/XMLSchema-instance";
> xmlns:myPrefix="http://my-schema-site"/>
> 
> The prefix is applied to all elements that are defined by the schema.  E.g.
> .  I would also assume that the prefix needs to be
> used in the concrete type reference. So, what I have above now becomes:
> 
> ...
>   
> ... content ...
>   
> ...
> 
> My application does all of this.
> 
> I have also added the option to validate the instance once it's been
> generated.  *Here is where the problem enters the story.*  For some reason,
> it fails validation with the complaint:
> 
> error: cvc-elt.4.2: Invalid xsi:type qname: 'myPrefix:ConcreteType' in
> element SomeElement@my-schema-site

IIRC XMLBeans implements XMLSchema 1.0 rather than 1.1, so this error
refers to clause 4.2 of this validation rule:



It looks as if the XML schema definition of myPrefix:ConcreteType is not
found or not accessible. Earlier you wrote:

> The logic locates all concrete implementers of the abstract type

This may be the problem: if by "concrete implementers" you mean types
defined in Java that simply implement/extend XMLBeans-generated types,
your implementing types have no presence within the schema type system
that XMLBeans generates. You have not stated explicitly whether or not
your concrete types are defined in XML schemata or not. If not, there is
no way that XMLBeans can know about them. If this is what you are doing,
you need to generate additional XML schemata that define your concrete
types (overriding the abstract types that are defined in your existing
XML schema by either restriction or extension). Compile these schemata
and the XMLBeans-generated API should allow you to work with the
concrete types, including instantiating them automatically and correctly
from parsed XML. On output, the xsi:type elements will also be written
automatically by the XMLBeans-generated API without you having to worry
about them.

Alternatively, you could generate your own implementations of

 and 
.
 This seems to me to be a much harder approach, although it may be worthwhile 
if you absolutely have to map existing Java types to XML Schema types.

> Oddly, if I validate the instance externally using XMLBeans validate utility
> (.../xmlbeans-2.6.0/bin/validate), there is no complaint.

Did you do 'validate -strict'?

> Am I doing something wrong?

Without knowing more about what you are doing, it is hard to say. FWIW,
I do something very like this (defining all my concrete types in XML
schemata) and I don't have any validation problems.

Hope that this helps,
Peter.

-- 
Peter Keller Tel.: +44 (0)1223 353033
Global Phasing Ltd., Fax.: +44 (0)1223 366889
Sheraton House,
Castle Park,
Cambridge CB3 0AX
United Kingdom



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Validation issues

2014-07-20 Thread Michael Pigott
Hi,
   Perhaps you are using the wrong prefix for the "type" element?  In my
(valid) XML Schema, I do not define a prefix for the type attribute, and
instead have the default namespace as http://www.w3.org/2001/XMLSchema.
 Perhaps that's the difference?
   Eclipse also seems to come bundled with an XML Schema validator.  That
gave me a lot of (painfully cryptic, but correct) error messages when I
tried to define my own schema.

Good luck!
Mike


On Wed, Jul 16, 2014 at 1:15 PM, jgagnon  wrote:

> I have written an application that generates XML files that represent test
> cases for a collection of types defined by an XML schema.  Some of these
> types contain elements that are abstract.  The logic locates all concrete
> implementers of the abstract type and when an instance is generated,
> processes one of the concrete types in place of the abstract type.
>
> It's my understanding that the element must have a type reference attribute
> that indicates the concrete type name.  So, as an example:
>
> ...
>   
> ... content ...
>   
> ...
>
> The schema defines the SomeElement field as being defined by an abstract
> type.  ConcreteType is one of many possible concrete implementers of that
> abstract type.
>
> To take this a little further, a namespace entry is made in the document
> that defines a prefix for the schema types.  So, in the root element there
> would be entry like:
>
> http://www.w3.org/2001/XMLSchema-instance";
> xmlns:myPrefix="http://my-schema-site"/>
>
> The prefix is applied to all elements that are defined by the schema.  E.g.
> .  I would also assume that the prefix needs to be
> used in the concrete type reference. So, what I have above now becomes:
>
> ...
>   
> ... content ...
>   
> ...
>
> My application does all of this.
>
> I have also added the option to validate the instance once it's been
> generated.  *Here is where the problem enters the story.*  For some reason,
> it fails validation with the complaint:
>
> error: cvc-elt.4.2: Invalid xsi:type qname: 'myPrefix:ConcreteType' in
> element SomeElement@my-schema-site
>
> Oddly, if I validate the instance externally using XMLBeans validate
> utility
> (.../xmlbeans-2.6.0/bin/validate), there is no complaint.
>
> Am I doing something wrong?
>
>
>
>
> --
> View this message in context:
> http://xmlbeans.996285.n3.nabble.com/Validation-issues-tp7520.html
> Sent from the XMLBeans User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>


Re: Namespaces

2014-07-16 Thread Friessen, Michelle
Using an empty string for the prefix in insertNamespace results in nothing
be printed out for that namespace.

Any other suggestions?

Thanks.

*Michelle Friessen*
Systems Product Support Analyst
Assessment & Instruction
Pearson
(319) 354-9200 x214687


On Wed, Jul 16, 2014 at 7:04 AM, Gagnon, Joseph - 0558 - MITLL <
joseph.gag...@ll.mit.edu> wrote:

> I was able to achieve a prefix-less namespace attribute by passing an
> empty string for the prefix argument.
>
>
>
> E.g.  cursor.insertNamespace("", namespaceUri);
>
>
>
> *From:* Friessen, Michelle [mailto:michelle.fries...@pearson.com]
> *Sent:* Tuesday, July 15, 2014 4:38 PM
> *To:* user@xmlbeans.apache.org
> *Subject:* Namespaces
>
>
>
> We have 3 namespaces that need to be added when generating XML:
>
>
>
> xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1";
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>
> xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1
> http://www.imsglobal.org/question/qtiv2p1pd2/xsd/imsqti_v2p1.xsd";
>
>
>
> Using XmlCursor, we were able to get the last 2 added using:
>
>
>
> cursor.insertAttributeWithValue("schemaLocation", "
> http://www.w3.org/2001/XMLSchema-instance";, "
> http://www.imsglobal.org/xsd/imsqti_v2p1
> http://www.imsglobal.org/question/qtiv2p1pd2/xsd/imsqti_v2p1.xsd";);
>
>
>
> However, we cannot successfully get the first one to print out.  We've
> tried variations of insertNamespace, insertAttribute and
> insertAttributeWithValue.  Does anyone have any suggestions on how to add a
> namespace without a prefix?
>
>
>
> Thanks.
>
>
> *Michelle Friessen*
>
> Systems Product Support Analyst
> Assessment & Instruction
> Pearson
>
> (319) 354-9200 x214687
>


RE: Namespaces

2014-07-16 Thread Gagnon, Joseph - 0558 - MITLL
I was able to achieve a prefix-less namespace attribute by passing an empty 
string for the prefix argument.



E.g.  cursor.insertNamespace("", namespaceUri);



From: Friessen, Michelle [mailto:michelle.fries...@pearson.com]
Sent: Tuesday, July 15, 2014 4:38 PM
To: user@xmlbeans.apache.org
Subject: Namespaces



We have 3 namespaces that need to be added when generating XML:



xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1";

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 
http://www.imsglobal.org/question/qtiv2p1pd2/xsd/imsqti_v2p1.xsd";



Using XmlCursor, we were able to get the last 2 added using:



cursor.insertAttributeWithValue("schemaLocation", 
"http://www.w3.org/2001/XMLSchema-instance";, 
"http://www.imsglobal.org/xsd/imsqti_v2p1 
http://www.imsglobal.org/question/qtiv2p1pd2/xsd/imsqti_v2p1.xsd";);



However, we cannot successfully get the first one to print out.  We've tried 
variations of insertNamespace, insertAttribute and insertAttributeWithValue. 
Does anyone have any suggestions on how to add a namespace without a prefix?



Thanks.




Michelle Friessen

Systems Product Support Analyst
Assessment & Instruction
Pearson

(319) 354-9200 x214687



smime.p7s
Description: S/MIME cryptographic signature


Re: XmlCursor tutorial

2014-07-11 Thread Cezar Andrei

This document is probably the closest you're looking for.
http://xmlbeans.apache.org/docs/2.0.0/guide/conNavigatingXMLwithCursors.html

Cezar


On 06/24/2014 03:00 PM, jgagnon wrote:

Does anyone know of any tutorials about using the XMLBeans XmlCursor?  I've
looked at the little bit on the XMLBeans site, but that really doesn't cover
much.  I'm trying to figure out how to use it to construct a document
(actually many documents - test cases) and it is anything but intuitive.  If
someone knows of a really well written, fairly comprehensive tutorial on its
usage, it would be very much appreciated.



--
View this message in context: 
http://xmlbeans.996285.n3.nabble.com/XmlCursor-tutorial-tp7515.html
Sent from the XMLBeans User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org





Re: Dynamic generation of XML object hierarchy using schema

2014-05-06 Thread jgagnon
I assume that using the XmlCursor to build a document object hierarchy will
not make any use of the schema generated API?



--
View this message in context: 
http://xmlbeans.996285.n3.nabble.com/Dynamic-generation-of-XML-object-hierarchy-using-schema-tp7501p7503.html
Sent from the XMLBeans User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Dynamic generation of XML object hierarchy using schema

2014-05-06 Thread Cezar Andrei
Joseph,

Best way to learn for what you need to is to look at the implementation of 
xsd2inst tool:
http://svn.apache.org/viewvc/xmlbeans/trunk/src/tools/org/apache/xmlbeans/impl/xsd2inst/SchemaInstanceGenerator.java?view=markup

Cezar


On May 6, 2014, at 11:19 AM, jgagnon  wrote:

> I am working on a project where we are trying to dynamically generate XML
> instances, using the information gleaned from a defining XML schema.  The
> instances will represent test cases for a given "message" type.
> 
> I've experimented with the XMLBeans schema type system to get useful
> information about the types defined in the schema, such as the structure
> (sequences, choices, etc.), min/max occurs and various restrictions
> (enumerations, patterns, etc.). This information will be used to determine
> what types of test cases will be generated for a given message element.
> 
> I'm at the point where I'd like to use the XMLBeans Java API to
> programmatically generate XML document instances. Of course, I would need to
> compile the schema to generate a Java library of classes that represent the
> Java form of the message types (and supporting types).
> 
> What I don't know is how to dynamically use the generated API to create an
> object hierarchy representing a test case.  The hierarchy would represent a
> message instance (which may or may not be valid or complete based on the
> test case), with element content populated with test data.
> 
> I cannot seem to find the information from the schema type system that would
> allow me to "bridge" between the schema information and the specific
> generated API classes that would need to be used to generate the object
> hierarchy.
> 
> I assume if this information is available, I would then need to use
> reflection to create the objects and set their values and attributes.
> 
> Does anyone have suggestions?
> 
> 
> 
> --
> View this message in context: 
> http://xmlbeans.996285.n3.nabble.com/Dynamic-generation-of-XML-object-hierarchy-using-schema-tp7501.html
> Sent from the XMLBeans User mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 


-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Dynamic generation of XML object hierarchy using schema

2014-05-06 Thread jerry . sy

look at the XmlCursor api. You can use it to create an xml document.

On 5/6/2014 8:19 AM, jgagnon wrote:

I am working on a project where we are trying to dynamically generate XML
instances, using the information gleaned from a defining XML schema.  The
instances will represent test cases for a given "message" type.

I've experimented with the XMLBeans schema type system to get useful
information about the types defined in the schema, such as the structure
(sequences, choices, etc.), min/max occurs and various restrictions
(enumerations, patterns, etc.). This information will be used to determine
what types of test cases will be generated for a given message element.

I'm at the point where I'd like to use the XMLBeans Java API to
programmatically generate XML document instances. Of course, I would need to
compile the schema to generate a Java library of classes that represent the
Java form of the message types (and supporting types).

What I don't know is how to dynamically use the generated API to create an
object hierarchy representing a test case.  The hierarchy would represent a
message instance (which may or may not be valid or complete based on the
test case), with element content populated with test data.

I cannot seem to find the information from the schema type system that would
allow me to "bridge" between the schema information and the specific
generated API classes that would need to be used to generate the object
hierarchy.

I assume if this information is available, I would then need to use
reflection to create the objects and set their values and attributes.

Does anyone have suggestions?



--
View this message in context: 
http://xmlbeans.996285.n3.nabble.com/Dynamic-generation-of-XML-object-hierarchy-using-schema-tp7501.html
Sent from the XMLBeans User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Getting namespace info from a parsed XML file

2014-05-01 Thread jerry . sy
use the cursor api. it will give you all the namespaces in scope in a 
Map object.

XmlObject xobj = XmlObject.Factory.parse(xml);
XmlCursor curs = xobj.newCursor();
curs.toFirstChild();
HashMap map = new HashMap();
curs.getAllNamespaces(map);

On 5/1/2014 7:31 AM, jgagnon wrote:

I'm trying to figure out how to get the namespace information (the
namespace(s) itself and the namespace prefix(es) that are applied to
elements within the document) contained within an XML file after I have
parsed it in XMLBeans.  For example, consider the following XML snippet:


http://www.domain.org/ ../schema.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:pfx="http://www.domain.org/";>
   
 
   
 4142434445464748494a4b4c4d4e4f50
 
   

   This document is
UNCLASSIFIED
 
...


In the case, the namespace I'm concerned with is "http://www.domain.org"; and
the prefix "pfx" that's applied to the document elements.

I have not been able to figure out how to do this via the XMLBeans API.



--
View this message in context: 
http://xmlbeans.996285.n3.nabble.com/Getting-namespace-info-from-a-parsed-XML-file-tp7498.html
Sent from the XMLBeans User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Duplicate complex types with mixed elements

2014-03-17 Thread Cezar Andrei

Narayan,

It's probably a bug that the node1Type is not removed but this doesn't 
affect the rest since it's not used elsewhere.

As you can see in personType, node1 element is defined as mixed content.

Cezar


On 03/11/2014 12:20 AM, Parvatikar, Narayan wrote:


Hi ,

I am trying to generate a xsd from a sample xml which looks like below,





 text 

  john  



Here *node1* is mixed element.

But there are two definitions seen for the node1 in xsd.

One is global complex type and other is complex type defined inline ( 
Check below )




http://www.w3.org/2001/XMLSchema"elementFormDefault="qualified"attributeFormDefault="unqualified";>





































I am using RussianDoll Strategy for generating this . Do we know any 
solution to fix this ?


Thanks

Narayan





Re: question about namespace

2014-02-18 Thread Ted Slusser
Hi,

Thank you for the information.  I’m not sure what you mean by using implicit 
namespaces only for a smaller part of the document.  At any rate, I removed the 
call to setSaveImplicitNamespaces, but I’m still getting the explicit 
namespaces on the element.

http://xmlbeans.apache.org/docs/2.6.0/reference/org/apache/xmlbeans/XmlOptions.html#setSaveAggressiveNamespaces%28%29
>>> 
>>> Cezar
>>> 
 On Mon, 2014-02-17 at 13:36 -0800, Ted Slusser wrote:
 Hello,
 
 I’m using XMLBeans 2.6.0 to generate a document based on HL7 CDA.  I am 
 setting an attribute on an element and the output looks like:
 
 >>> codeSystem="2.16.840.1.113883.6.96" displayName="NI”>
 
 I would like it to look like this:
 
 >>> displayName="NI”>
 
 Here’s the document namespace declaration:
 
 >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance”>
 
 I’m setting the following in XmlOptions:
 
   setUseDefaultNamespace();
   setSavePrettyPrint();
   setSaveSubstituteCharacters(createXmlOptionCharEscapeMap());
   setSaveSuggestedPrefixes(createSuggestedPrefixes());
   setSaveImplicitNamespaces(createImplicitNamespaces());
   setSaveNamespacesFirst();
   setSaveAggressiveNamespaces();
 
 And my namespace map is:
 
   map.put("urn:hl7-org:v3", "");
   map.put("http://www.w3.org/2001/XMLSchema-instance";, "xsi”);
 
 Is there anyway I can get XmlBeans to emit the “code” element without 
 redeclaring the namespace?
 
 Thanks,
 
 Ted
 -
 To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
 For additional commands, e-mail: user-h...@xmlbeans.apache.org
>>> 
>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>>> 
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>> 
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 


-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: question about namespace

2014-02-18 Thread Cezar Andrei
I believe the order doesn't affect the output.
I see you use setSaveImplicitNamespaces(), this should be used only when
you use XMLBeans for only a smaller part of the document.

Cezar

On Mon, 2014-02-17 at 17:27 -0800, Ted Slusser wrote:
> Hi
> 
> Thanks for the suggestion.  I am calling that already, but it doesn't seem to 
> work for my desired effect.
> 
> Does the order of the options make any difference?
> 
> Thanks,
> 
> Ted Slusser
> Java Developer
> Vanderbilt Informatics
> 615-420-7326
> 
> > On Feb 17, 2014, at 4:44 PM, Cezar Andrei  wrote:
> > 
> > Ted,
> > 
> > Give a try to XmlOptions.setSaveAggressiveNamespaces() it might get
> > closer to the form you want.
> > http://xmlbeans.apache.org/docs/2.6.0/reference/org/apache/xmlbeans/XmlOptions.html#setSaveAggressiveNamespaces%28%29
> > 
> > Cezar
> > 
> >> On Mon, 2014-02-17 at 13:36 -0800, Ted Slusser wrote:
> >> Hello,
> >> 
> >> I’m using XMLBeans 2.6.0 to generate a document based on HL7 CDA.  I am 
> >> setting an attribute on an element and the output looks like:
> >> 
> >>  >> codeSystem="2.16.840.1.113883.6.96" displayName="NI”>
> >> 
> >> I would like it to look like this:
> >> 
> >>  >> displayName="NI”>
> >> 
> >> Here’s the document namespace declaration:
> >> 
> >>  >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance”>
> >> 
> >> I’m setting the following in XmlOptions:
> >> 
> >>setUseDefaultNamespace();
> >>setSavePrettyPrint();
> >>setSaveSubstituteCharacters(createXmlOptionCharEscapeMap());
> >>setSaveSuggestedPrefixes(createSuggestedPrefixes());
> >>setSaveImplicitNamespaces(createImplicitNamespaces());
> >>setSaveNamespacesFirst();
> >>setSaveAggressiveNamespaces();
> >> 
> >> And my namespace map is:
> >> 
> >>map.put("urn:hl7-org:v3", "");
> >>map.put("http://www.w3.org/2001/XMLSchema-instance";, "xsi”);
> >> 
> >> Is there anyway I can get XmlBeans to emit the “code” element without 
> >> redeclaring the namespace?
> >> 
> >> Thanks,
> >> 
> >> Ted
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> >> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> > 
> > 
> > 
> > -
> > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> > For additional commands, e-mail: user-h...@xmlbeans.apache.org
> > 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: question about namespace

2014-02-17 Thread Ted Slusser
Hi

Thanks for the suggestion.  I am calling that already, but it doesn't seem to 
work for my desired effect.

Does the order of the options make any difference?

Thanks,

Ted Slusser
Java Developer
Vanderbilt Informatics
615-420-7326

> On Feb 17, 2014, at 4:44 PM, Cezar Andrei  wrote:
> 
> Ted,
> 
> Give a try to XmlOptions.setSaveAggressiveNamespaces() it might get
> closer to the form you want.
> http://xmlbeans.apache.org/docs/2.6.0/reference/org/apache/xmlbeans/XmlOptions.html#setSaveAggressiveNamespaces%28%29
> 
> Cezar
> 
>> On Mon, 2014-02-17 at 13:36 -0800, Ted Slusser wrote:
>> Hello,
>> 
>> I’m using XMLBeans 2.6.0 to generate a document based on HL7 CDA.  I am 
>> setting an attribute on an element and the output looks like:
>> 
>> > codeSystem="2.16.840.1.113883.6.96" displayName="NI”>
>> 
>> I would like it to look like this:
>> 
>> > displayName="NI”>
>> 
>> Here’s the document namespace declaration:
>> 
>> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance”>
>> 
>> I’m setting the following in XmlOptions:
>> 
>>setUseDefaultNamespace();
>>setSavePrettyPrint();
>>setSaveSubstituteCharacters(createXmlOptionCharEscapeMap());
>>setSaveSuggestedPrefixes(createSuggestedPrefixes());
>>setSaveImplicitNamespaces(createImplicitNamespaces());
>>setSaveNamespacesFirst();
>>setSaveAggressiveNamespaces();
>> 
>> And my namespace map is:
>> 
>>map.put("urn:hl7-org:v3", "");
>>map.put("http://www.w3.org/2001/XMLSchema-instance";, "xsi”);
>> 
>> Is there anyway I can get XmlBeans to emit the “code” element without 
>> redeclaring the namespace?
>> 
>> Thanks,
>> 
>> Ted
>> -
>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: question about namespace

2014-02-17 Thread Cezar Andrei
Ted,

Give a try to XmlOptions.setSaveAggressiveNamespaces() it might get
closer to the form you want.
http://xmlbeans.apache.org/docs/2.6.0/reference/org/apache/xmlbeans/XmlOptions.html#setSaveAggressiveNamespaces%28%29

Cezar

On Mon, 2014-02-17 at 13:36 -0800, Ted Slusser wrote:
> Hello,
> 
> I’m using XMLBeans 2.6.0 to generate a document based on HL7 CDA.  I am 
> setting an attribute on an element and the output looks like:
> 
>  codeSystem="2.16.840.1.113883.6.96" displayName="NI”>
> 
> I would like it to look like this:
> 
>  displayName="NI”>
> 
> Here’s the document namespace declaration:
> 
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance”>
> 
> I’m setting the following in XmlOptions:
> 
> setUseDefaultNamespace();
> setSavePrettyPrint();
> setSaveSubstituteCharacters(createXmlOptionCharEscapeMap());
> setSaveSuggestedPrefixes(createSuggestedPrefixes());
> setSaveImplicitNamespaces(createImplicitNamespaces());
> setSaveNamespacesFirst();
> setSaveAggressiveNamespaces();
> 
> And my namespace map is:
> 
> map.put("urn:hl7-org:v3", "");
> map.put("http://www.w3.org/2001/XMLSchema-instance";, "xsi”);
> 
> Is there anyway I can get XmlBeans to emit the “code” element without 
> redeclaring the namespace?
> 
> Thanks,
> 
> Ted
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



RE: Handling namespaces in xsd

2014-01-28 Thread Cezar Andrei
I used inst2xsd tool in bin directory: 
./xmlbeans/bin/inst2xsd inst.xml 
[ -verbose -validate ] switches are optional.

If you need to call it from your code just look at the implementation.

I don't remember if imports are implemented but it's not an XmlSchema
spec requirement.

Cezar

On Mon, 2014-01-27 at 20:20 -0800, Parvatikar, Narayan wrote:
> Thanks lot Cezar, this is what I am looking for. 
> 
> How did you do that ?  I am using xmlbeans 2.6.0 and API Inst2Xsd.inst2xsd() 
> , but I am not able to generate like this.
> Is there any specific option to generate like this ?
> 
> I tried xmloptions. setLoadAdditionalNamespaces() but it dint help. 
> 
> Also, I noticed that there are no import statements added in schema you sent 
> , Is there a way to do that  ? 
> 
> Thanks
> Narayan
> 
> -Original Message-
> From: Cezar Andrei [mailto:cezar.and...@oracle.com] 
> Sent: Monday, January 27, 2014 9:14 PM
> To: user@xmlbeans.apache.org
> Subject: Re: Handling namespaces in xsd
> 
> Narayan,
> 
> It seems correct to me. Each namespace is defined by a separate schema file. 
> And there is a definition in the last schema for abc element:
> 
> 
> Cezar
> 
> Here are the generated schema files:
> 
>  elementFormDefault="qualified"
> targetNamespace="http://www.w3schools.com/furniture";
> xmlns="http://www.w3.org/2001/XMLSchema";>
>xmlns:fur="http://www.w3schools.com/furniture"/>
>   
> 
>xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
>xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
>xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
> 
>   
> 
> --
> 
>  elementFormDefault="qualified"
> targetNamespace="http://www.w3.org/TR/html4/";
> xmlns="http://www.w3.org/2001/XMLSchema";>
>xmlns:htm="http://www.w3.org/TR/html4/"/>
>   
> 
>   
> 
>xmlns:xs="http://www.w3.org/2001/XMLSchema";>
> 
> 
>   
> 
>   
> 
>   
>   
> 
>xmlns:htm="http://www.w3.org/TR/html4/"/>
> 
>   
> 
> --
> 
>  elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema";>
>   
>   
> 
>xmlns:fur="http://www.w3schools.com/furniture"/>
>   http://www.w3.org/TR/html4/"/>
> 
>   
> 
> 
> 
> 
> Cezar
> 
> 
> On Mon, 2014-01-27 at 04:36 -0800, Parvatikar, Narayan wrote:
> > Hi
> > 
> >  
> > 
> > I am trying to convert a xml sample which has multiple namespaces 
> > using xmlbeans inst2xsd java API.
> > 
> > The generated xsd does not look correct?  
> > 
> > Source XML : 
> > 
> >  
> > 
> > 
> > 
> > http://www.w3.org/TR/html4/";
> > xmlns:f="http://www.w3schools.com/furniture";
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> > 
> > 
> > 
> > African Coffee Table
> > 
> > 80
> > 
> > 120
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Apples
> > 
> > Bananas
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  
> > 
> > The generated XSD contains only f: table and does not produce element 
> > definition for root element abc.
> > 
> > Is there any way to handle the multiple namespaces in xmlbeans ? 
> > 
> >  
> > 
> >  
> > 
> > Thanks
> > 
> > Narayan
> > 
> >  
> > 
> > 
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



RE: Handling namespaces in xsd

2014-01-27 Thread Parvatikar, Narayan
Thanks lot Cezar, this is what I am looking for. 

How did you do that ?  I am using xmlbeans 2.6.0 and API Inst2Xsd.inst2xsd() , 
but I am not able to generate like this.
Is there any specific option to generate like this ?

I tried xmloptions. setLoadAdditionalNamespaces() but it dint help. 

Also, I noticed that there are no import statements added in schema you sent , 
Is there a way to do that  ? 

Thanks
Narayan

-Original Message-
From: Cezar Andrei [mailto:cezar.and...@oracle.com] 
Sent: Monday, January 27, 2014 9:14 PM
To: user@xmlbeans.apache.org
Subject: Re: Handling namespaces in xsd

Narayan,

It seems correct to me. Each namespace is defined by a separate schema file. 
And there is a definition in the last schema for abc element:


Cezar

Here are the generated schema files:

http://www.w3schools.com/furniture";
xmlns="http://www.w3.org/2001/XMLSchema";>
  http://www.w3schools.com/furniture"/>
  

  http://www.w3.org/2001/XMLSchema"/>
  http://www.w3.org/2001/XMLSchema"/>
  http://www.w3.org/2001/XMLSchema"/>

  

--

http://www.w3.org/TR/html4/";
xmlns="http://www.w3.org/2001/XMLSchema";>
  http://www.w3.org/TR/html4/"/>
  

  

  http://www.w3.org/2001/XMLSchema";>


  

  

  
  

  http://www.w3.org/TR/html4/"/>

  

--

http://www.w3.org/2001/XMLSchema";>
  
  

  http://www.w3schools.com/furniture"/>
  http://www.w3.org/TR/html4/"/>

  




Cezar


On Mon, 2014-01-27 at 04:36 -0800, Parvatikar, Narayan wrote:
> Hi
> 
>  
> 
> I am trying to convert a xml sample which has multiple namespaces 
> using xmlbeans inst2xsd java API.
> 
> The generated xsd does not look correct?  
> 
> Source XML : 
> 
>  
> 
> 
> 
> http://www.w3.org/TR/html4/";
> xmlns:f="http://www.w3schools.com/furniture";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> 
> 
> 
> African Coffee Table
> 
> 80
> 
> 120
> 
> 
> 
> 
> 
> 
> 
> Apples
> 
> Bananas
> 
> 
> 
> 
> 
> 
> 
>  
> 
> The generated XSD contains only f: table and does not produce element 
> definition for root element abc.
> 
> Is there any way to handle the multiple namespaces in xmlbeans ? 
> 
>  
> 
>  
> 
> Thanks
> 
> Narayan
> 
>  
> 
> 



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Handling namespaces in xsd

2014-01-27 Thread Cezar Andrei
Narayan,

It seems correct to me. Each namespace is defined by a separate schema
file. And there is a definition in the last schema for abc element:


Cezar

Here are the generated schema files:

http://www.w3schools.com/furniture";
xmlns="http://www.w3.org/2001/XMLSchema";>
  http://www.w3schools.com/furniture"/>
  

  http://www.w3.org/2001/XMLSchema"/>
  http://www.w3.org/2001/XMLSchema"/>
  http://www.w3.org/2001/XMLSchema"/>

  

--

http://www.w3.org/TR/html4/";
xmlns="http://www.w3.org/2001/XMLSchema";>
  http://www.w3.org/TR/html4/"/>
  

  

  http://www.w3.org/2001/XMLSchema";>


  

  

  
  

  http://www.w3.org/TR/html4/"/>

  

--

http://www.w3.org/2001/XMLSchema";>
  
  

  http://www.w3schools.com/furniture"/>
  http://www.w3.org/TR/html4/"/>

  




Cezar


On Mon, 2014-01-27 at 04:36 -0800, Parvatikar, Narayan wrote:
> Hi 
> 
>  
> 
> I am trying to convert a xml sample which has multiple namespaces
> using xmlbeans inst2xsd java API.
> 
> The generated xsd does not look correct?  
> 
> Source XML : 
> 
>  
> 
> 
> 
> http://www.w3.org/TR/html4/";
> xmlns:f="http://www.w3schools.com/furniture";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> 
> 
> 
> African Coffee Table
> 
> 80
> 
> 120
> 
> 
> 
> 
> 
> 
> 
> Apples
> 
> Bananas
> 
> 
> 
> 
> 
> 
> 
>  
> 
> The generated XSD contains only f: table and does not produce element
> definition for root element abc. 
> 
> Is there any way to handle the multiple namespaces in xmlbeans ? 
> 
>  
> 
>  
> 
> Thanks
> 
> Narayan
> 
>  
> 
> 



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Prevent Ampersand Escaping

2014-01-14 Thread Cezar Andrei
Michelle,

You're right, XML content that contains & and < needs to be escaped and
XmlBeans does that even if you try to escape it beforehand, which is not
right. You're also right that using XmlOptionCharEscapeMap doesn't
affect them, if you know what you're doing you can look at the code that
does the escaping: src/store/org/apache/xmlbeans/impl/store/Saver.java
lines 1419-1422.

This is a strange request since all XML processors should know how to
handle & and < correctly.

hth,
Cezar

On Tue, 2014-01-14 at 09:13 -0800, Friessen, Michelle wrote:
> Greetings,
> 
> 
> Is there any way to stop XMLBeans version 2.5.0 from escaping the
> ampersand?  Per system requirements, I am converting special
> characters as follows:
> 
> 
> return str.replace("&", "&").replace("\"",
> """).replace("'", "'").replace("<",
> "<").replace(">", ">");
> 
> 
> 
> However, xmlbeans is escaping the ampersand (" becomes
> &x0022;); therefore, the character comes out as code (&
> instead of &) when the XML is read by another application.
> 
> 
> XmlOptionCharEscapeMap does not have the capability to handle the
> codes I need to use.  When I specify
> 
> 
> escapes.addMapping('&', XmlOptionCharEscapeMap.HEXADECIMAL);
> 
> 
> the ampersand comes out as & instead of &.
> 
> 
> It's likely that someone is going to respond saying xmlbeans has to
> escape the ampersand because it is a mandatory restriction of XML.  If
> that is a response, then please provide some type of solution to my
> problem because I have to use the codes listed above.
> 
> 
> Thanks.
> 
> 
> -- Michelle



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Problem about generating Java Source Code with XMLBeans from xsd

2013-11-06 Thread Federico Rossetti
Hi Cezar


First of all thanks for your quick response.


If I understand correctly, using SubInfo.xsetNome with Testo70Custom object
as parameter, I still have to call the “validate” method to check if the
message is correct against the xsd, is it true?


What I wanted to do was something different like this:



String value = //String of more than 70 characters


SubInfo sub =
DocumentoDocument.Factory.newInstance().addNewDocumento().addNewCreditore();


//Maximum length of the element type "Nome", which should be "Testo70Custom"

int subInfoMaxLength =
Integer.parseInt(sub.xgetNome().type.getFacet(SchemaType.FACET_MAX_LENGTH).getStringValue());


String name = //substring of “value” with maxlength = “subInfoMaxLength”


sub.setNome(name);



However the length of "subInfoMaxLength" is not 70 but is 140, that is the
length of the type Testo140, because like you said java rules and schema
rules don’t match fully.


I thought of this strategy to automatically manage any "max length" changes
of elements in XSD.


Can I manage these changes automatically in any other way?


Thanks for your response

Federico


2013/11/5 Cezar Andrei 

> Federico,
>
> The schema looks fine, if you look closely at SubInfo type def:
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> SubInfo is a restriction of type Info, i.e. it has to have a property
> called Nome of type Testo140.
> But in the same type the element Nome inside the SubInfo sequence is
> declared of type Testo70Custom, which is fine because Testo70Custom is a
> subtype of Testo140.
>
> This is a case where java rules and schema rules don't match fully. But if
> you're a little careful everything works fine,  make sure that you use
> SubInfo.xsetNome() only with objects of type Testo70Custom.
>
> Cezar
>
>
> On Nov 5, 2013, at 10:29 AM, Federico Rossetti <
> federico.rossetti...@gmail.com> wrote:
>
> Hi all
>
>
> i have a starting xsd no editable, from which to generate the Java source
> code with XMLBeans. My problem is on the generated java class SubInfo.java.
>
>
> In the xsd, the element “Nome”, child of the element “SubInfo”, has as
> type “Testo70Custom”, but in the generated java code the type is
> “Testo140”. Is the xsd poorly written the problem? Or is the process of
> code generation the problem?
>
>
> The correct type is important because in my java code – client side – I
> use it to get some attributes of the xsd elements (like max length of
> string, to truncate strings in surplus) from the schemaytpe in order to
> perform the validation before sending out the message. If the type is
> wrong, I could send erroneous messages.
>
>
> In binary file .xsb generated with XmlBeans,  i see that in the properties
> of the element “Nome” there is a difference between the Type
> (testo70custom8e3etype) and the Type for Java Signature (testo1405c59type).
>
>
> The three files are attached to the message.
>
>
> Thanks for a response
>
>
> Federico
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>
>


Re: Problem about generating Java Source Code with XMLBeans from xsd

2013-11-05 Thread Cezar Andrei
Federico,

The schema looks fine, if you look closely at SubInfo type def:



























SubInfo is a restriction of type Info, i.e. it has to have a property called 
Nome of type Testo140.
But in the same type the element Nome inside the SubInfo sequence is declared 
of type Testo70Custom, which is fine because Testo70Custom is a subtype of 
Testo140.

This is a case where java rules and schema rules don't match fully. But if 
you're a little careful everything works fine,  make sure that you use 
SubInfo.xsetNome() only with objects of type Testo70Custom.

Cezar


On Nov 5, 2013, at 10:29 AM, Federico Rossetti  
wrote:

> Hi all
> 
> 
> 
> i have a starting xsd no editable, from which to generate the Java source 
> code with XMLBeans. My problem is on the generated java class SubInfo.java.
> 
> 
> 
> In the xsd, the element “Nome”, child of the element “SubInfo”, has as type 
> “Testo70Custom”, but in the generated java code the type is “Testo140”. Is 
> the xsd poorly written the problem? Or is the process of code generation the 
> problem?
> 
> 
> 
> The correct type is important because in my java code – client side – I use 
> it to get some attributes of the xsd elements (like max length of string, to 
> truncate strings in surplus) from the schemaytpe in order to perform the 
> validation before sending out the message. If the type is wrong, I could send 
> erroneous messages.
> 
> 
> 
> In binary file .xsb generated with XmlBeans,  i see that in the properties of 
> the element “Nome” there is a difference between the Type 
> (testo70custom8e3etype) and the Type for Java Signature (testo1405c59type).
> 
> 
> 
> The three files are attached to the message.
> 
> 
> 
> Thanks for a response
> 
> 
> 
> Federico
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Getting XMLBeans out of Attic

2013-10-25 Thread Jacob Danner
Hi Nick,
I was wondering if this was going to get off the ground. I'm still game to
work on this and have been poking at bits on my github fork. As a prior
committer all the legalese has been completed once before. Do I or should I
do anything else for this incubating project?
-jacobd
On Oct 24, 2013 4:43 AM, "Nick Burch"  wrote:

> On Thu, 24 Oct 2013, Tammo van Lessen wrote:
>
>> Me too, I can also serve as a mentor. Perhaps we should also inform attic
>> (and board?) when we get this started so that the actual move to attic can
>> be avoided.
>>
>
> I think the attic already knows?
>
> I've created an initial proposal, feedback welcome! I've also added the
> people who volunteered in this thread. Jerry and Serkan - there's a few
> bits you need to edit about yourselves on the wiki
>
> The proposal is available at:
>  
> https://wiki.apache.org/**incubator/XMLBeansProposal
>
> Nick
>
> --**--**-
> To unsubscribe, e-mail: 
> user-unsubscribe@xmlbeans.**apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>


Re: XMLBeans Project Reboot Proposal - Volunteers Needed

2013-10-25 Thread Cezar Andrei
It's great to see the interest in the project, I'll be on the list and
help with answering questions.

Cezar Andrei

On Thu, 2013-10-24 at 05:16 -0700, Nick Burch wrote:
> Hi All
> 
> As many of you will know, the Apache XMLBeans project is currently 
> destined for the Apache Attic, in large part because the previous PMC [1]
> (Project Management Committee) is no longer around to provide the required 
> levels of oversight of the project.
> 
> It looks like there are still plenty of people around though who want to 
> help with XMLBeans and keep it going, which is great! The next step is to 
> take a proposal to the Apache Incubator to reboot the project. This would 
> be for the Incubator to help the community develop into a new PMC, such as 
> learning more about the Apache Way - our meritocratic way of developing 
> open source software.
> 
> I've put together an initial proposal to the IPMC for this, which is 
> available at:
> https://wiki.apache.org/incubator/XMLBeansProposal
> 
> At this point, we need people to volunteer to take part in the rebooted 
> project! If you'd like to help develop the code, develop the website, 
> develop documentation etc, please sign up! To do so, just go to the 
> proposal, edit the wiki, and list yourself in the table near the bottom. 
> (Existing IPMC members please sign up to help mentor!)
> 
> People may also want to read through the Incubator Guides, which explain a 
> lot more about the process, the way that software gets developed at 
> Apache, the importance of the community etc. That's all at:
> http://incubator.apache.org/guides/index.html
> 
> The main thing for now though is for people to sign up on the proposal to 
> help! Sign up, join in, help out :)
> https://wiki.apache.org/incubator/XMLBeansProposal#Initial_Committers
> 
> Nick
> 
> [1] http://www.apache.org/dev/#pmc
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: XMLBeans Project Reboot Proposal - Volunteers Needed

2013-10-24 Thread Nick Burch

On Thu, 24 Oct 2013, Daniel Lübke wrote:

thanks for your effort on creating the proposal. I'd like to join.


Great! First thing, which I see you've already done, is to list yourself 
in the Initial Committers list

https://wiki.apache.org/incubator/XMLBeansProposal#Initial_Committers

Secondly, assuming the IPMC approves the reboot, everyone will need to 
have an iCLA on file before they can get an account as a committer. It 
only takes a short while to read the iCLA and send one in, so it may be 
worth people going ahead and doing that. Details are at
http://www.apache.org/licenses/#clas . Once you've submitted an iCLA, you 
can update the committers list iCLA column on the wiki to say you've 
submitted yours!


Nick

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org

Re: XMLBeans Project Reboot Proposal - Volunteers Needed

2013-10-24 Thread Daniel Lübke

Hi Nick,

thanks for your effort on creating the proposal. I'd like to join.

Daniel

Am 24.10.2013 14:16, schrieb Nick Burch:

Hi All

As many of you will know, the Apache XMLBeans project is currently 
destined for the Apache Attic, in large part because the previous PMC [1]
(Project Management Committee) is no longer around to provide the 
required levels of oversight of the project.


It looks like there are still plenty of people around though who want 
to help with XMLBeans and keep it going, which is great! The next step 
is to take a proposal to the Apache Incubator to reboot the project. 
This would be for the Incubator to help the community develop into a 
new PMC, such as learning more about the Apache Way - our meritocratic 
way of developing open source software.


I've put together an initial proposal to the IPMC for this, which is 
available at:

   https://wiki.apache.org/incubator/XMLBeansProposal

At this point, we need people to volunteer to take part in the 
rebooted project! If you'd like to help develop the code, develop the 
website, develop documentation etc, please sign up! To do so, just go 
to the proposal, edit the wiki, and list yourself in the table near 
the bottom. (Existing IPMC members please sign up to help mentor!)


People may also want to read through the Incubator Guides, which 
explain a lot more about the process, the way that software gets 
developed at Apache, the importance of the community etc. That's all at:

   http://incubator.apache.org/guides/index.html

The main thing for now though is for people to sign up on the proposal 
to help! Sign up, join in, help out :)

https://wiki.apache.org/incubator/XMLBeansProposal#Initial_Committers

Nick

[1] http://www.apache.org/dev/#pmc

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Getting XMLBeans out of Attic

2013-10-24 Thread Nick Burch

On Thu, 24 Oct 2013, Tammo van Lessen wrote:
Me too, I can also serve as a mentor. Perhaps we should also inform 
attic (and board?) when we get this started so that the actual move to 
attic can be avoided.


I think the attic already knows?

I've created an initial proposal, feedback welcome! I've also added the 
people who volunteered in this thread. Jerry and Serkan - there's a few 
bits you need to edit about yourselves on the wiki


The proposal is available at:
 https://wiki.apache.org/incubator/XMLBeansProposal

Nick

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Getting XMLBeans out of Attic

2013-10-24 Thread Tammo van Lessen
Me too, I can also serve as a mentor. Perhaps we should also inform attic
(and board?) when we get this started so that the actual move to attic can
be avoided.

Tammo


On Thu, Oct 24, 2013 at 8:17 AM, Serkan Taş  wrote:

> Me too...
>
> Serkan.
>
> 23 Eki 2013 tarihinde 21:54 saatinde, jerry...@oracle.com şunları yazdı:
>
> > Yes I am still interested.
> >
> > Thanks
> > Jerry
> >
> > On 10/23/2013 4:37 AM, Nick Burch wrote:
> >> Hi All
> >>
> >> Is there still interest in rebooting the XMLBeans project?
> >>
> >> If so, I think we have enough existing Apache PMC members to mentor the
> rebooted project. I'm happy to start the ball rolling on the proposal if
> there's still the interest?
> >>
> >> Nick
> >>
> >> PS The steps would be that I'd setup the proposal on the incubator wiki,
> >>   people interested in helping with the rebooted project would sign up,
> >>   then we'd have a vote and then begin working on the code and the
> >>   community within the Apache Incubator
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> >> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> > For additional commands, e-mail: user-h...@xmlbeans.apache.org
> >
> >
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>


-- 
Tammo van Lessen - http://www.taval.de


Re: Getting XMLBeans out of Attic

2013-10-23 Thread Serkan Taş
Me too...

Serkan.

23 Eki 2013 tarihinde 21:54 saatinde, jerry...@oracle.com şunları yazdı:

> Yes I am still interested.
> 
> Thanks
> Jerry
> 
> On 10/23/2013 4:37 AM, Nick Burch wrote:
>> Hi All
>> 
>> Is there still interest in rebooting the XMLBeans project?
>> 
>> If so, I think we have enough existing Apache PMC members to mentor the 
>> rebooted project. I'm happy to start the ball rolling on the proposal if 
>> there's still the interest?
>> 
>> Nick
>> 
>> PS The steps would be that I'd setup the proposal on the incubator wiki,
>>   people interested in helping with the rebooted project would sign up,
>>   then we'd have a vote and then begin working on the code and the
>>   community within the Apache Incubator
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 
> 


-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: How to insert after using XmlCursor?

2013-10-23 Thread Michael Bishop
That's really helpful. That got me most of the way there. I have to take
into account that "child" may not be the only kind of child a parent can
have. Given schema constraints, I have to make sure children appear in the
right order. I've found a solution that still needs testing for all cases.

The overall goal is to take some "source" XmlObject and apply it to a
"target" XmlObject. The "target" XmlObject is the live XmlObject. We have
custom events, event listeners, etc., working with the "target" XmlObject.
That's why I can't just call target.set(source); we lose all the listeners.

So, you invoke an "edit" on the live "target" and get a dialog. The dialog
makes a copy of the "target" and returns the modified copy based on user
input. So your "target" is still the live XML and the "source" is the
updated version of "target." If everything goes correctly, your target is
now equivalent to your source.

I have a series of methods that compare source and target. One handles
attributes. One handles child text. One handles removing child elements
from the target that no longer exist in the source. One handles updating
child elements that exist in both target and source. Finally, I have the
method that adds child elements from source that don't exist in target.
This is the one that's giving me trouble.

I iterate through all of the source's child elements in order. Order's
important; otherwise we could break schema constraints. Assuming source is
correct, I try to place the new child element in the right place under
target.

// This is the qualified name of the previous child element from source we
processed.
QName previous = ...

XmlCursor targetCursor = target.newCursor();

// Attempt to go to the last child we processed. This should pass unless
the target has no child elements and this is the first child element
processed.
if (targetCursor.toChild(previous)) {

// If we don't have a sibling, w try to go to the end of the parent
(containing) element.
if (!targetCursor.toNextSibling()) {
targetCursor.toParent();
targetCursor.toEndToken();
targetCursor.toPrevToken();
}

// If we made it to the last child we processed, we want to insert the new
child after it.
else {
targetCursor.toEndToken();
}
}

sourceCursor.copyXml(targetCursor);

previous = sourceName;

targetCursor.dispose();

// Iterate to the next source child.


Does this make any sense whatsoever? Am I making this too difficult? At the
end of the day, I want to operate on "target" so it is equivalent to
"source" without losing any of the custom event-related information in
"target."


On Wed, Oct 23, 2013 at 3:35 PM,  wrote:

> You need to go to the END of the parent cursor or to the nextToken of the
> END of the lastChild, then do the insert.
>
> XmlObject test1 = XmlObject.Factory.parse("<**
> parent>first");
> XmlCursor testcurs = test1.newCursor();
> if (testcurs.isStartdoc()){
> testcurs.toNextToken();
> }
> boolean res = testcurs.toLastChild();
> XmlCursor.TokenType tt = testcurs.toEndToken(); //this goes to END
> tag of the last child element
> tt = testcurs.toNextToken(); //we are now at the END tag of parent
> testcurs.**insertElementWithText("child",**"second");
>
> or this
> XmlObject test1 = XmlObject.Factory.parse("<**
> parent>first");
> XmlCursor testcurs = test1.newCursor();
> if (testcurs.isStartdoc()){
> testcurs.toNextToken(); //now at parent element
> }
> XmlCursor.TokenType tt = testcurs.toEndToken(); //END tag of
> parent element
> testcurs.**insertElementWithText("child",**"second");
>
>
>
> On 10/23/2013 11:51 AM, Michael Bishop wrote:
>
>> Hello all,
>>
>> I'm a bit stuck in trying to achieve this with XmlObjects and XmlCursor.
>> Imagine the following scenario:
>>
>> 
>> Some text
>> 
>>
>> I want to insert a new element AFTER the child element.
>>
>> 
>> Some text
>> 
>> 
>>
>> I don't necessarily know anything about the child element. It might have
>> child text like the example above. It might not. It might have child
>> elements, it might not. It might have siblings, it might not. Here's where
>> I'm stuck:
>>
>> // XmlObject representing parent.
>> XmlObject parent = ...;
>>
>> XmlCursor parentCursor = parent.newCursor();
>>
>> // Now I'm at the START token for the child element.
>> parentCursor.toChild("child");
>>
>> From here, how do I reliably get the cursor past  or ?
>> Basically I'm at the start of  and want to be right past the end of
>> that element.
>>
>> Thanks,
>>
>> Michael
>>
>
>
> --**--**-
> To unsubscribe, e-mail: 
> user-unsubscribe@xmlbeans.**apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>


Re: How to insert after using XmlCursor?

2013-10-23 Thread jerry . sy
You need to go to the END of the parent cursor or to the nextToken of 
the END of the lastChild, then do the insert.


XmlObject test1 = 
XmlObject.Factory.parse("first");

XmlCursor testcurs = test1.newCursor();
if (testcurs.isStartdoc()){
testcurs.toNextToken();
}
boolean res = testcurs.toLastChild();
XmlCursor.TokenType tt = testcurs.toEndToken(); //this goes to 
END tag of the last child element

tt = testcurs.toNextToken(); //we are now at the END tag of parent
testcurs.insertElementWithText("child","second");

or this
XmlObject test1 = 
XmlObject.Factory.parse("first");

XmlCursor testcurs = test1.newCursor();
if (testcurs.isStartdoc()){
testcurs.toNextToken(); //now at parent element
}
XmlCursor.TokenType tt = testcurs.toEndToken(); //END tag of 
parent element

testcurs.insertElementWithText("child","second");


On 10/23/2013 11:51 AM, Michael Bishop wrote:

Hello all,

I'm a bit stuck in trying to achieve this with XmlObjects and 
XmlCursor. Imagine the following scenario:



Some text


I want to insert a new element AFTER the child element.


Some text



I don't necessarily know anything about the child element. It might 
have child text like the example above. It might not. It might have 
child elements, it might not. It might have siblings, it might not. 
Here's where I'm stuck:


// XmlObject representing parent.
XmlObject parent = ...;

XmlCursor parentCursor = parent.newCursor();

// Now I'm at the START token for the child element.
parentCursor.toChild("child");

From here, how do I reliably get the cursor past  or ? 
Basically I'm at the start of  and want to be right past the 
end of that element.


Thanks,

Michael



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Getting XMLBeans out of Attic

2013-10-23 Thread jerry . sy

Yes I am still interested.

Thanks
Jerry

On 10/23/2013 4:37 AM, Nick Burch wrote:

Hi All

Is there still interest in rebooting the XMLBeans project?

If so, I think we have enough existing Apache PMC members to mentor 
the rebooted project. I'm happy to start the ball rolling on the 
proposal if there's still the interest?


Nick

PS The steps would be that I'd setup the proposal on the incubator wiki,
   people interested in helping with the rebooted project would sign up,
   then we'd have a vote and then begin working on the code and the
   community within the Apache Incubator

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Getting XMLBeans out of Attic

2013-10-23 Thread Nick Burch

Hi All

Is there still interest in rebooting the XMLBeans project?

If so, I think we have enough existing Apache PMC members to mentor the 
rebooted project. I'm happy to start the ball rolling on the proposal if 
there's still the interest?


Nick

PS The steps would be that I'd setup the proposal on the incubator wiki,
   people interested in helping with the rebooted project would sign up,
   then we'd have a vote and then begin working on the code and the
   community within the Apache Incubator

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Getting XMLBeans out of Attic

2013-08-24 Thread Maarten Bosteels
Hi,

I am also willing to join the PMC or otherwise help to get XMLBeans out of
the attic.

Maarten Bosteels  (member of the Apache Mina PMC)



On Mon, Jul 29, 2013 at 2:46 PM, Nick Burch  wrote:

> On Mon, 29 Jul 2013, Daniel Lübke wrote:
>
>> I have talked to the Apache ODE PMC Chair Tammo van Lessen how we can get
>> things running again, i.e. which Apache rules are there etc. I will keep
>> you updated.
>>
>
> As I understand it, the responsibility for the project has been moved to
> the Apache Attic PMC, but no-one from there has yet had the time to action
> the move. So, I think you probably want to get in touch with the Attic
> PMC[1], let them know there's a move to reboot the pmc, and ask them for
> their advice on how to do that
>
> Nick
> [1] 
> http://mail-archives.apache.**org/mod_mbox/attic-general/
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>


Re: Add to XmlBeans FAQ re orphaned objects and XmlValueDisconnectedException

2013-08-21 Thread Cezar Andrei
I added the new question and answer to the Faq page.

XmlObject.copy() should be much more efficient than toString() and
parse().

Cezar

On Tue, 2013-08-20 at 07:10 -0700, Lott, Christopher M wrote:
> I would like to suggest an addition to page 
> http://wiki.apache.org/xmlbeans/XmlBeansFaq but I cannot edit it, so am 
> trying the email list.   Please redirect me if I'm sending this to the wrong 
> place. 
> 
> Is this Q & A sufficient and clear?  Thanks for listening.
> 
> 
> Q: Why am I getting XmlValueDisconnectedException when I try to change an 
> XmlObject?
> 
> A: The most likely cause is that the XmlObject is an orphan; i.e., it has 
> become disassociated from the XML store.  This can happen if you get a 
> reference to an object (perhaps by fetching the first item in an array), 
> delete the item from the tree (perhaps by calling the array remove method on 
> element 0), and then try to invoke methods on that reference or any of its 
> child elements.  You cannot even invoke the toString() method on an orphaned 
> object!  If you need to keep a deleted object, make a copy before you delete 
> it. For example:
> 
>   LineItem nl = 
> LineItem.Factory.parse(p.getLineItemArray(0).toString());
>   p.removeLineItem(0);
> 
> 
> Credit this to Paul Gillen and also the people who posted to a thread in 2006:
> 
> http://mail-archives.apache.org/mod_mbox/xmlbeans-user/200602.mbox/%3c99479f4d39c9244f8e17e688193a3dd8407...@repbex02.amer.bea.com%3E
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



RE: Question about generating Java Source Code from XML Schemas

2013-08-21 Thread Paul Gillen
As is typical of me I probably don't understand your question or problem
thoroughly.  Well you said you couldn't use Maven so a non-maven response is
what you're getting.  :) 

Typical XmlBeans usage is to generate the classes in a jar and to then
reference this jar while developing your code.  If you can't use Ant or
Maven for some reason there is a command line utility to do this.  I
personally have a little bat file I use for generating demos:
scomp -out lib/%1.jar xsd/%1.xsd
If however there is some reason you have to "compile on the fly" I refer you
to an excellent discussion of doing this:

http://www.oracle.com/technetwork/articles/entarch/incremental-compilation-x
mlbeans-089127.html
Please reply with your use case for this.

As to your questions:
* Why do you get "URL "./th08_extern.xsd" is not well-formed"?  
Possibly because "./th08_extern.xsd" is not well-formed.
Post it and we'll see.  My demo of this worked correctly (see below).
* I want everything XmlBeans generates in the package
"ch.mypackage"; how can I to this? 
This is controlled by the schema namespace setting:
http://www.w3.org/2001/XMLSchema";>
Note that in typical "Computer Science Weenie my way is
better" fashion the namespace is llq.hlq.  XmlBeans will generate classes in
the more typical hlq.llq package.
* Why is this class not generated?
Well, nothing in your posted source showed that you compiled
the generated java files.  Refer to the URL above for more detail.  Or
previously compile using scomp as above.

Cordially,
Paul Gillen


http://www.w3.org/2001/XMLSchema";>











http://www.w3.org/2001/XMLSchema";>







package org.eltesto;

import java.io.File;

import org.apache.xmlbeans.BindingConfig;
import org.apache.xmlbeans.Filer;
import org.apache.xmlbeans.XmlBeans;
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlOptions;
import org.apache.xmlbeans.impl.util.FilerImpl;
import org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument;

public class Main {
public static void main(String[] args) throws Exception {
Main m = new Main();
m.go(args);
}
private void go(String[] args) throws Exception {
File xsd = new File("xsd/Root.xsd");
SchemaDocument xsdo = SchemaDocument.Factory.parse(xsd);


final Filer filer = new FilerImpl(null, new File("src/"),
null, true, true); 
final XmlOptions options = new XmlOptions(); 
options.setCompileDownloadUrls(); 
BindingConfig config = new BindingConfig();
XmlBeans.compileXmlBeans("TypeName", null, new XmlObject[] {
xsdo }, config, null, filer, options);
}
}

-Original Message-
From: Michael Szalay [mailto:michael.sza...@abacus.ch] 
Sent: Wednesday, August 21, 2013 9:39 AM
To: user@xmlbeans.apache.org
Subject: Question about generating Java Source Code from XML Schemas

Hi all

I have some xsd schemas in my source tree and I want to generate java
sources with XML Beans.
I cannot use ant or maven task, I have to do it in plain java.

I use the following java code:

final InputStream schema1Stream =
BeanGenerator.class.getResourceAsStream("xsd/schema1.xsd");
final XmlObject schema1 = XmlObject.Factory.parse(schema1Stream);
final InputStream schema2Stream =
BeanGenerator.class.getResourceAsStream("xsd/schema2.xsd");
final XmlObject schema2 = XmlObject.Factory.parse(schema2Stream);
final XmlObject[] schemas = { schema1, schema2 }; final BindingConfig config
= new BindingConfig() {
   @Override
   public String lookupPackageForNamespace(String uri) {
 return "ch.mypackage";
   }
};

final Filer filer = new FilerImpl(null, new File(".java/src/"), null, true,
true); final XmlOptions options = new XmlOptions();
options.setCompileDownloadUrls(); XmlBeans.compileXmlBeans(null, null,
schemas, config, null, filer, options);


I have questions:

1) The schemas have include statements like this: 

   

How can I make XmlBeans to include this schemas? Its located in the same
folder as the original schema, but XMLBeans does not find it:

URL "./th08_extern.xsd" is not well-formed

how to solve that?

2) I want everything XmlBeans generates in the package "ch.mypackage".
How can I to this? XmlBeans generates a lot of other stuff like xsb files
which are not in that package.

How can I say to XmlBeans to not generate this files?

3) When I use one of the generated classes, there is the following runtime
error:

java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load
class with name
schemaorg_apache_xmlbeans.system.s2EF0617F3F8756BE3

Re: Question about generating Java Source Code from XML Schemas

2013-08-21 Thread Michael Bishop
I think I can answer your first question. From what I recall in
parsing/reading documents, InputStream is a poor choice for XML documents
that include other documents. An InputStream object can't tell you where
its source is. Therefore, there is no way to find relative paths. I would
try the following:

final URL schema1Url = BeanGenerator.class.getResource("xsd/schema1.xsd");
final XmlObject schema1 = XmlObject.Factory.parse(schema1Url);

See if that helps.



On Wed, Aug 21, 2013 at 9:39 AM, Michael Szalay wrote:

> Hi all
>
> I have some xsd schemas in my source tree and I want to generate java
> sources with XML Beans.
> I cannot use ant or maven task, I have to do it in plain java.
>
> I use the following java code:
>
> final InputStream schema1Stream =
> BeanGenerator.class.getResourceAsStream("xsd/schema1.xsd");
> final XmlObject schema1 = XmlObject.Factory.parse(schema1Stream);
> final InputStream schema2Stream =
> BeanGenerator.class.getResourceAsStream("xsd/schema2.xsd");
> final XmlObject schema2 = XmlObject.Factory.parse(schema2Stream);
> final XmlObject[] schemas = { schema1, schema2 };
> final BindingConfig config = new BindingConfig() {
>@Override
>public String lookupPackageForNamespace(String uri) {
>  return "ch.mypackage";
>}
> };
>
> final Filer filer = new FilerImpl(null, new File(".java/src/"), null,
> true, true);
> final XmlOptions options = new XmlOptions();
> options.setCompileDownloadUrls();
> XmlBeans.compileXmlBeans(null, null, schemas, config, null, filer,
> options);
>
>
> I have questions:
>
> 1) The schemas have include statements like this:
>
>
>
> How can I make XmlBeans to include this schemas? Its located in the same
> folder as the original schema, but XMLBeans does not
> find it:
>
> URL "./th08_extern.xsd" is not well-formed
>
> how to solve that?
>
> 2) I want everything XmlBeans generates in the package "ch.mypackage".
> How can I to this? XmlBeans generates a lot of other stuff like xsb
> files which are not in that package.
>
> How can I say to XmlBeans to not generate this files?
>
> 3) When I use one of the generated classes, there is the following
> runtime error:
>
> java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load
> class with name
>
> schemaorg_apache_xmlbeans.system.s2EF0617F3F8756BE32108E3CF22693B4.TypeSystemHolder.
> Make sure the generated binary files are on the classpath.
> at
> org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:783)
> ... 29 more
> Caused by: java.lang.ClassNotFoundException:
>
> schemaorg_apache_xmlbeans.system.s2EF0617F3F8756BE32108E3CF22693B4.TypeSystemHolder
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at
> org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:769)
> ... 30 more
>
> What is the problem here? Why is this class not generated?
>
> Thanks for a response
> Michael
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>


Add to XmlBeans FAQ re orphaned objects and XmlValueDisconnectedException

2013-08-20 Thread Lott, Christopher M
I would like to suggest an addition to page 
http://wiki.apache.org/xmlbeans/XmlBeansFaq but I cannot edit it, so am trying 
the email list.   Please redirect me if I'm sending this to the wrong place. 

Is this Q & A sufficient and clear?  Thanks for listening.


Q: Why am I getting XmlValueDisconnectedException when I try to change an 
XmlObject?

A: The most likely cause is that the XmlObject is an orphan; i.e., it has 
become disassociated from the XML store.  This can happen if you get a 
reference to an object (perhaps by fetching the first item in an array), delete 
the item from the tree (perhaps by calling the array remove method on element 
0), and then try to invoke methods on that reference or any of its child 
elements.  You cannot even invoke the toString() method on an orphaned object!  
If you need to keep a deleted object, make a copy before you delete it. For 
example:

  LineItem nl = 
LineItem.Factory.parse(p.getLineItemArray(0).toString());
  p.removeLineItem(0);


Credit this to Paul Gillen and also the people who posted to a thread in 2006:

http://mail-archives.apache.org/mod_mbox/xmlbeans-user/200602.mbox/%3c99479f4d39c9244f8e17e688193a3dd8407...@repbex02.amer.bea.com%3E
-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



RE: Modifying XmlBeans document without XmlValueDisconnectedException?

2013-08-19 Thread Paul Gillen
If I understand you correctly you are trying to print something you removed;
it gone baby.  If for some reason you need it, preserve a copy, not a
reference.

 

package org.eltesto;

 

import java.io.File;

import java.math.BigDecimal;

import java.math.BigInteger;

 

import org.openuri.easypo.LineItem;

import org.openuri.easypo.PurchaseOrderDocument;

import org.openuri.easypo.PurchaseOrderDocument.PurchaseOrder;

 

public class Main {

   public static void main(String[] args) throws Exception {

  Main m = new Main();

  m.go(args);

   }

   private void go(String[] args) throws Exception {

  File f = new File("easypo.xml");

  PurchaseOrderDocument pd =
PurchaseOrderDocument.Factory.parse(f);

  System.out.println("ORIGINAL\n"+pd.xmlText());

  

  PurchaseOrder p = pd.getPurchaseOrder();

  

  LineItem l = p.addNewLineItem();

  l.setDescription("foo");

  l.setPerUnitOunces(new BigDecimal("1"));

  l.setPrice(new BigDecimal("2"));

  l.setQuantity(new BigInteger("3"));

  System.out.println("\nLINE ITEM ADDED\n"+pd.xmlText());

  

  LineItem nl =
LineItem.Factory.parse(p.getLineItemArray(0).toString());

  

  p.removeLineItem(0);

  System.out.println("\nLINE ITEM DELETED\n"+pd.xmlText());

  

  System.out.println("\nCOPY OF DELETED LINE
ITEM\n"+nl.xmlText());

   }

}

 

Output:

ORIGINAL

http://openuri.org/easypo";>



Gladys Kravitz

Anytown, PA



2003-01-07T14:16:00-05:00



Burnham's Celestial Handbook, Vol 1

5

21.79

2





Burnham's Celestial Handbook, Vol 2

5

19.89

2





ZipShip

0.74





 

LINE ITEM ADDED

http://openuri.org/easypo";>



Gladys Kravitz

Anytown, PA



2003-01-07T14:16:00-05:00



Burnham's Celestial Handbook, Vol 1

5

21.79

2





Burnham's Celestial Handbook, Vol 2

5

19.89

2



 
foo123

ZipShip

0.74





 

LINE ITEM DELETED

http://openuri.org/easypo";>



Gladys Kravitz

Anytown, PA



2003-01-07T14:16:00-05:00





Burnham's Celestial Handbook, Vol 2

5

19.89

2



 
foo123

ZipShip

0.74





 

COPY OF DELETED LINE ITEM

http://openuri.org/easypo";>

  Burnham's Celestial Handbook, Vol 1

  5

  21.79

  2



 

On the other hand I might be completely FOS.  Please let me know if this is
the case.

 

Cordially,

Paul Gillen

 

 

 

-Original Message-
From: Lott, Christopher M [mailto:cl...@appcomsci.com] 
Sent: Monday, August 19, 2013 9:33 PM
To: 
Subject: Re: Modifying XmlBeans document without
XmlValueDisconnectedException?

 

Thanks to Nick B. and Paul G. for their quick replies!  Below is code that
demonstrates, at least superficially, the exception that we get.  We are
doing something wrong in our code; I don't suspect an XmlBeans bug at this
point.  This code is derived from (and depends on the schema and example XML
instance from) the XmlBeans tutorial at
<http://xmlbeans.apache.org/documentation/tutorial_getstarted.html>
http://xmlbeans.apache.org/documentation/tutorial_getstarted.html

 

--

package my.xb.example;

 

import java.io.File;

import java.math.BigDecimal;

import java.math.BigInteger;

 

import org.openuri.easypo.LineItem;

import org.openuri.easypo.PurchaseOrderDocument;

 

public class POUpdater {

public static void main(String[] args) throws Exception {

if (args.length < 5)

throw new Exception("Usage:
inputfile desc ounces price quantity");

File poXmlFile = new File(args[0]);

String updatedPoXml = addLineItem(poXmlFile,
args[1], args[2], args[3],

args[4]);

System.out.println(updatedPoXml);

}

 

private static String addLineItem(File purchaseOrder,

String itemDescription,
String perUnitOuncesString,

String itemPriceString,
String itemQuantityString) throws Exception {



// Read in the file content

PurchaseO

Re: Modifying XmlBeans document without XmlValueDisconnectedException?

2013-08-19 Thread Lott, Christopher M
Thanks to Nick B. and Paul G. for their quick replies!  Below is code that 
demonstrates, at least superficially, the exception that we get.  We are doing 
something wrong in our code; I don't suspect an XmlBeans bug at this point.  
This code is derived from (and depends on the schema and example XML instance 
from) the XmlBeans tutorial at 
http://xmlbeans.apache.org/documentation/tutorial_getstarted.html

--
package my.xb.example;

import java.io.File;
import java.math.BigDecimal;
import java.math.BigInteger;

import org.openuri.easypo.LineItem;
import org.openuri.easypo.PurchaseOrderDocument;

public class POUpdater {
public static void main(String[] args) throws Exception {
if (args.length < 5)
throw new Exception("Usage: inputfile desc ounces price 
quantity");
File poXmlFile = new File(args[0]);
String updatedPoXml = addLineItem(poXmlFile, args[1], args[2], 
args[3],
args[4]);
System.out.println(updatedPoXml);
}

private static String addLineItem(File purchaseOrder,
String itemDescription, String perUnitOuncesString,
String itemPriceString, String itemQuantityString) 
throws Exception {

// Read in the file content
PurchaseOrderDocument poDoc = PurchaseOrderDocument.Factory
.parse(purchaseOrder);

// Convert incoming data to types that can be used in accessors.
BigDecimal perUnitOunces = new BigDecimal(perUnitOuncesString);
BigDecimal itemPrice = new BigDecimal(itemPriceString);
BigInteger itemQuantity = new BigInteger(itemQuantityString);

// Add a new  element.
LineItem newItem = poDoc.getPurchaseOrder().addNewLineItem();
newItem.setDescription(itemDescription);
newItem.setPerUnitOunces(perUnitOunces);
newItem.setPrice(itemPrice);
newItem.setQuantity(itemQuantity);

// Delete the old first line item
LineItem removedItem = 
poDoc.getPurchaseOrder().getLineItemArray(0);
poDoc.getPurchaseOrder().removeLineItem(0);

// Try to access the newly added one; is the ref still good?
System.out.println("new item: " + newItem.toString());
newItem.setDescription(newItem.getDescription() + " fu");

// Try to access the removed one; this throws 
XmlValueDisconnectedException
System.out.println("removed item: " + removedItem.toString());

return poDoc.toString();
}
}




-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



RE: Modifying XmlBeans document without XmlValueDisconnectedException?

2013-08-19 Thread Paul Gillen
Since I think I can answer your question I probably misunderstand it.  :)
However ...

 

Given an XSD:



http://www.w3.org/2001/XMLSchema";>

   

  

 

   

   

 

  

   



 

And XML:



http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="org.eltesto

xsd\Rootie.xsd">

   foo

   bar



 

This program modifies and deletes element DoorNail:

package org.eltesto;

 

import java.io.File;import eltesto.org.RootieDocument;

import eltesto.org.RootieDocument.Rootie;

 

public class Main {

   public static void main(String[] args) throws Exception {

  Main m = new Main();

  m.go(args);

   }

   private void go(String[] args) throws Exception {

  File f = new File("Rootie.xml");

  RootieDocument rd = RootieDocument.Factory.parse(f);

  System.out.println(rd.xmlText());

  Rootie r = rd.getRootie();

  r.setDoorNail("modified");

  System.out.println(rd.xmlText());

  r.unsetDoorNail();

  System.out.println(rd.xmlText());

   }

}

 

Output:

http://www.w3.org/2001/XMLSchema-instance";>

   foo

   bar



 

http://www.w3.org/2001/XMLSchema-instance";>

   foo

   modified



 

http://www.w3.org/2001/XMLSchema-instance";>

   foo

   



 

Note that you only get the "unset." method if the element is declared as
optional, i.e. 'minOccurs="0"' which is as it should be.

 

Cordially,

Paul Gillen

 

 

-Original Message-
From: Lott, Christopher M [mailto:cl...@appcomsci.com] 
Sent: Monday, August 19, 2013 5:33 PM
To: user@xmlbeans.apache.org
Subject: Modifying XmlBeans document without XmlValueDisconnectedException?

 

I tried asking this on StackOverflow, but then realized that this email list
is probably the better place, so please forgive if you read both places.  I
hope someone can please find time to answer.

 

We use XmlBeans, code generated from a schema, to read in an XML instance
that conforms to the schema and modify it.  Read and validate work fine;
modify is killing me.  For example, change the value of an element, delete
an element from a list, etc.  I am using Java method calls like
removeMyElement(i) to remove the element at position (i).  I am not using
Cursors or any low-level DOM access.

 

We thought it would be convenient to walk thru the document, gather a list
of elements (i.e., references to XmlBeans objects) that need to be modified
or nuked, then iterate over the list changing them.  But use of a cached
object reference is where I run into the ditch: I get
XmlValueDisconnectedException.  I read that this means the XmlObject has
become disconnected from its underlying store. But I have not discarded the
Document!

 

Does every change to an XmlObject backed by the XmlBeans XmlStore cause all
existing references to become invalid?  I don't yet have the right mental
model for what's going on when I call the java methods.

 

I checked the XmlBeans FAQ and the sample code for guidelines.  I found many
samples at  
http://xmlbeans.apache.org/samples/ that show how to create an object from
scratch, how to read in XML, how to validate XML, etc.  Unfortunately I
didn't find a sample that does a messy change to the content. The FAQ at

http://wiki.apache.org/xmlbeans/XmlBeansFaq doesn't have a good question on
this either.

 

Thanks in advance.

-

To unsubscribe, e-mail:  
user-unsubscr...@xmlbeans.apache.org

For additional commands, e-mail:  
user-h...@xmlbeans.apache.org

 



Re: Modifying XmlBeans document without XmlValueDisconnectedException?

2013-08-19 Thread Nick Burch

On Mon, 19 Aug 2013, Lott, Christopher M wrote:
We use XmlBeans, code generated from a schema, to read in an XML 
instance that conforms to the schema and modify it.  Read and validate 
work fine; modify is killing me.  For example, change the value of an 
element, delete an element from a list, etc.  I am using Java method 
calls like removeMyElement(i) to remove the element at position (i).  I 
am not using Cursors or any low-level DOM access.


I would have expected that to work, but I'm not an xmlbeans expert

We thought it would be convenient to walk thru the document, gather a 
list of elements (i.e., references to XmlBeans objects) that need to be 
modified or nuked, then iterate over the list changing them.  But use of 
a cached object reference is where I run into the ditch: I get 
XmlValueDisconnectedException.  I read that this means the XmlObject has 
become disconnected from its underlying store. But I have not discarded 
the Document!


Are you able to produce a very small unit test (possibly with a dummy 
schema file) that shows up the problem? People may have more luck in 
understanding your problem if they can look at some code. If not, at least 
the "produce a unit test for the bug" part is covered!


Nick

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Getting XMLBeans out of Attic

2013-07-29 Thread Nick Burch

On Mon, 29 Jul 2013, Daniel Lübke wrote:
I have talked to the Apache ODE PMC Chair Tammo van Lessen how we can 
get things running again, i.e. which Apache rules are there etc. I will 
keep you updated.


As I understand it, the responsibility for the project has been moved to 
the Apache Attic PMC, but no-one from there has yet had the time to action 
the move. So, I think you probably want to get in touch with the Attic 
PMC[1], let them know there's a move to reboot the pmc, and ask them for 
their advice on how to do that


Nick
[1] http://mail-archives.apache.org/mod_mbox/attic-general/

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org

Re: Getting XMLBeans out of Attic

2013-07-29 Thread Daniel Lübke

Hi,

sorry for not replying immediately. We have now 7 persons who would be 
willing to join a new PMC:


Jacob Danner (already committer)
Jerry Sy
Pascal Heus
Jack Gager
Harring Figueiredo
Serkan Tas
Daniel Lübke (me)

I have talked to the Apache ODE PMC Chair Tammo van Lessen how we can 
get things running again, i.e. which Apache rules are there etc. I will 
keep you updated.


Are there any other committers (except for Jacob) who would continue to 
contribute to this project?


Regards,
Daniel

Am 23.07.2013 17:29, schrieb Daniel Lübke:

Hi list,

I am a long-time user of XMLBeans, most of the time as part of the 
BPELUnit project. There is no replacement to XMLBeans because in 
contrast to JAXB if preserves namespace declarations so you e.g. read 
and write XML document that contain XPath expressions (e.g. BPEL, 
BPMN2, ...).


Although I know XMLBeans only from the user perspective, I would 
contribute to it, which includes learning more of its internals, apply 
the outstanding patches, test them and so on.


As far as I understand the Apache rules a project needs to have a 
working PMC. This means at least 3 people (for substitution 4 or 5 
would be better) which vote on releases. I also would join a new PMC 
if 3 other would be willing to join me and at least build regular 
maintainance releases to keep this project alive and reboot its PMC.


I know that many other projects use XMLBeans, e.g. Apache Camel, 
Apache CXX Apache ODE, ... and many non-Apache projects, too. So I 
hope that we can find enough interested people to keep this project 
alive.


If you are one of them, please reply to this list. If we are enough 
people, I would try to talk to the Apache Foundation.


Regards,
Daniel

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Getting XMLBeans out of Attic

2013-07-26 Thread s t


> We are using the library for 3 years, after castor. 
> 
> I may participate.
> 
> 24 Tem 2013 tarihinde 22:50 saatinde, jerry...@oracle.com şunları yazdı:
> 
>> Hi Daniel,
>> 
>> Please count me in.
>> 
>> Thanks
>> Jerry
>> 
>> On 7/23/2013 8:29 AM, Daniel Lübke wrote:
>>> Hi list,
>>> 
>>> I am a long-time user of XMLBeans, most of the time as part of the BPELUnit 
>>> project. There is no replacement to XMLBeans because in contrast to JAXB if 
>>> preserves namespace declarations so you e.g. read and write XML document 
>>> that contain XPath expressions (e.g. BPEL, BPMN2, ...).
>>> 
>>> Although I know XMLBeans only from the user perspective, I would contribute 
>>> to it, which includes learning more of its internals, apply the outstanding 
>>> patches, test them and so on.
>>> 
>>> As far as I understand the Apache rules a project needs to have a working 
>>> PMC. This means at least 3 people (for substitution 4 or 5 would be better) 
>>> which vote on releases. I also would join a new PMC if 3 other would be 
>>> willing to join me and at least build regular maintainance releases to keep 
>>> this project alive and reboot its PMC.
>>> 
>>> I know that many other projects use XMLBeans, e.g. Apache Camel, Apache CXX 
>>> Apache ODE, ... and many non-Apache projects, too. So I hope that we can 
>>> find enough interested people to keep this project alive.
>>> 
>>> If you are one of them, please reply to this list. If we are enough people, 
>>> I would try to talk to the Apache Foundation.
>>> 
>>> Regards,
>>> Daniel
>>> 
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>> 
>> 
> 
> 
> 
> 
> 
> Serkan Taş
> Likya Bilgi Teknolojileri
> ve İletişim Hiz. Ltd. Şti.
> www.likyateknoloji.com
>  
> Tel :+ 90 216 471 81 55 - 117
> Gsm : + 90 542 242 00 92
> Faks:  + 90 216 661 14 92
>  
> --
> Bu elektronik posta ve onunla iletilen bütün dosyalar gizlidir. Sadece 
> yukarıda isimleri belirtilen kişiler arasında özel haberleşme amacını 
> taşımaktadır. Size yanlışlıkla ulaşmışsa bu elektonik postanın içeriğini 
> açıklamanız, kopyalamanız, yönlendirmeniz ve kullanmanız kesinlikle yasaktır. 
> Lütfen mesajı geri gönderiniz ve sisteminizden siliniz. Likya Bilgi 
> Teknolojileri ve İletişim Hiz. Ltd. Şti. bu mesajın içeriği ile ilgili olarak 
> hiç bir hukuksal sorumluluğu kabul etmez.
>  
> This electronic mail and any files transmitted with it are intended for the 
> private use of  the persons named above. If you received this message in 
> error, forwarding, copying or use of any of the information is strictly 
> prohibited. Please immediately notify the sender and delete it from your 
> system. Likya Bilgi Teknolojileri ve İletişim Hiz. Ltd. Şti. does not accept 
> legal responsibility for the contents of this message.
> --
> 
> 
> 
> 
> 
> P
> Bu e-postayı yazdırmadan önce, çevreye olan sorumluluğunuzu tekrar düşünün.
> Please consider your environmental responsibility before printing this e-mail.
>  
> 


Re: Getting XMLBeans out of Attic

2013-07-26 Thread Harring Figueiredo
Add myself as well, please.

Thank you,

Harring Figueiredo


On Fri, Jul 26, 2013 at 9:15 AM, Pascal Heus  wrote:

> Daniel:
> You can add myself and my colleague Jack Gager
> (j.ga...@metadatatechnology.com) to the list.
> best
> *P
>
> On 7/24/13 9:50 PM, jerry...@oracle.com wrote:
> > Hi Daniel,
> >
> > Please count me in.
> >
> > Thanks
> > Jerry
> >
> > On 7/23/2013 8:29 AM, Daniel Lübke wrote:
> >> Hi list,
> >>
> >> I am a long-time user of XMLBeans, most of the time as part of the
> >> BPELUnit project. There is no replacement to XMLBeans because in
> >> contrast to JAXB if preserves namespace declarations so you e.g. read
> >> and write XML document that contain XPath expressions (e.g. BPEL,
> >> BPMN2, ...).
> >>
> >> Although I know XMLBeans only from the user perspective, I would
> >> contribute to it, which includes learning more of its internals,
> >> apply the outstanding patches, test them and so on.
> >>
> >> As far as I understand the Apache rules a project needs to have a
> >> working PMC. This means at least 3 people (for substitution 4 or 5
> >> would be better) which vote on releases. I also would join a new PMC
> >> if 3 other would be willing to join me and at least build regular
> >> maintainance releases to keep this project alive and reboot its PMC.
> >>
> >> I know that many other projects use XMLBeans, e.g. Apache Camel,
> >> Apache CXX Apache ODE, ... and many non-Apache projects, too. So I
> >> hope that we can find enough interested people to keep this project
> >> alive.
> >>
> >> If you are one of them, please reply to this list. If we are enough
> >> people, I would try to talk to the Apache Foundation.
> >>
> >> Regards,
> >> Daniel
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> >> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> > For additional commands, e-mail: user-h...@xmlbeans.apache.org
> >
> >
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>


Re: Getting XMLBeans out of Attic

2013-07-26 Thread Pascal Heus
Daniel:
You can add myself and my colleague Jack Gager
(j.ga...@metadatatechnology.com) to the list.
best
*P

On 7/24/13 9:50 PM, jerry...@oracle.com wrote:
> Hi Daniel,
>
> Please count me in.
>
> Thanks
> Jerry
>
> On 7/23/2013 8:29 AM, Daniel Lübke wrote:
>> Hi list,
>>
>> I am a long-time user of XMLBeans, most of the time as part of the
>> BPELUnit project. There is no replacement to XMLBeans because in
>> contrast to JAXB if preserves namespace declarations so you e.g. read
>> and write XML document that contain XPath expressions (e.g. BPEL,
>> BPMN2, ...).
>>
>> Although I know XMLBeans only from the user perspective, I would
>> contribute to it, which includes learning more of its internals,
>> apply the outstanding patches, test them and so on.
>>
>> As far as I understand the Apache rules a project needs to have a
>> working PMC. This means at least 3 people (for substitution 4 or 5
>> would be better) which vote on releases. I also would join a new PMC
>> if 3 other would be willing to join me and at least build regular
>> maintainance releases to keep this project alive and reboot its PMC.
>>
>> I know that many other projects use XMLBeans, e.g. Apache Camel,
>> Apache CXX Apache ODE, ... and many non-Apache projects, too. So I
>> hope that we can find enough interested people to keep this project
>> alive.
>>
>> If you are one of them, please reply to this list. If we are enough
>> people, I would try to talk to the Apache Foundation.
>>
>> Regards,
>> Daniel
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>


-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Getting XMLBeans out of Attic

2013-07-24 Thread jerry . sy

Hi Daniel,

Please count me in.

Thanks
Jerry

On 7/23/2013 8:29 AM, Daniel Lübke wrote:

Hi list,

I am a long-time user of XMLBeans, most of the time as part of the 
BPELUnit project. There is no replacement to XMLBeans because in 
contrast to JAXB if preserves namespace declarations so you e.g. read 
and write XML document that contain XPath expressions (e.g. BPEL, 
BPMN2, ...).


Although I know XMLBeans only from the user perspective, I would 
contribute to it, which includes learning more of its internals, apply 
the outstanding patches, test them and so on.


As far as I understand the Apache rules a project needs to have a 
working PMC. This means at least 3 people (for substitution 4 or 5 
would be better) which vote on releases. I also would join a new PMC 
if 3 other would be willing to join me and at least build regular 
maintainance releases to keep this project alive and reboot its PMC.


I know that many other projects use XMLBeans, e.g. Apache Camel, 
Apache CXX Apache ODE, ... and many non-Apache projects, too. So I 
hope that we can find enough interested people to keep this project 
alive.


If you are one of them, please reply to this list. If we are enough 
people, I would try to talk to the Apache Foundation.


Regards,
Daniel

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Getting XMLBeans out of Attic

2013-07-24 Thread Nick Burch

On Wed, 24 Jul 2013, Pascal Heus wrote:

We're using XmlBeans quite a bit and are interested to keep this alive
as well. Would be great to have more information around the Apache
rules/processes, PMC, roles/responsibilities, etc. to understand how we
could support the project.


The Apache Community Development project has quite a bit of information on 
that: http://community.apache.org/


If you look online, you'll find quite a few "The Apache Way" talks as 
slides or videos, which will explain a lot of that, if you prefer to learn 
from talks


Nick

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Getting XMLBeans out of Attic

2013-07-24 Thread Pascal Heus
Daniel and all:
We're using XmlBeans quite a bit and are interested to keep this alive
as well. Would be great to have more information around the Apache
rules/processes, PMC, roles/responsibilities, etc. to understand how we
could support the project.
best
*P

On 7/23/13 5:29 PM, Daniel Lübke wrote:
> Hi list,
>
> I am a long-time user of XMLBeans, most of the time as part of the
> BPELUnit project. There is no replacement to XMLBeans because in
> contrast to JAXB if preserves namespace declarations so you e.g. read
> and write XML document that contain XPath expressions (e.g. BPEL,
> BPMN2, ...).
>
> Although I know XMLBeans only from the user perspective, I would
> contribute to it, which includes learning more of its internals, apply
> the outstanding patches, test them and so on.
>
> As far as I understand the Apache rules a project needs to have a
> working PMC. This means at least 3 people (for substitution 4 or 5
> would be better) which vote on releases. I also would join a new PMC
> if 3 other would be willing to join me and at least build regular
> maintainance releases to keep this project alive and reboot its PMC.
>
> I know that many other projects use XMLBeans, e.g. Apache Camel,
> Apache CXX Apache ODE, ... and many non-Apache projects, too. So I
> hope that we can find enough interested people to keep this project
> alive.
>
> If you are one of them, please reply to this list. If we are enough
> people, I would try to talk to the Apache Foundation.
>
> Regards,
> Daniel
>
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>


-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Project still maintained?

2013-07-23 Thread mARK aNDREWS
Hi all,

I have been working for a Charity for the last 5 years, and we are using
XMLBeans for Marshalling web service calls to Java with Spring-ws.

These has been a very successful approach and have had no real issues with
it.  I know it counts for little, but It would be a massive shame if the
project was to die.

mARK aNDREWS

m/|RK aNDREWS

website: http://www.mraandrews.co.uk
photos:  http://www.flickr.com/photos/mraandrews
twitter:   http://www.twitter.com/mraandrews


On 23 July 2013 14:36, Pascal Heus  wrote:

>  We're using XmlBeans in several of our projects and haven't found
> anything else out there that does the job like it, particularly when it
> comes to dealing with substitution groups and other advanced schema
> features. Would very much like to see this stay out of the attic!
> best
> *P
>
>
> On 7/23/13 3:26 PM, Elvis Stansvik wrote:
>
> 2013/7/23 Bill Stafford 
>
>>  Peter Keller is correct, VTD is no substitute for XMLBeans.  I would
>> class the email suggesting that it was as spam.
>>
>> The next best approach, if XMLBeans is not an option, would be JAXB.  But
>> JAXB is nothing like XMLBeans so I would not call JAXB an equivalent, just
>> a substitute.
>>
>
>  Since I wrote my first mail I've switched over to JAXB, which is
> sufficient for my quite simple needs. But I still feel it's sad that
> XMLBeans has been left unmaintained. But I guess it's a fact of life.
>
>  Regards,
> Elvis
>
>
>>
>>
>> -=bill  stafford
>>
>
>
>


Re: Project still maintained?

2013-07-23 Thread Pascal Heus
We're using XmlBeans in several of our projects and haven't found
anything else out there that does the job like it, particularly when it
comes to dealing with substitution groups and other advanced schema
features. Would very much like to see this stay out of the attic!
best
*P

On 7/23/13 3:26 PM, Elvis Stansvik wrote:
> 2013/7/23 Bill Stafford  >
>
> Peter Keller is correct, VTD is no substitute for XMLBeans.  I
> would class the email suggesting that it was as spam.
>
> The next best approach, if XMLBeans is not an option, would be
> JAXB.  But JAXB is nothing like XMLBeans so I would not call JAXB
> an equivalent, just a substitute.
>
>
> Since I wrote my first mail I've switched over to JAXB, which is
> sufficient for my quite simple needs. But I still feel it's sad that
> XMLBeans has been left unmaintained. But I guess it's a fact of life.
>
> Regards,
> Elvis
>  
>
>  
>
> -=bill  stafford
>
>



Re: Project still maintained?

2013-07-23 Thread Elvis Stansvik
2013/7/23 Bill Stafford 

> Peter Keller is correct, VTD is no substitute for XMLBeans.  I would class
> the email suggesting that it was as spam.
>
> The next best approach, if XMLBeans is not an option, would be JAXB.  But
> JAXB is nothing like XMLBeans so I would not call JAXB an equivalent, just
> a substitute.
>

Since I wrote my first mail I've switched over to JAXB, which is sufficient
for my quite simple needs. But I still feel it's sad that XMLBeans has been
left unmaintained. But I guess it's a fact of life.

Regards,
Elvis


> 
>
> ** **
>
> -=bill  stafford
>


re: Project still maintained?

2013-07-23 Thread Bill Stafford
Peter Keller is correct, VTD is no substitute for XMLBeans.  I would class the 
email suggesting that it was as spam.
The next best approach, if XMLBeans is not an option, would be JAXB.  But JAXB 
is nothing like XMLBeans so I would not call JAXB an equivalent, just a 
substitute.

-=bill  stafford


Re: Project still maintained?

2013-07-23 Thread Peter Keller
On Mon, 2013-07-22 at 14:16 -0500, jzh...@ximpleware.com wrote:
> I think vtd-xml is quite comparable to xml bean,...

Looking at the vtd-xml web site on sourceforge, I am struggling to see
much similarity with XMLBeans beyond the superficial one that they both
operate on XML-format data. From my point of view the most significant
difference is that XMLBeans generates a domain-specific API from XML
Schemata, which is done before any XML data can be processed. vtd-xml
presents a generic API to parse and index XML data directly, without
reference to any user/developer-written external entities that define
the structure of the XML data.

Put another way, XMLBeans is all about data integrity, strong and static
typing, validation against external domain-specific data definitions,
and access paths to data that are derived from those external
definitions. vtd-xml is all about efficiency and optimising generic
access to XML data.

Another difference is that in order to distribute applications using
vtd-xml under a non-GPL licence you have to get a commercial licence
from XimpleWare. XMLBeans is distributed under the Apache licence which
is much more permissive.

> 
> 
> - Original Message -
> From:
> user@xmlbeans.apache.org
> 
> To:
> 
> Cc:
> 
> Sent:
> Mon, 22 Jul 2013 13:46:37 -0400
> Subject:
> Re: Project still maintained?
> 
> 
> This is awfully unfortunate. To my knowledge, there's no
> comparable product out there. We're still struggling with a
> few XMLBeans issues that we've had to go to straight DOM to
> work around. I was hoping that future releases would address
> some of these issues, but it doesn't appear to be the case.

Certainly, the reference JAXB implementation doesn't come close, at
least when I tried it last. I was bitten badly by the loss of typing
when every instance of a subtype of IDREF just became a reference to
java.lang.Object. XMLBeans excels in its handling of this kind of thing.

The last time I looked around, the closest thing that I found to
XMLBeans was EclipseLink MOXy. IIRC one of the MOXy developers pointed
out the similarity on this list. Having said that, I fully agree with
others on this thread that it is a real pity that XMLBeans has reached
this state, and would much prefer to see it remain live and at least
maintained, even without development of new features. I don't have a
huge amount of time or advanced expertise to contribute right now,
ironically this is partly because we are just starting a new project
that uses XMLBeans. Porting earlier XMLBeans work to something like MOXy
for this project would be a big task. Also, if I understand the
situation correctly, it would introduce requirements for Eclipse
components at the build stage that use MOXy. These requirements don't
exist with XMLBeans: I can build the API+extensions and bundle them up
with nothing more than a JDK and Saxon, together with ant or some basic
scripting.

I am sure that I could find some time to make a few contributions at the
coding/debugging level. Like others, I have my pet gripes that I would
like to see fixed (such as support for covariant return types that I
have to work around in awful hacky ways, and better handling of
Extension Interfaces). The timing is very bad for me to even consider
taking on a substantial role though.

Regards,
Peter.

-- 
Peter Keller Tel.: +44 (0)1223 353033
Global Phasing Ltd., Fax.: +44 (0)1223 366889
Sheraton House,
Castle Park,
Cambridge CB3 0AX
United Kingdom



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Project still maintained?

2013-07-22 Thread jzhang
I think vtd-xml is quite comparable to xml bean,...

- Original Message -
From: user@xmlbeans.apache.org
To:
Cc:
Sent:Mon, 22 Jul 2013 13:46:37 -0400
Subject:Re: Project still maintained?

This is awfully unfortunate. To my knowledge, there's no comparable
product out there. We're still struggling with a few XMLBeans issues
that we've had to go to straight DOM to work around. I was hoping that
future releases would address some of these issues, but it doesn't
appear to be the case.

Michael

On Mon, Jul 22, 2013 at 1:44 PM, Elvis Stansvik  wrote:
2013/7/22 Jacob Danner 
 Hi Elvis,The XMLBeans project is in the process of moving to the
attichttp://www.mail-archive.com/dev%40xmlbeans.apache.org/msg02815.html
[3] 
Ah I should have suspected that. That's bad news to me, but
understandable. I had a small patch I was hoping to get into a 2.6.1
release.
Thanks for the quick response.  
Elvis

-jacobd

On Mon, Jul 22, 2013 at 10:28 AM, Elvis Stansvik  wrote:
Hi folks,
I had a look at the bugs reported over the past 6 months (496-503)
[1]. None of these 7 bugs have been assigned to anyone, and none have
been commented on by a commiter/maintainer. 
Most of them are fairly well described and have test cases/good
description, or at least an idea of a fix. Two of them include actual
patches. One of them seems to be a dupe.
 So my question is: Is the project still maintained? 
Not complaining, just interested in what the status is, since use
XMLBeans and like it a lot.
Best regards,Elvis Stansvik
[1] 
https://issues.apache.org/jira/issues/?jql=project%20%3D%20XMLBEANS%20AND%20created%20%3E%3D%202013-01-01%20AND%20created%20%3C%3D%202013-07-22%20ORDER%20BY%20created%20DESC%2C%20key%20DESC
[5]  

 

Links:
--
[1] mailto:elvst...@gmail.com
[2] mailto:jacob.dan...@gmail.com
[3]
http://www.mail-archive.com/dev%40xmlbeans.apache.org/msg02815.html
[4] mailto:elvst...@gmail.com
[5]
https://issues.apache.org/jira/issues/?jql=project%20%3D%20XMLBEANS%20AND%20created%20%3E%3D%202013-01-01%20AND%20created%20%3C%3D%202013-07-22%20ORDER%20BY%20created%20DESC%2C%20key%20DESC



Re: Project still maintained?

2013-07-22 Thread Michael Bishop
If I knew the first thing about most of the issues, I'd be more help.
XMLBeans has helped me learn a few things about XML and schemas in general.
Most of our issues are "high level"; i.e., not just minor bug fixes. For
those interested:

- Documentation on getting XMLBeans to run on the NetBeans platform and/or
an OSGi container would be helpful. With JARs in different modules,
XMLBeans can't find dependent libraries (i.e., finding Saxon to do XPath
queries).

- XMLBeans is advertised as DOM Level 2 compliant, but that doesn't seem to
include the DOM Level 2 event model. In the grand scheme of things, there's
no way I'm aware of to listen for add/edit/remove events in XMLBeans. We've
ended up writing our own and firing the events as needed.

- XML Digital Signatures requires that ID attributes be identified as xs:ID
attributes in the schema. XMLBeans' DOM doesn't support this as it's a DOM
Level 3 feature. Digitally signing documents requires us to reparse the
document as DOM.


If I had the ability to address some of these issues or even provide
guidance, I'd do so. My knowledge to date is that of an end user; I
understand the problem, but not a path to the solution.


On Mon, Jul 22, 2013 at 2:00 PM, Nick Burch  wrote:

> On Mon, 22 Jul 2013, Michael Bishop wrote:
>
>> This is awfully unfortunate. To my knowledge, there's no comparable
>> product out there. We're still struggling with a few XMLBeans issues that
>> we've had to go to straight DOM to work around. I was hoping that future
>> releases would address some of these issues, but it doesn't appear to be
>> the case.
>>
>
> The project is set to go to the attic as there aren't enough people around
> (on the current PMC) to help maintain it.
>
> If there are new volunteers to help look after it, then it could be saved
> from the attic! If you might be interested in this role, now might be the
> time to read through the resources on http://www.apache.org/dev/ to work
> out what you'd be getting yourself in for, then put yourself forward
>
> Nick
> (Who's not on the XMLBeans PMC, but is on other ones)
>
> --**--**-
> To unsubscribe, e-mail: 
> user-unsubscribe@xmlbeans.**apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>


RE: Project still maintained?

2013-07-22 Thread Paul Gillen
The spirit is willing but the coding skills are weak.

Cordially,
Paul Gillen


-Original Message-
From: Nick Burch [mailto:apa...@gagravarr.org] 
Sent: Monday, July 22, 2013 2:00 PM
To: user@xmlbeans.apache.org
Subject: Re: Project still maintained?

On Mon, 22 Jul 2013, Michael Bishop wrote:
> This is awfully unfortunate. To my knowledge, there's no comparable 
> product out there. We're still struggling with a few XMLBeans issues 
> that we've had to go to straight DOM to work around. I was hoping that 
> future releases would address some of these issues, but it doesn't 
> appear to be the case.

The project is set to go to the attic as there aren't enough people around
(on the current PMC) to help maintain it.

If there are new volunteers to help look after it, then it could be saved
from the attic! If you might be interested in this role, now might be the
time to read through the resources on http://www.apache.org/dev/ to work out
what you'd be getting yourself in for, then put yourself forward

Nick
(Who's not on the XMLBeans PMC, but is on other ones)

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Project still maintained?

2013-07-22 Thread Nick Burch

On Mon, 22 Jul 2013, Michael Bishop wrote:
This is awfully unfortunate. To my knowledge, there's no comparable 
product out there. We're still struggling with a few XMLBeans issues 
that we've had to go to straight DOM to work around. I was hoping that 
future releases would address some of these issues, but it doesn't 
appear to be the case.


The project is set to go to the attic as there aren't enough people around 
(on the current PMC) to help maintain it.


If there are new volunteers to help look after it, then it could be saved 
from the attic! If you might be interested in this role, now might be the 
time to read through the resources on http://www.apache.org/dev/ to work 
out what you'd be getting yourself in for, then put yourself forward


Nick
(Who's not on the XMLBeans PMC, but is on other ones)

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Project still maintained?

2013-07-22 Thread Elvis Stansvik
2013/7/22 Jacob Danner 

> Hi Elvis,
> The XMLBeans project is in the process of moving to the attic
> http://www.mail-archive.com/dev%40xmlbeans.apache.org/msg02815.html
>

Ah I should have suspected that. That's bad news to me, but understandable.
I had a small patch I was hoping to get into a 2.6.1 release.

Thanks for the quick response.

Elvis


> -jacobd
>
>
> On Mon, Jul 22, 2013 at 10:28 AM, Elvis Stansvik wrote:
>
>> Hi folks,
>>
>> I had a look at the bugs reported over the past 6 months (496-503) [1].
>> None of these 7 bugs have been assigned to anyone, and none have been
>> commented on by a commiter/maintainer.
>>
>> Most of them are fairly well described and have test cases/good
>> description, or at least an idea of a fix. Two of them include actual
>> patches. One of them seems to be a dupe.
>>
>> So my question is: Is the project still maintained?
>>
>> Not complaining, just interested in what the status is, since use
>> XMLBeans and like it a lot.
>>
>> Best regards,
>> Elvis Stansvik
>>
>> [1]
>> https://issues.apache.org/jira/issues/?jql=project%20%3D%20XMLBEANS%20AND%20created%20%3E%3D%202013-01-01%20AND%20created%20%3C%3D%202013-07-22%20ORDER%20BY%20created%20DESC%2C%20key%20DESC
>>
>
>


Re: Project still maintained?

2013-07-22 Thread Michael Bishop
This is awfully unfortunate. To my knowledge, there's no comparable product
out there. We're still struggling with a few XMLBeans issues that we've had
to go to straight DOM to work around. I was hoping that future releases
would address some of these issues, but it doesn't appear to be the case.

Michael


On Mon, Jul 22, 2013 at 1:44 PM, Elvis Stansvik  wrote:

> 2013/7/22 Jacob Danner 
>
>> Hi Elvis,
>> The XMLBeans project is in the process of moving to the attic
>> http://www.mail-archive.com/dev%40xmlbeans.apache.org/msg02815.html
>>
>
> Ah I should have suspected that. That's bad news to me, but
> understandable. I had a small patch I was hoping to get into a 2.6.1
> release.
>
> Thanks for the quick response.
>
> Elvis
>
>
>> -jacobd
>>
>>
>> On Mon, Jul 22, 2013 at 10:28 AM, Elvis Stansvik wrote:
>>
>>> Hi folks,
>>>
>>> I had a look at the bugs reported over the past 6 months (496-503) [1].
>>> None of these 7 bugs have been assigned to anyone, and none have been
>>> commented on by a commiter/maintainer.
>>>
>>> Most of them are fairly well described and have test cases/good
>>> description, or at least an idea of a fix. Two of them include actual
>>> patches. One of them seems to be a dupe.
>>>
>>> So my question is: Is the project still maintained?
>>>
>>> Not complaining, just interested in what the status is, since use
>>> XMLBeans and like it a lot.
>>>
>>> Best regards,
>>> Elvis Stansvik
>>>
>>> [1]
>>> https://issues.apache.org/jira/issues/?jql=project%20%3D%20XMLBEANS%20AND%20created%20%3E%3D%202013-01-01%20AND%20created%20%3C%3D%202013-07-22%20ORDER%20BY%20created%20DESC%2C%20key%20DESC
>>>
>>
>>
>


RE: Project still maintained?

2013-07-22 Thread Paul Gillen
Once again simplicity, utility, and elegance lose out.

 

Cordially,

Paul Gillen

  _  

 

From: Jacob Danner [mailto:jacob.dan...@gmail.com] 
Sent: Monday, July 22, 2013 1:38 PM
To: user@xmlbeans.apache.org
Subject: Re: Project still maintained?

 

Hi Elvis,

The XMLBeans project is in the process of moving to the attic

http://www.mail-archive.com/dev%40xmlbeans.apache.org/msg02815.html

-jacobd

 

On Mon, Jul 22, 2013 at 10:28 AM, Elvis Stansvik  wrote:

Hi folks,

 

I had a look at the bugs reported over the past 6 months (496-503) [1]. None
of these 7 bugs have been assigned to anyone, and none have been commented
on by a commiter/maintainer.

 

Most of them are fairly well described and have test cases/good description,
or at least an idea of a fix. Two of them include actual patches. One of
them seems to be a dupe.

 

So my question is: Is the project still maintained?

 

Not complaining, just interested in what the status is, since use XMLBeans
and like it a lot.

 

Best regards,

Elvis Stansvik

 

[1]
https://issues.apache.org/jira/issues/?jql=project%20%3D%20XMLBEANS%20AND%20
created%20%3E%3D%202013-01-01%20AND%20created%20%3C%3D%202013-07-22%20ORDER%
20BY%20created%20DESC%2C%20key%20DESC

 



Re: Project still maintained?

2013-07-22 Thread Jacob Danner
Hi Elvis,
The XMLBeans project is in the process of moving to the attic
http://www.mail-archive.com/dev%40xmlbeans.apache.org/msg02815.html
-jacobd


On Mon, Jul 22, 2013 at 10:28 AM, Elvis Stansvik  wrote:

> Hi folks,
>
> I had a look at the bugs reported over the past 6 months (496-503) [1].
> None of these 7 bugs have been assigned to anyone, and none have been
> commented on by a commiter/maintainer.
>
> Most of them are fairly well described and have test cases/good
> description, or at least an idea of a fix. Two of them include actual
> patches. One of them seems to be a dupe.
>
> So my question is: Is the project still maintained?
>
> Not complaining, just interested in what the status is, since use XMLBeans
> and like it a lot.
>
> Best regards,
> Elvis Stansvik
>
> [1]
> https://issues.apache.org/jira/issues/?jql=project%20%3D%20XMLBEANS%20AND%20created%20%3E%3D%202013-01-01%20AND%20created%20%3C%3D%202013-07-22%20ORDER%20BY%20created%20DESC%2C%20key%20DESC
>


Re: Java source escaping

2013-01-31 Thread Dridi Boukelmoune
Hi Andreas,

Thanks, again, though it's the answer I feared :)

I'm really puzzled that it even works on Solaris and I don't
understand why it behaves differently on Linux. I'll try to browse the
source code to understand how the code is generated.

Best Regards,
Dridi

On Thu, Jan 31, 2013 at 3:39 PM, Andreas Loew  wrote:
> Hi again, Dridi,
>
> see below for more comments... ;-)
>
> Am 28.01.2013 15:43, schrieb Dridi Boukelmoune:
>
>> Hi Andreas,
>>
>> Thank you for your quick answer. I didn't want to go too deep on the
>> details but I guess I have to :)
>
> I fear so...
>
>
>> On Mon, Jan 28, 2013 at 3:14 PM, Andreas Loew 
>> wrote:
>>>
>>> Hi Dridi,
>>>
>>> Am 28.01.2013 14:57, schrieb Dridi Boukelmoune:
>>>
 I'm having trouble building a project on Linux because of the classes
 generated by XmlBeans. The build works properly on a Solaris platform
 using the same tools:

 Java : Hotspot 1.5.0_16
 Ant : 1.6.5
 XmlBeans: 2.3.1.0

 For the XmlBeans version, it comes with Weblogic 10.0:
 com.bea.core.xml.beaxmlbeans_2.3.1.0.jar
 com.bea.core.xquery.xmlbeans-interop_1.0.0.0.jar
 com.bea.core.xquery.beaxmlbeans-interop_1.0.0.0.jar
 com.bea.core.xml.xmlbeans_2.3.1.0.jar

 I hope my problem is not related to Weblogic's version.
>>>
>>> I don't think so (see below for the details) - I rather tend to think
>>> that
>>> this is a locale/encoding issue in the XSD and/or between those
>>> platforms.
>>>
>>>
 So I have an XSD file containing something like:
 
   
   
   ...
   
 

 With Linux, I get this output:
 static final Enum A_CLICHÉ = Enum.forString("A cliché");

 On the other hand, it produces this on Solaris:
 static final Enum A_CLICH\311 = Enum.forString("A clich\351");

 The java source code generated on Linux doesn't compile because of an
 encoding mess I can't address now, so I'm currently trying to
 understand how the code is generated. I haven't found yet which option
 leads to either one or the other output that could have different
 defaults based on the platform.

 I hope someone can help me on this one.
>>>
>>> Most probably, sorting out your locale/character encoding issues should
>>> solve the issue.
>>>
>>> First and foremost: Does the XSD in question with the French é include an
>>> encoding declaration? Such as
>>>
>>> 
>>> 
>>>  (...)
>>> 
>>
>> Yes it states a wrong UTF-8 encoding when it's actually ISO-8859-15.
>
> Hmm - further below you state you must not modify the source - which
> definitely is needed, because the encoding given in the XSD (if present)
> explicitly overrides any locales detected from the environment.
>
> I was initially assuming that your XSD might not have specified any encoding
> - but if it does, and does so wrongly, clearly this is what needs to be
> changed...
>
> If you must not modify the source, you need the people who are indeed
> maintaining this code to do so. I am not aware of any other workaround to
> override a wrong encoding declaration given in an XSD. That does not make
> real sense, as typically (other than in your very specific situation), the
> simple and easy solution just is to correct the XSD to specify the proper
> encoding...
>
>
>>> If it does not, you need to explicitly mention the appropriate encoding
>>> of
>>> that file in this place to make this portable.
>>>
>>> If you don't, I expect the XMLBeans code generator to use the system's
>>> default locale, which will be calculated on Unix platforms from
>>> environment
>>> variables such as LANG, LC_CTYPE etc.?
>>
>> LANG and LC_CTYPE are used, and part of the encoding mess I was
>> talking about. A mess because the locale names aren't the same on
>> Solaris and Linux (locale -a | grep fr_FR). And a mess because we have
>> a (complicated) shell script that drives the ant build a prepares a
>> proper environment depending on the project we're building.
>
> Indeed. IMO, your build file should unfortunately need to explicitily handle
> these subtle differences if you want to use it on Solaris and Linux,
> regardless of the fact that even selecting the proper platform LANG /
> LC_CTYPE etc. values won't fix the wrong encoding in the XSD type of issue,
> but will make the rest of the build run in a reproducible way.
>
>
>>> Do you call scomp from the command line, or do you use Ant or Maven to
>>> call
>>> the code generator?
>>
>> That would be ant.
>
> Which would be able to take explicit Java encoding as "-D" command line
> parameter to the ant JVM, but the much better way to fix this is by fixing
> the build file to use correct Unix NLS (LANG /LC_CTYPE etc.) settings.
>
>
>>> Also, how did you transport/copy the source code from the Solaris to the
>>> Linux machine? Did you copy files in binary mode, or using scp (which
>>> might
>>> have done recoding of text files on the fly based on language/encod

Re: Java source escaping

2013-01-31 Thread Andreas Loew

Hi again, Dridi,

see below for more comments... ;-)

Am 28.01.2013 15:43, schrieb Dridi Boukelmoune:

Hi Andreas,

Thank you for your quick answer. I didn't want to go too deep on the
details but I guess I have to :)

I fear so...


On Mon, Jan 28, 2013 at 3:14 PM, Andreas Loew  wrote:

Hi Dridi,

Am 28.01.2013 14:57, schrieb Dridi Boukelmoune:


I'm having trouble building a project on Linux because of the classes
generated by XmlBeans. The build works properly on a Solaris platform
using the same tools:

Java : Hotspot 1.5.0_16
Ant : 1.6.5
XmlBeans: 2.3.1.0

For the XmlBeans version, it comes with Weblogic 10.0:
com.bea.core.xml.beaxmlbeans_2.3.1.0.jar
com.bea.core.xquery.xmlbeans-interop_1.0.0.0.jar
com.bea.core.xquery.beaxmlbeans-interop_1.0.0.0.jar
com.bea.core.xml.xmlbeans_2.3.1.0.jar

I hope my problem is not related to Weblogic's version.

I don't think so (see below for the details) - I rather tend to think that
this is a locale/encoding issue in the XSD and/or between those platforms.



So I have an XSD file containing something like:

  
  
  ...
  


With Linux, I get this output:
static final Enum A_CLICHÉ = Enum.forString("A cliché");

On the other hand, it produces this on Solaris:
static final Enum A_CLICH\311 = Enum.forString("A clich\351");

The java source code generated on Linux doesn't compile because of an
encoding mess I can't address now, so I'm currently trying to
understand how the code is generated. I haven't found yet which option
leads to either one or the other output that could have different
defaults based on the platform.

I hope someone can help me on this one.

Most probably, sorting out your locale/character encoding issues should
solve the issue.

First and foremost: Does the XSD in question with the French é include an
encoding declaration? Such as



 (...)


Yes it states a wrong UTF-8 encoding when it's actually ISO-8859-15.
Hmm - further below you state you must not modify the source - which 
definitely is needed, because the encoding given in the XSD (if present) 
explicitly overrides any locales detected from the environment.


I was initially assuming that your XSD might not have specified any 
encoding - but if it does, and does so wrongly, clearly this is what 
needs to be changed...


If you must not modify the source, you need the people who are indeed 
maintaining this code to do so. I am not aware of any other workaround 
to override a wrong encoding declaration given in an XSD. That does not 
make real sense, as typically (other than in your very specific 
situation), the simple and easy solution just is to correct the XSD to 
specify the proper encoding...



If it does not, you need to explicitly mention the appropriate encoding of
that file in this place to make this portable.

If you don't, I expect the XMLBeans code generator to use the system's
default locale, which will be calculated on Unix platforms from environment
variables such as LANG, LC_CTYPE etc.?

LANG and LC_CTYPE are used, and part of the encoding mess I was
talking about. A mess because the locale names aren't the same on
Solaris and Linux (locale -a | grep fr_FR). And a mess because we have
a (complicated) shell script that drives the ant build a prepares a
proper environment depending on the project we're building.
Indeed. IMO, your build file should unfortunately need to explicitily 
handle these subtle differences if you want to use it on Solaris and 
Linux, regardless of the fact that even selecting the proper platform 
LANG / LC_CTYPE etc. values won't fix the wrong encoding in the XSD type 
of issue, but will make the rest of the build run in a reproducible way.



Do you call scomp from the command line, or do you use Ant or Maven to call
the code generator?

That would be ant.
Which would be able to take explicit Java encoding as "-D" command line 
parameter to the ant JVM, but the much better way to fix this is by 
fixing the build file to use correct Unix NLS (LANG /LC_CTYPE etc.) 
settings.



Also, how did you transport/copy the source code from the Solaris to the
Linux machine? Did you copy files in binary mode, or using scp (which might
have done recoding of text files on the fly based on language/encoding
settings on source and target machine)? So you should check that your XSD
files on both machines indeed are binary identical.

It's the same shell script that does a svn checkout after setting the
environment. So LANG and LC_CTYPE are set before the checkout and the
ant build.

Fine.


I hope that you should be able to simply add the appropriate encoding to
your XSD and be fine.

All the projects are built from ISO-8859-15 java sources. Also this is
an old legacy ant project, without any dependency management like ivy.
Fine, therefore your correct LANG value specifies fr_FR and the correct 
(OS-specific) notation for ISO 8859 p15.



There is one single project that is built from UTF-8 java sources. It
has a depend

Re: MyDocument can't be cast to MyDocumentImpl?

2013-01-30 Thread Michael Bishop
Hi Cezar,

I couldn't do it on the command line because it's a NetBeans module and
needs a NetBeans platform to run. I did the next best thing and wrote a
unit test around it. For whatever reason, you're correct. While writing
code in the test package, I noticed two instances of the same classes from
auto-completed import statements. In the actual source (not test) package,
only one instance of the class appeared. I don't know exactly how NetBeans
platform applications work with class loading in this regard. I could find
no reason that this class appeared in a unit test and not the "live"
application. I have a "legacy" suite in this NetBeans application where
older modules are stored. I have no idea why or how these classes are being
referenced, but they are. I removed the offending module from the legacy
suite and things worked fine.

Long story short, odd, NetBeans-related problem that took me some time to
track down. I still don't know the "why", but the problem is eliminated.


On Wed, Jan 30, 2013 at 1:26 PM, Cezar Andrei wrote:

> Hi Michael,
>
> To me it seems you might have 2 different jars around for the same
> schema or some classloader issue. I would just make sure first it does
> run correctly from command line.
>
> Cezar
>
>
> On Tue, 2012-12-11 at 13:39 -0800, Michael Bishop wrote:
> > Hello all,
> >
> > I'm experiencing a weird issue in trying to load documents in
> > XMLBeans.  I'm working with a NetBeans platform application and we use
> > XMLBeans extensively throughout the application.  This issue is a
> > "first" for me and I'm not sure how to proceed.
> >
> > I have an object that stores XML data as a String.  So, elsewhere in
> > my application, I have something like this:
> >
> > MyDocument doc = MyDocument.Factory.newInstance();
> > ... // populate stuff here.
> > String myText = doc.xmlText();
> >
> > Elsewhere in my application, I want to validate that the String I'm
> > receiving is indeed a valid instance of that document:
> >
> > // Shortened for brevity's sake.
> > public boolean isValid(final String input) {
> > try {
> > MyDocument.Factory.Parse(input);
> > return true;
> > } catch (Exception ex) {
> > }
> >
> > return false;
> > }
> >
> > I get this perplexing error:
> >
> > java.lang.ClassCastException: myPackage.impl.MyDocumentImpl cannot be
> > cast to myPackage.MyDocument
> >
> > So, I put the whole thing in a unit test.  I made a document, wrote it
> > to a String, then parsed it again.  It works in a unit test.  So there
> > must be something going wrong with the environment in my application.
> > Unfortunately, I don't know what that is, nor how to troubleshoot.
> > Here's what I know:
> >
> > - The XMLBeans data is in a single module.  There should be no
> > duplicate classes.
> > - I checked the ClassLoader of the MyDocument and MyDocumentImpl
> > classes.  They're the same.
> > - I load/edit/save other XMLBeans documents throughout the application
> > without issue.
> > - The string data is stored as child text in another XML element.
> > This may be relevant:
> >
> > String xmlText = myDocument.xmlText();
> > myOtherElement.setStringValue(xmlText);
> > ...
> > String textToValidate = myOtherElement.getStringValue();
> > MyDocument.Factory.Parse(textToValidate);
> >
> > Could this be mangling the structure?  It looks fine when I log the
> > value.
> >
> > Anyway, further suggestions would be great.
> >
> > Michael
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>


Re: MyDocument can't be cast to MyDocumentImpl?

2013-01-30 Thread Cezar Andrei
Hi Michael,

To me it seems you might have 2 different jars around for the same
schema or some classloader issue. I would just make sure first it does
run correctly from command line.

Cezar


On Tue, 2012-12-11 at 13:39 -0800, Michael Bishop wrote:
> Hello all,
> 
> I'm experiencing a weird issue in trying to load documents in
> XMLBeans.  I'm working with a NetBeans platform application and we use
> XMLBeans extensively throughout the application.  This issue is a
> "first" for me and I'm not sure how to proceed.
> 
> I have an object that stores XML data as a String.  So, elsewhere in
> my application, I have something like this:
> 
> MyDocument doc = MyDocument.Factory.newInstance();
> ... // populate stuff here.
> String myText = doc.xmlText();
> 
> Elsewhere in my application, I want to validate that the String I'm
> receiving is indeed a valid instance of that document:
> 
> // Shortened for brevity's sake.
> public boolean isValid(final String input) {
> try {
> MyDocument.Factory.Parse(input);
> return true;
> } catch (Exception ex) {
> }
> 
> return false;
> }
> 
> I get this perplexing error:
> 
> java.lang.ClassCastException: myPackage.impl.MyDocumentImpl cannot be
> cast to myPackage.MyDocument
> 
> So, I put the whole thing in a unit test.  I made a document, wrote it
> to a String, then parsed it again.  It works in a unit test.  So there
> must be something going wrong with the environment in my application.
> Unfortunately, I don't know what that is, nor how to troubleshoot.
> Here's what I know:
> 
> - The XMLBeans data is in a single module.  There should be no
> duplicate classes.
> - I checked the ClassLoader of the MyDocument and MyDocumentImpl
> classes.  They're the same.
> - I load/edit/save other XMLBeans documents throughout the application
> without issue.
> - The string data is stored as child text in another XML element.
> This may be relevant:
> 
> String xmlText = myDocument.xmlText();
> myOtherElement.setStringValue(xmlText);
> ...
> String textToValidate = myOtherElement.getStringValue();
> MyDocument.Factory.Parse(textToValidate);
> 
> Could this be mangling the structure?  It looks fine when I log the
> value.
> 
> Anyway, further suggestions would be great.
> 
> Michael



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Converting from using scomp to SchemaTypeLoader.parse(...)

2013-01-30 Thread Cezar Andrei
Hi,

This is supported, but it's on the advanced list of usages of XmlBeans.

Your best option is to parse the schema files and corectly create the
SchemaTypeSystem. See documentation
http://xmlbeans.apache.org/docs/2.0.0/guide/conIntroToTheSchemaTypeSystem.html
 and previous discussions  on this list, for example:
http://www.mail-archive.com/user@xmlbeans.apache.org/msg01864.html
http://www.mail-archive.com/user@xmlbeans.apache.org/msg03173.html

From it you'll be able to find all the info you'll have in the schema.
We use it to do the validation or the generation of the java source also
editors can use this info for error detecting and completion.


Cezar


On Tue, 2013-01-15 at 05:55 -0800, badger mailinglist wrote:
> Thanks Paul and Jacob, I guess I didn't quite read through the
> tutorials far enough. It's all working now I'm *actually* compiling
> the xsd.
> 
> Thanks again,
> 
> Badger.
> 
> 
> On 14 January 2013 23:27, Paul Gillen  wrote:
> Boy, I wish I got paid for this crap.
> 
>  
> 
> Full answer here:
> 
> http://www.oracle.com/technetwork/articles/entarch/incremental-compilation-xmlbeans-089127.html
> 
>  
> 
> In your first example you had compiled your schema and created
> an object to describe parsed XML.
> 
>  
> 
> In you second example you parsed the XSD, which is after all
> XML, and, surprise, it’s described by W3C XSD.
> 
>  
> 
> What you want to do, and I would be interested in hearing why,
> is to compile the XSD on the fly.
> 
>  
> 
> The output of the example below is:
> 
> D=TestSchema
> 
> D=schema@http://www.w3.org/2001/XMLSchema
> 
> D=TestSchema
> 
> where the first is your first example, the second is your
> second example, and the third is from compiling the XSD on the
> fly.
> 
>  
> 
> Hope this helps.
> 
>  
> 
> Cheers,
> 
> Paul
> 
>  
> 
> package com.riveralph;
> 
>  
> 
> import java.io.File;
> 
>  
> 
> import noNamespace.TestSchemaDocument;
> 
>  
> 
> import org.apache.xmlbeans.SchemaTypeLoader;
> 
> import org.apache.xmlbeans.SchemaTypeSystem;
> 
> import org.apache.xmlbeans.XmlBeans;
> 
> import org.apache.xmlbeans.XmlObject;
> 
> import org.apache.xmlbeans.XmlOptions;
> 
> import org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument;
> 
>  
> 
> public class TestSchema {
> 
>   public static void main(String[] args) throws Exception
> {
> 
> TestSchema ts = new TestSchema();
> 
> ts.go(args);
> 
>   }
> 
>  
> 
>   private void go(String[] args) throws Exception {
> 
> {
> 
>   XmlObject instance =
> TestSchemaDocument.Factory.newInstance(new XmlOptions());
> 
>   System.out.println(instance.schemaType());
> 
> }
> 
>  
> 
> {
> 
>   SchemaTypeLoader loader =
> 
> XmlBeans.typeLoaderForClassLoader(SchemaDocument.class.getClassLoader());
> 
>   XmlObject instance = loader.parse(new
> File("xsd/testschema.xsd"),null, new XmlOptions());
> 
>   System.out.println(instance.schemaType());
> 
> }
> 
>  
> 
> {
> 
>   XmlObject[] schemaObj = new XmlObject[]
> { XmlObject.Factory.parse(new File("xsd/testschema.xsd"))};
> 
>   SchemaTypeSystem schemaTypeObj =
> XmlBeans.compileXmlBeans(null, null, schemaObj, null, null,
> null, null);
> 
>   XmlObject instance =
> schemaTypeObj.newInstance(schemaTypeObj.documentTypes()[0],
> null);
> 
>  

Re: Java source escaping

2013-01-28 Thread Dridi Boukelmoune
Hi Andreas,

Thank you for your quick answer. I didn't want to go too deep on the
details but I guess I have to :)

On Mon, Jan 28, 2013 at 3:14 PM, Andreas Loew  wrote:
> Hi Dridi,
>
> Am 28.01.2013 14:57, schrieb Dridi Boukelmoune:
>
>> I'm having trouble building a project on Linux because of the classes
>> generated by XmlBeans. The build works properly on a Solaris platform
>> using the same tools:
>>
>> Java : Hotspot 1.5.0_16
>> Ant : 1.6.5
>> XmlBeans: 2.3.1.0
>>
>> For the XmlBeans version, it comes with Weblogic 10.0:
>> com.bea.core.xml.beaxmlbeans_2.3.1.0.jar
>> com.bea.core.xquery.xmlbeans-interop_1.0.0.0.jar
>> com.bea.core.xquery.beaxmlbeans-interop_1.0.0.0.jar
>> com.bea.core.xml.xmlbeans_2.3.1.0.jar
>>
>> I hope my problem is not related to Weblogic's version.
>
> I don't think so (see below for the details) - I rather tend to think that
> this is a locale/encoding issue in the XSD and/or between those platforms.
>
>
>> So I have an XSD file containing something like:
>> 
>>  
>>  
>>  ...
>>  
>> 
>>
>> With Linux, I get this output:
>> static final Enum A_CLICHÉ = Enum.forString("A cliché");
>>
>> On the other hand, it produces this on Solaris:
>> static final Enum A_CLICH\311 = Enum.forString("A clich\351");
>>
>> The java source code generated on Linux doesn't compile because of an
>> encoding mess I can't address now, so I'm currently trying to
>> understand how the code is generated. I haven't found yet which option
>> leads to either one or the other output that could have different
>> defaults based on the platform.
>>
>> I hope someone can help me on this one.
>
> Most probably, sorting out your locale/character encoding issues should
> solve the issue.
>
> First and foremost: Does the XSD in question with the French é include an
> encoding declaration? Such as
>
> 
> 
> (...)
> 

Yes it states a wrong UTF-8 encoding when it's actually ISO-8859-15.

> If it does not, you need to explicitly mention the appropriate encoding of
> that file in this place to make this portable.
>
> If you don't, I expect the XMLBeans code generator to use the system's
> default locale, which will be calculated on Unix platforms from environment
> variables such as LANG, LC_CTYPE etc.?
>

LANG and LC_CTYPE are used, and part of the encoding mess I was
talking about. A mess because the locale names aren't the same on
Solaris and Linux (locale -a | grep fr_FR). And a mess because we have
a (complicated) shell script that drives the ant build a prepares a
proper environment depending on the project we're building.

> Do you call scomp from the command line, or do you use Ant or Maven to call
> the code generator?
>

That would be ant.

> Also, how did you transport/copy the source code from the Solaris to the
> Linux machine? Did you copy files in binary mode, or using scp (which might
> have done recoding of text files on the fly based on language/encoding
> settings on source and target machine)? So you should check that your XSD
> files on both machines indeed are binary identical.
>

It's the same shell script that does a svn checkout after setting the
environment. So LANG and LC_CTYPE are set before the checkout and the
ant build.

> I hope that you should be able to simply add the appropriate encoding to
> your XSD and be fine.
>

All the projects are built from ISO-8859-15 java sources. Also this is
an old legacy ant project, without any dependency management like ivy.
There is one single project that is built from UTF-8 java sources. It
has a dependency on common classes generated from a bogus ISO-8859-15
XSD. So it builds on Solaris (a miracle) because the java code is
escaped, which results in a simple ASCII file, compatible with UTF-8.

I can't modify the source code for contractual reasons, the only thing
I can do so far is tweaking the environment. That's why I was
wondering if it could be some feature with a default value varying on
the platform (environment variable, system property, jvm flag...).

Best Regards,
Dridi

> Hope this helps & best regards,
> Andreas
>
> --
> Andreas Loew | Senior Java Architect
> Oracle Advanced Customer Services
> ORACLE Germany
>

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Java source escaping

2013-01-28 Thread Andreas Loew

Hi Dridi,

Am 28.01.2013 14:57, schrieb Dridi Boukelmoune:

I'm having trouble building a project on Linux because of the classes
generated by XmlBeans. The build works properly on a Solaris platform
using the same tools:

Java : Hotspot 1.5.0_16
Ant : 1.6.5
XmlBeans: 2.3.1.0

For the XmlBeans version, it comes with Weblogic 10.0:
com.bea.core.xml.beaxmlbeans_2.3.1.0.jar
com.bea.core.xquery.xmlbeans-interop_1.0.0.0.jar
com.bea.core.xquery.beaxmlbeans-interop_1.0.0.0.jar
com.bea.core.xml.xmlbeans_2.3.1.0.jar

I hope my problem is not related to Weblogic's version.
I don't think so (see below for the details) - I rather tend to think 
that this is a locale/encoding issue in the XSD and/or between those 
platforms.



So I have an XSD file containing something like:

 
 
 ...
 


With Linux, I get this output:
static final Enum A_CLICHÉ = Enum.forString("A cliché");

On the other hand, it produces this on Solaris:
static final Enum A_CLICH\311 = Enum.forString("A clich\351");

The java source code generated on Linux doesn't compile because of an
encoding mess I can't address now, so I'm currently trying to
understand how the code is generated. I haven't found yet which option
leads to either one or the other output that could have different
defaults based on the platform.

I hope someone can help me on this one.
Most probably, sorting out your locale/character encoding issues should 
solve the issue.


First and foremost: Does the XSD in question with the French é include 
an encoding declaration? Such as




(...)


If it does not, you need to explicitly mention the appropriate encoding 
of that file in this place to make this portable.


If you don't, I expect the XMLBeans code generator to use the system's 
default locale, which will be calculated on Unix platforms from 
environment variables such as LANG, LC_CTYPE etc.?


Do you call scomp from the command line, or do you use Ant or Maven to 
call the code generator?


Also, how did you transport/copy the source code from the Solaris to the 
Linux machine? Did you copy files in binary mode, or using scp (which 
might have done recoding of text files on the fly based on 
language/encoding settings on source and target machine)? So you should 
check that your XSD files on both machines indeed are binary identical.


I hope that you should be able to simply add the appropriate encoding to 
your XSD and be fine.


Hope this helps & best regards,
Andreas

--
Andreas Loew | Senior Java Architect
Oracle Advanced Customer Services
ORACLE Germany


-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Converting from using scomp to SchemaTypeLoader.parse(...)

2013-01-15 Thread badger mailinglist
Thanks Paul and Jacob, I guess I didn't quite read through the tutorials
far enough. It's all working now I'm *actually* compiling the xsd.

Thanks again,

Badger.


On 14 January 2013 23:27, Paul Gillen  wrote:

> Boy, I wish I got paid for this crap.
>
> ** **
>
> Full answer here:
> http://www.oracle.com/technetwork/articles/entarch/incremental-compilation-xmlbeans-089127.html
> 
>
> ** **
>
> In your first example you had compiled your schema and created an object
> to describe parsed XML.
>
> ** **
>
> In you second example you parsed the XSD, which is after all XML, and,
> surprise, it’s described by W3C XSD.
>
> ** **
>
> What you want to do, and I would be interested in hearing why, is to
> compile the XSD on the fly.
>
> ** **
>
> The output of the example below is:
>
> D=TestSchema
>
> D=schema@http://www.w3.org/2001/XMLSchema
>
> D=TestSchema
>
> where the first is your first example, the second is your second example,
> and the third is from compiling the XSD on the fly.
>
> ** **
>
> Hope this helps.
>
> ** **
>
> Cheers,
>
> Paul
>
> ** **
>
> *package* com.riveralph;
>
> ** **
>
> *import* java.io.File;
>
> ** **
>
> *import* noNamespace.TestSchemaDocument;
>
> ** **
>
> *import* org.apache.xmlbeans.SchemaTypeLoader;
>
> *import* org.apache.xmlbeans.SchemaTypeSystem;
>
> *import* org.apache.xmlbeans.XmlBeans;
>
> *import* org.apache.xmlbeans.XmlObject;
>
> *import* org.apache.xmlbeans.XmlOptions;
>
> *import* org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument;
>
> ** **
>
> *public* *class* TestSchema {
>
>   *public* *static* *void* main(String[] args) *throws* Exception {***
> *
>
> TestSchema ts = *new* TestSchema();
>
> ts.go(args);
>
>   }
>
> ** **
>
>   *private* *void* go(String[] args) *throws* Exception {
>
> {
>
>   XmlObject instance = TestSchemaDocument.Factory.*
> newInstance*(*new* XmlOptions());
>
>   System.*out*.println(instance.schemaType());
>
> }
>
> ** **
>
> {
>
>   SchemaTypeLoader loader = XmlBeans.*
> typeLoaderForClassLoader*(SchemaDocument.*class*.getClassLoader());
>
>   XmlObject instance = loader.parse(*new* File(
> "xsd/testschema.xsd"),*null*, *new* XmlOptions());
>
>   System.*out*.println(instance.schemaType());
>
> }
>
> ** **
>
> {
>
>   XmlObject[] schemaObj = *new* XmlObject[]   {
> XmlObject.Factory.*parse*(*new* File("xsd/testschema.xsd"))};
>
>   SchemaTypeSystem schemaTypeObj = XmlBeans.*
> compileXmlBeans*(*null*, *null*, schemaObj, *null*, *null*, *null*, *null*
> );
>
>   XmlObject instance =
> schemaTypeObj.newInstance(schemaTypeObj.documentTypes()[0], *null*);
>
>   System.*out*.println(instance.schemaType());
>
> }
>
> ** **
>
>   }
>
> }
>
> ** **
>
> ** **
>
> *From:* badger mailinglist [mailto:badger.mailing.l...@gmail.com]
> *Sent:* Monday, January 14, 2013 6:35 AM
> *To:* user@xmlbeans.apache.org
> *Subject:* Re: Converting from using scomp to SchemaTypeLoader.parse(...)*
> ***
>
> ** **
>
> Ok, so I guess no one has ever tried this.
>
> Maybe there's a simpler question:
>
> If I use the SchemaTypeLoader.parse method, I struggle to get information
> about the schema from that object. I want to iterate through the attributes
> and elements declared in the XSD I'm parsing, but all I seem to get is w3
> xml schema stuff. Am I trying to do something that isn't supported, or am I
> just doing it wrong?
>
> Any help much appreciated,
>
> Cheers,
>
> Badger.
>
> On 8 January 2013 15:42, badger mailinglist 
> wrote:
>
> Hi,
>
> Currently, I take some XSDs (see below for example), generate classes for
> them (with scomp -out generatedClasses.jar testschema.xsd), then use those
> classes in code with some like:
> final XmlObject instance =
> TestSchemaDocument.Factory.newInstance(xmlOptions);
>
> This process now needs to be a bit more dynamic, so I'm trying to use
> something more like the following:
>
> final SchemaTypeLoader loader =
> XmlBeans.typeLoaderForClassLoader(SchemaDocument.class.getClassLoader());
> XmlOptions xm

RE: Converting from using scomp to SchemaTypeLoader.parse(...)

2013-01-14 Thread Paul Gillen
Boy, I wish I got paid for this crap.

 

Full answer here:
http://www.oracle.com/technetwork/articles/entarch/incremental-compilation-x
mlbeans-089127.html

 

In your first example you had compiled your schema and created an object to
describe parsed XML.

 

In you second example you parsed the XSD, which is after all XML, and,
surprise, it's described by W3C XSD.

 

What you want to do, and I would be interested in hearing why, is to compile
the XSD on the fly.

 

The output of the example below is:

D=TestSchema

D=schema@http://www.w3.org/2001/XMLSchema

D=TestSchema

where the first is your first example, the second is your second example,
and the third is from compiling the XSD on the fly.

 

Hope this helps.

 

Cheers,

Paul

 

package com.riveralph;

 

import java.io.File;

 

import noNamespace.TestSchemaDocument;

 

import org.apache.xmlbeans.SchemaTypeLoader;

import org.apache.xmlbeans.SchemaTypeSystem;

import org.apache.xmlbeans.XmlBeans;

import org.apache.xmlbeans.XmlObject;

import org.apache.xmlbeans.XmlOptions;

import org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument;

 

public class TestSchema {

  public static void main(String[] args) throws Exception {

TestSchema ts = new TestSchema();

ts.go(args);

  }

 

  private void go(String[] args) throws Exception {

{

  XmlObject instance =
TestSchemaDocument.Factory.newInstance(new XmlOptions());

  System.out.println(instance.schemaType());

}

 

{

  SchemaTypeLoader loader =
XmlBeans.typeLoaderForClassLoader(SchemaDocument.class.getClassLoader());

  XmlObject instance = loader.parse(new
File("xsd/testschema.xsd"),null, new XmlOptions());

  System.out.println(instance.schemaType());

}

 

{

  XmlObject[] schemaObj = new XmlObject[]   {
XmlObject.Factory.parse(new File("xsd/testschema.xsd"))};

  SchemaTypeSystem schemaTypeObj =
XmlBeans.compileXmlBeans(null, null, schemaObj, null, null, null, null);

  XmlObject instance =
schemaTypeObj.newInstance(schemaTypeObj.documentTypes()[0], null);

  System.out.println(instance.schemaType());

}

 

  }

}

 

 

From: badger mailinglist [mailto:badger.mailing.l...@gmail.com] 
Sent: Monday, January 14, 2013 6:35 AM
To: user@xmlbeans.apache.org
Subject: Re: Converting from using scomp to SchemaTypeLoader.parse(...)

 

Ok, so I guess no one has ever tried this.

Maybe there's a simpler question:

If I use the SchemaTypeLoader.parse method, I struggle to get information
about the schema from that object. I want to iterate through the attributes
and elements declared in the XSD I'm parsing, but all I seem to get is w3
xml schema stuff. Am I trying to do something that isn't supported, or am I
just doing it wrong?

Any help much appreciated,

Cheers,

Badger.

On 8 January 2013 15:42, badger mailinglist 
wrote:

Hi,

Currently, I take some XSDs (see below for example), generate classes for
them (with scomp -out generatedClasses.jar testschema.xsd), then use those
classes in code with some like:
final XmlObject instance =
TestSchemaDocument.Factory.newInstance(xmlOptions);

This process now needs to be a bit more dynamic, so I'm trying to use
something more like the following:

final SchemaTypeLoader loader =
XmlBeans.typeLoaderForClassLoader(SchemaDocument.class.getClassLoader());
XmlOptions xmlOptions = new XmlOptions();
final XmlObject fileParsedInstance = loader.parse(new
File("C:\\testschema.xsd"), null, new XmlOptions());


However, I would expect the XmlObject returned in both cases to be the same.
However, if I recursively iterate through the properties of these two
objects, I get different results i.e. calling
instance.schemaType().getProperties() gets different results in each of the
cases.
For the instance loaded from the class the getProperties() method returns
one element with type 'TestSchema', which itself returns one element with
type 'TestType' and so on as you recur.
For the instance loaded directly from the xsd file the properties are all
things like E=restriction|D=restriction@http://www.w3.org/2001/XMLSchema,
which has a property T=localSimpleType@http://www.w3.org/2001/XMLSchema,
which has a property 'restriction' and so on infinitely.

I've assumed that these two methods of loading the schema would do the same
thing, but it looks like I'm wrong, can someone point me at the method call
I need to make to load from the file properly? I'm using XmlBeans 2.5.0.

Thanks!


Example xsd I'm testing this with:


http://www.w3.org/2001/XMLSchema";>

  
  
  

  

  
  
  

  

  
  


 



Re: Converting from using scomp to SchemaTypeLoader.parse(...)

2013-01-14 Thread badger mailinglist
Ok, so I guess no one has ever tried this.

Maybe there's a simpler question:

If I use the SchemaTypeLoader.parse method, I struggle to get information
about the schema from that object. I want to iterate through the attributes
and elements declared in the XSD I'm parsing, but all I seem to get is w3
xml schema stuff. Am I trying to do something that isn't supported, or am I
just doing it wrong?

Any help much appreciated,

Cheers,

Badger.

On 8 January 2013 15:42, badger mailinglist
wrote:

> Hi,
>
> Currently, I take some XSDs (see below for example), generate classes for
> them (with scomp -out generatedClasses.jar testschema.xsd), then use those
> classes in code with some like:
> final XmlObject instance =
> TestSchemaDocument.Factory.newInstance(xmlOptions);
>
> This process now needs to be a bit more dynamic, so I'm trying to use
> something more like the following:
>
> final SchemaTypeLoader loader =
> XmlBeans.typeLoaderForClassLoader(SchemaDocument.class.getClassLoader());
> XmlOptions xmlOptions = new XmlOptions();
> final XmlObject fileParsedInstance = loader.parse(new
> File("C:\\testschema.xsd"), null, new XmlOptions());
>
>
> However, I would expect the XmlObject returned in both cases to be the
> same. However, if I recursively iterate through the properties of these two
> objects, I get different results i.e. calling
> instance.schemaType().getProperties() gets different results in each of the
> cases.
> For the instance loaded from the class the getProperties() method returns
> one element with type 'TestSchema', which itself returns one element with
> type 'TestType' and so on as you recur.
> For the instance loaded directly from the xsd file the properties are all
> things like E=restriction|D=restriction@http://www.w3.org/2001/XMLSchema,
> which has a property T=localSimpleType@http://www.w3.org/2001/XMLSchema,
> which has a property 'restriction' and so on infinitely.
>
> I've assumed that these two methods of loading the schema would do the
> same thing, but it looks like I'm wrong, can someone point me at the method
> call I need to make to load from the file properly? I'm using XmlBeans
> 2.5.0.
>
> Thanks!
>
>
> Example xsd I'm testing this with:
>
> 
>  elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema
> ">
>
>   
>
>   
> 
>   
> 
>   
>
>   
> 
>  maxOccurs="unbounded" minOccurs="0" />
> 
>   
>
> 
>
>


Re: using xmlbeans on client side (in conjunction with axis2); null returns although data is available

2012-11-26 Thread Jacob Danner
Have you tried validating the payload? If there are errors that could
indicate what is causing the error.
Otherwise, I've only used XMLBeans with document/literal webservices
and I don't remember how rpc encoded array are handled.
-jacobd

On Mon, Nov 26, 2012 at 9:32 PM, Tim Watts  wrote:
> On Mon, 2012-11-26 at 12:40 +0100, moh.sushi wrote:
>> Hi Tim,
>>
>> thank yor for your answer.
>>
>> going into generated source code, apply
>> "https://recettage.ria.neopod.fm-ged.com/ws"; in first arg for qname
>> => private static final javax.xml.namespace.QName RETURN$0 =
>> new
>> javax.xml.namespace.QName("https://recettage.ria.neopod.fm-ged.com/ws";,
>> "return");
>>
>> Repack jar-file (of generated classes)
>>
>> and start test
>>
>> Unfortunately, test fails
>> => java.lang.ClassCastException:
>> org.apache.xmlbeans.impl.values.XmlAnyTypeImpl cannot be cast to
>> com.fm_ged.neopod.ria.recettage.ws.Order
>>   at 
>> com.fm_ged.neopod.ria.recettage.ws.impl.GetImageURLResponseDocumentImpl$GetImageURLResponseImpl.getReturn(GetImageURLResponseDocumentImpl.java:102)
>>
>
> Well, you shouldn't have to monkey with the generated code like that.
> If it wasn't generated correctly you need to look into why that's
> happening.  The ClassCastException may just be another side effect of
> incorrectly generated code.
>
> Another possibility is to make sure the client has
> schemaorg_apache_xmlbeans available in its classpath.  This should be
> produced from the xmlbeans compiler.  I'm no expert but I think the
> XmlAnyType is what xmlbeans uses when it can't map an xml doc to a
> schema and thus a bean type.  Which suggests the client may not have
> these in its classpath (even if they're physically present on the
> client).  But if it's in the root of the client jar and you're running
> this from the jar then that should be sufficient.
>
> Also, maybe consider using the latest version of XmlBeans if possible.
> I've been using v2.5.0 so I may be talking apples to your oranges.
>
>>
>>
>> Regards,
>> Sascha
>>
>>
>>
>> On Mon, Nov 26, 2012 at 12:09 PM, Tim Watts  wrote:
>> > On Mon, 2012-11-26 at 08:37 +0100, moh.sushi wrote:
>> >> Hello together,
>> >>
>> >> i have a problem with using xmlbeans.
>> >> Following situation is given.
>> >>
>> >> - remote wsdl available (see http://pastebin.com/5qnFScMx)
>> >> - code generation using axis2 and databinding xmlbeans
>> >>
>> >> i can do a request and i get a response, too.
>> >>
>> >> The problem is while iterating through given response.
>> >> I just want to get part of the response with xmlbeans therefore i post
>> >> the question on this mailing list.
>> >>
>> >> this is toString-ouput of the response:
>> >>
>> >> (1)
>> >> https://recettage.ria.neopod.fm-ged.com/ws";
>> >>   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
>> >>   xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>> >>   xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
>> >>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>> >>   
>> >>   xyz
>> >>   
>> >>   
>> >>   2011-10-20
>> >>   1
>> >>   https://host.fr/images/1.jpg
>> >>   2011-11-18
>> >>   
>> >>   
>> >>   2011-10-20
>> >>   2
>> >>   https://host.fr/images/2.jpg
>> >>   2011-10-31
>> >>   
>> >>   
>> >>   2011-10-20
>> >>   3
>> >>   https://host.fr/images/3.jpg
>> >>   2011-11-18
>> >>   
>> >>   
>> >>   
>> >> 
>> >>
>> >> the toString output of the return fragement
>> >> (2)
>> >> http://schemas.xmlsoap.org/soap/envelope/";
>> >> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>> >> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
>> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> >> xmlns:ws="https://recettage.ria.neopod.fm-ged.com/ws";>
>> >>   
>> >>   yxz
>> >>   
>> >>   
>> >>   2011-10-20
>> >>   1
>> >>   
>> >> https://host.fr/images/1.jpg
>> >>   2011-11-18
>> >>   
>> >>   
>> >>   2011-10-20
>> >>   2
>> >>   
>> >> https://host.fr/images/2.jpg
>> >>   2011-10-31
>> >>   
>> >>   
>> >>   2011-10-20
>> >>   3
>> >>   
>> 

Re: using xmlbeans on client side (in conjunction with axis2); null returns although data is available

2012-11-26 Thread Tim Watts
On Mon, 2012-11-26 at 12:40 +0100, moh.sushi wrote:
> Hi Tim,
> 
> thank yor for your answer.
> 
> going into generated source code, apply
> "https://recettage.ria.neopod.fm-ged.com/ws"; in first arg for qname
> => private static final javax.xml.namespace.QName RETURN$0 =
> new
> javax.xml.namespace.QName("https://recettage.ria.neopod.fm-ged.com/ws";,
> "return");
> 
> Repack jar-file (of generated classes)
> 
> and start test
> 
> Unfortunately, test fails
> => java.lang.ClassCastException:
> org.apache.xmlbeans.impl.values.XmlAnyTypeImpl cannot be cast to
> com.fm_ged.neopod.ria.recettage.ws.Order
>   at 
> com.fm_ged.neopod.ria.recettage.ws.impl.GetImageURLResponseDocumentImpl$GetImageURLResponseImpl.getReturn(GetImageURLResponseDocumentImpl.java:102)
> 

Well, you shouldn't have to monkey with the generated code like that.
If it wasn't generated correctly you need to look into why that's
happening.  The ClassCastException may just be another side effect of
incorrectly generated code.

Another possibility is to make sure the client has
schemaorg_apache_xmlbeans available in its classpath.  This should be
produced from the xmlbeans compiler.  I'm no expert but I think the
XmlAnyType is what xmlbeans uses when it can't map an xml doc to a
schema and thus a bean type.  Which suggests the client may not have
these in its classpath (even if they're physically present on the
client).  But if it's in the root of the client jar and you're running
this from the jar then that should be sufficient.

Also, maybe consider using the latest version of XmlBeans if possible.
I've been using v2.5.0 so I may be talking apples to your oranges.

> 
> 
> Regards,
> Sascha
> 
> 
> 
> On Mon, Nov 26, 2012 at 12:09 PM, Tim Watts  wrote:
> > On Mon, 2012-11-26 at 08:37 +0100, moh.sushi wrote:
> >> Hello together,
> >>
> >> i have a problem with using xmlbeans.
> >> Following situation is given.
> >>
> >> - remote wsdl available (see http://pastebin.com/5qnFScMx)
> >> - code generation using axis2 and databinding xmlbeans
> >>
> >> i can do a request and i get a response, too.
> >>
> >> The problem is while iterating through given response.
> >> I just want to get part of the response with xmlbeans therefore i post
> >> the question on this mailing list.
> >>
> >> this is toString-ouput of the response:
> >>
> >> (1)
> >> https://recettage.ria.neopod.fm-ged.com/ws";
> >>   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> >>   xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> >>   xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
> >>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> >>   
> >>   xyz
> >>   
> >>   
> >>   2011-10-20
> >>   1
> >>   https://host.fr/images/1.jpg
> >>   2011-11-18
> >>   
> >>   
> >>   2011-10-20
> >>   2
> >>   https://host.fr/images/2.jpg
> >>   2011-10-31
> >>   
> >>   
> >>   2011-10-20
> >>   3
> >>   https://host.fr/images/3.jpg
> >>   2011-11-18
> >>   
> >>   
> >>   
> >> 
> >>
> >> the toString output of the return fragement
> >> (2)
> >> http://schemas.xmlsoap.org/soap/envelope/";
> >> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> >> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >> xmlns:ws="https://recettage.ria.neopod.fm-ged.com/ws";>
> >>   
> >>   yxz
> >>   
> >>   
> >>   2011-10-20
> >>   1
> >>   https://host.fr/images/1.jpg
> >>   2011-11-18
> >>   
> >>   
> >>   2011-10-20
> >>   2
> >>   https://host.fr/images/2.jpg
> >>   2011-10-31
> >>   
> >>   
> >>   2011-10-20
> >>   3
> >>   https://host.fr/images/3.jpg
> >>   2011-11-18
> >>   
> >>   
> >>   
> >> 
> >>
> >>
> >> Following code snippet i use:
> >> fully object "GetImageURLResponseDocument response" is given  (see 1)
> >> GetImageURLResponse imageResponse = response.getGetImageURLResponse();  
> >> (see 2)
> >> Order order = imageResponse.getReturn();  <==  null returns
> >>
> >> method bo

Re: using xmlbeans on client side (in conjunction with axis2); null returns although data is available

2012-11-26 Thread moh.sushi
Hi Tim,

thank yor for your answer.

going into generated source code, apply
"https://recettage.ria.neopod.fm-ged.com/ws"; in first arg for qname
=> private static final javax.xml.namespace.QName RETURN$0 =
new
javax.xml.namespace.QName("https://recettage.ria.neopod.fm-ged.com/ws";,
"return");

Repack jar-file (of generated classes)

and start test

Unfortunately, test fails
=> java.lang.ClassCastException:
org.apache.xmlbeans.impl.values.XmlAnyTypeImpl cannot be cast to
com.fm_ged.neopod.ria.recettage.ws.Order
at 
com.fm_ged.neopod.ria.recettage.ws.impl.GetImageURLResponseDocumentImpl$GetImageURLResponseImpl.getReturn(GetImageURLResponseDocumentImpl.java:102)



Regards,
Sascha



On Mon, Nov 26, 2012 at 12:09 PM, Tim Watts  wrote:
> On Mon, 2012-11-26 at 08:37 +0100, moh.sushi wrote:
>> Hello together,
>>
>> i have a problem with using xmlbeans.
>> Following situation is given.
>>
>> - remote wsdl available (see http://pastebin.com/5qnFScMx)
>> - code generation using axis2 and databinding xmlbeans
>>
>> i can do a request and i get a response, too.
>>
>> The problem is while iterating through given response.
>> I just want to get part of the response with xmlbeans therefore i post
>> the question on this mailing list.
>>
>> this is toString-ouput of the response:
>>
>> (1)
>> https://recettage.ria.neopod.fm-ged.com/ws";
>>   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
>>   xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>>   xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>>   
>>   xyz
>>   
>>   
>>   2011-10-20
>>   1
>>   https://host.fr/images/1.jpg
>>   2011-11-18
>>   
>>   
>>   2011-10-20
>>   2
>>   https://host.fr/images/2.jpg
>>   2011-10-31
>>   
>>   
>>   2011-10-20
>>   3
>>   https://host.fr/images/3.jpg
>>   2011-11-18
>>   
>>   
>>   
>> 
>>
>> the toString output of the return fragement
>> (2)
>> http://schemas.xmlsoap.org/soap/envelope/";
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> xmlns:ws="https://recettage.ria.neopod.fm-ged.com/ws";>
>>   
>>   yxz
>>   
>>   
>>   2011-10-20
>>   1
>>   https://host.fr/images/1.jpg
>>   2011-11-18
>>   
>>   
>>   2011-10-20
>>   2
>>   https://host.fr/images/2.jpg
>>   2011-10-31
>>   
>>   
>>   2011-10-20
>>   3
>>   https://host.fr/images/3.jpg
>>   2011-11-18
>>   
>>   
>>   
>> 
>>
>>
>> Following code snippet i use:
>> fully object "GetImageURLResponseDocument response" is given  (see 1)
>> GetImageURLResponse imageResponse = response.getGetImageURLResponse();  (see 
>> 2)
>> Order order = imageResponse.getReturn();  <==  null returns
>>
>> method body of "getReturn" is :
>> public com.fm_ged.neopod.ria.recettage.ws.Order getReturn()
>> {
>> synchronized (monitor())
>> {
>> check_orphaned();
>> com.fm_ged.neopod.ria.recettage.ws.Order target = null;
>> target =
>> (com.fm_ged.neopod.ria.recettage.ws.Order)get_store().find_element_user(RETURN$0,
>> 0);   <= nothing is found therefore null
>> if (target == null)
>> {
>> return null;
>> }
>> return target;
>> }
>> }
>>
>> The variable "RETURN$0" is:
>> private static final javax.xml.namespace.QName RETURN$0 = new
>> javax.xml.namespace.QName("", "return");
>>
>
> I think you need to use "https://recettage.ria.neopod.fm-ged.com/ws"; in
> the first QName arg above.
>
>> i use
>> Axis 1.6.0
>> xmlbeans-2.3.0.jar
>>
>> What is going wrong?
>> Is the server response maybe wrong?
>> Something wrong on my client side?
>>
>> Any help is appreciated!
>>
>> Thanks in advance!
>>
>>
>> Regards,
>> Sascha
>>
>> ---

Re: using xmlbeans on client side (in conjunction with axis2); null returns although data is available

2012-11-26 Thread Tim Watts
On Mon, 2012-11-26 at 08:37 +0100, moh.sushi wrote:
> Hello together,
> 
> i have a problem with using xmlbeans.
> Following situation is given.
> 
> - remote wsdl available (see http://pastebin.com/5qnFScMx)
> - code generation using axis2 and databinding xmlbeans
> 
> i can do a request and i get a response, too.
> 
> The problem is while iterating through given response.
> I just want to get part of the response with xmlbeans therefore i post
> the question on this mailing list.
> 
> this is toString-ouput of the response:
> 
> (1)
> https://recettage.ria.neopod.fm-ged.com/ws";
>   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>   xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>   
>   xyz
>   
>   
>   2011-10-20
>   1
>   https://host.fr/images/1.jpg
>   2011-11-18
>   
>   
>   2011-10-20
>   2
>   https://host.fr/images/2.jpg
>   2011-10-31
>   
>   
>   2011-10-20
>   3
>   https://host.fr/images/3.jpg
>   2011-11-18
>   
>   
>   
> 
> 
> the toString output of the return fragement
> (2)
> http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:ws="https://recettage.ria.neopod.fm-ged.com/ws";>
>   
>   yxz
>   
>   
>   2011-10-20
>   1
>   https://host.fr/images/1.jpg
>   2011-11-18
>   
>   
>   2011-10-20
>   2
>   https://host.fr/images/2.jpg
>   2011-10-31
>   
>   
>   2011-10-20
>   3
>   https://host.fr/images/3.jpg
>   2011-11-18
>   
>   
>   
> 
> 
> 
> Following code snippet i use:
> fully object "GetImageURLResponseDocument response" is given  (see 1)
> GetImageURLResponse imageResponse = response.getGetImageURLResponse();  (see 
> 2)
> Order order = imageResponse.getReturn();  <==  null returns
> 
> method body of "getReturn" is :
> public com.fm_ged.neopod.ria.recettage.ws.Order getReturn()
> {
> synchronized (monitor())
> {
> check_orphaned();
> com.fm_ged.neopod.ria.recettage.ws.Order target = null;
> target =
> (com.fm_ged.neopod.ria.recettage.ws.Order)get_store().find_element_user(RETURN$0,
> 0);   <= nothing is found therefore null
> if (target == null)
> {
> return null;
> }
> return target;
> }
> }
> 
> The variable "RETURN$0" is:
> private static final javax.xml.namespace.QName RETURN$0 = new
> javax.xml.namespace.QName("", "return");
> 

I think you need to use "https://recettage.ria.neopod.fm-ged.com/ws"; in
the first QName arg above.

> i use
> Axis 1.6.0
> xmlbeans-2.3.0.jar
> 
> What is going wrong?
> Is the server response maybe wrong?
> Something wrong on my client side?
> 
> Any help is appreciated!
> 
> Thanks in advance!
> 
> 
> Regards,
> Sascha
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 



signature.asc
Description: This is a digitally signed message part


Re: CDATA saving problem

2012-11-14 Thread VikingBlue

I tried with Following code, but nothing works, what did I miss?

XmlOptions xmlOptions = new XmlOptions();
xmlOptions.setUseCDataBookmarks();
xmlOptions.setSaveCDataEntityCountThreshold(0);
xmlOptions.setSaveCDataLengthThreshold(1);
XmlObject response = XmlObject.Factory.newInstance(xmlOptions);


NotesType.Note note = response.addNewNoteTyp();
XmlCursor c = note.newCursor();
c.toFirstChild();
c.toNextToken();
c.setBookmark(CDataBookmark.CDATA_BOOKMARK);
c.dispose();
note.setStringValue("testing");




Jerry Sy wrote:
> 
> You also need to set setUseCDataBookmarks option to true as well. If 
> your original xml contains CDATA, that option will ensure it is retained 
> and will be present when you save the XML.
> As for setSaveCDataLengthThreshold and setSaveCDataEntityCountThreshold, 
> both conditions must be satisfied for CDATA tag to be added.
> 
> Jerry
> 
> On 07/27/2012 02:05 AM, Jurica Krizanic wrote:
>> Hello,
>> I am uxing XMLBeans 2.5.0 and having an issue with saving XML to the 
>> file..
>> When the XML is saved to the file, CDATA section marks are removed, 
>> but content inside the CDATA remains in the file.
>>
>> I would like CDATA marks also remain in the file.
>>
>> I was trying to set XMLOptions with setSaveCDataLengthThreshold() and 
>> setSaveCDataEntityCountThreshold() methods,
>> browsing through already asked questions on the mailing list, but I 
>> can't get it work correctly.
>>
>> Can someone provide any help?
>>
>>
>> Thank you in advance!
>>
>> Best regards,
>> Jurica Krizanic
>>
>>
>>
>>
> 
> 

-- 
View this message in context: 
http://old.nabble.com/CDATA-saving-problem-tp34219622p34681301.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: XmlBeans dependency for XMLBeans-XPath

2012-11-02 Thread Cyrille P.

Yes i try using http://repo.maven.apache.org/maven2/org/apache/xmlbeans/ and
there is still the bugs.
http://search.maven.org seems to be the search interface for
http://repo.maven.apache.org

Cyrille

Cezar Andrei-3 wrote:
> 
> This should be fixed now. About the repository question: did you try
> using http://repo.maven.apache.org/maven2/org/apache/xmlbeans/ ?
> 
> Cezar
> 
> On Tue, 2012-10-30 at 02:33 -0700, Cyrille P. wrote:
>> Hi Cezar,
>> 
>> There is the same bug for xmlbeans-xpath 2.5.0
>> I'm wondering which is the correct maven repository for xmlbeans project?
>>  - There is a maven repository where xmlbeans 2.6.0 is released but there
>> is
>> only source and jar, the pom file is missing :
>> http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.xmlbeans%22%20AND%20a%3A%22xmlbeans%22
>> Central Repository 
>>  - And another one where the latest release is the 2.5.0: 
>> http://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans MVN
>> Repository 
>> 
>> Regards,
>> Cyrille Peninou
>> 
>> 
>> Cezar Andrei-3 wrote:
>> > 
>> > Cyrille,
>> > 
>> > You found a bug, the correct dependency is xmlbeans 2.6.0. I'll fix it.
>> > 
>> > Cezar
>> > 
>> > On Thu, 2012-10-25 at 06:47 -0700, Cyrille P. wrote:
>> >> Hi,
>> >> 
>> >> Using XmlBeans on a Maven project, I would like to know if it's
>> correct
>> >> that
>> >> xmlbeans-xpath 2.6.0 , has xmlbeans 2.4.0 in dependency and not the
>> 2.6.0
>> >> version ?
>> >> 
>> >> Here the pom.xml dependency declaration for xmlbeans-xpath 2.6.0:
>> >> 
>> >> 
>> >> 
>> >> org.apache.xmlbeans
>> >> xmlbeans
>> >> 2.4.0
>> >> 
>> >> 
>> >> net.sf.saxon
>> >> saxon
>> >> 9
>> >> 
>> >> 
>> >> 
>> >> Thanks in advance,
>> >> Cyrille P.
>> > 
>> > 
>> > 
>> > -
>> > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>> > For additional commands, e-mail: user-h...@xmlbeans.apache.org
>> > 
>> > 
>> > 
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/XmlBeans-dependency-for-XMLBeans-XPath-tp34601143p34632214.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: XmlBeans dependency for XMLBeans-XPath

2012-10-31 Thread Cezar Andrei
This should be fixed now. About the repository question: did you try
using http://repo.maven.apache.org/maven2/org/apache/xmlbeans/ ?

Cezar

On Tue, 2012-10-30 at 02:33 -0700, Cyrille P. wrote:
> Hi Cezar,
> 
> There is the same bug for xmlbeans-xpath 2.5.0
> I'm wondering which is the correct maven repository for xmlbeans project?
>  - There is a maven repository where xmlbeans 2.6.0 is released but there is
> only source and jar, the pom file is missing :
> http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.xmlbeans%22%20AND%20a%3A%22xmlbeans%22
> Central Repository 
>  - And another one where the latest release is the 2.5.0: 
> http://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans MVN
> Repository 
> 
> Regards,
> Cyrille Peninou
> 
> 
> Cezar Andrei-3 wrote:
> > 
> > Cyrille,
> > 
> > You found a bug, the correct dependency is xmlbeans 2.6.0. I'll fix it.
> > 
> > Cezar
> > 
> > On Thu, 2012-10-25 at 06:47 -0700, Cyrille P. wrote:
> >> Hi,
> >> 
> >> Using XmlBeans on a Maven project, I would like to know if it's correct
> >> that
> >> xmlbeans-xpath 2.6.0 , has xmlbeans 2.4.0 in dependency and not the 2.6.0
> >> version ?
> >> 
> >> Here the pom.xml dependency declaration for xmlbeans-xpath 2.6.0:
> >> 
> >> 
> >> 
> >> org.apache.xmlbeans
> >> xmlbeans
> >> 2.4.0
> >> 
> >> 
> >> net.sf.saxon
> >> saxon
> >> 9
> >> 
> >> 
> >> 
> >> Thanks in advance,
> >> Cyrille P.
> > 
> > 
> > 
> > -
> > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> > For additional commands, e-mail: user-h...@xmlbeans.apache.org
> > 
> > 
> > 



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: XmlBeans dependency for XMLBeans-XPath

2012-10-30 Thread Cyrille P.

Hi Cezar,

There is the same bug for xmlbeans-xpath 2.5.0
I'm wondering which is the correct maven repository for xmlbeans project?
 - There is a maven repository where xmlbeans 2.6.0 is released but there is
only source and jar, the pom file is missing :
http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.xmlbeans%22%20AND%20a%3A%22xmlbeans%22
Central Repository 
 - And another one where the latest release is the 2.5.0: 
http://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans MVN
Repository 

Regards,
Cyrille Peninou


Cezar Andrei-3 wrote:
> 
> Cyrille,
> 
> You found a bug, the correct dependency is xmlbeans 2.6.0. I'll fix it.
> 
> Cezar
> 
> On Thu, 2012-10-25 at 06:47 -0700, Cyrille P. wrote:
>> Hi,
>> 
>> Using XmlBeans on a Maven project, I would like to know if it's correct
>> that
>> xmlbeans-xpath 2.6.0 , has xmlbeans 2.4.0 in dependency and not the 2.6.0
>> version ?
>> 
>> Here the pom.xml dependency declaration for xmlbeans-xpath 2.6.0:
>> 
>> 
>> 
>> org.apache.xmlbeans
>> xmlbeans
>> 2.4.0
>> 
>> 
>> net.sf.saxon
>> saxon
>> 9
>> 
>> 
>> 
>> Thanks in advance,
>> Cyrille P.
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 
> 
> 
-- 
View this message in context: 
http://old.nabble.com/XmlBeans-dependency-for-XMLBeans-XPath-tp34601143p34618733.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: XmlBeans dependency for XMLBeans-XPath

2012-10-29 Thread Cezar Andrei
Cyrille,

You found a bug, the correct dependency is xmlbeans 2.6.0. I'll fix it.

Cezar

On Thu, 2012-10-25 at 06:47 -0700, Cyrille P. wrote:
> Hi,
> 
> Using XmlBeans on a Maven project, I would like to know if it's correct that
> xmlbeans-xpath 2.6.0 , has xmlbeans 2.4.0 in dependency and not the 2.6.0
> version ?
> 
> Here the pom.xml dependency declaration for xmlbeans-xpath 2.6.0:
> 
> 
> 
> org.apache.xmlbeans
> xmlbeans
> 2.4.0
> 
> 
> net.sf.saxon
> saxon
> 9
> 
> 
> 
> Thanks in advance,
> Cyrille P.



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



RE:

2012-09-26 Thread buzz lightyear

Hi Jacob,
Thanks for that - very grateful. I downloaded the revision and ran a build dist 
and found the generated files in /build/src
Fantastic, thanks again,
Nick

> Date: Tue, 25 Sep 2012 10:44:25 -0700
> Subject: Re:
> From: jacob.dan...@gmail.com
> To: user@xmlbeans.apache.org
> CC: buzzheavyy...@hotmail.com
> 
> Hi Nick,
> If you look in the manifest from oldxbean.jar you can get the svn info
> for the sources that were used to create the jar. In the latest trunk
> I see something like
> Apache XmlBeans version 2.3.0-r532896
>  which means you could grab the r532896 revision and that should have
> the sources you are looking for.
> oldxbean.jar is used to 'bootstrap' the build and I used to have a
> much better understanding of what that meant exactly. I vaguely
> remember it had something to do with needing to compile the main
> schema xsd's as part of the build.
> 
> HTH,
> -jacobd
> 
> On Tue, Sep 25, 2012 at 10:07 AM, buzz lightyear
>  wrote:
> > Hi,
> >
> > I've spent most of the day trying to track down the source of oldxbean.jar,
> > in particular the source of the org.apache.xmlbeans.impl.xb package. Could
> > somebody possibly point me in the right direction to a source archive. I've
> > pulled down all of the archived xmlbeans distributions - no luck.
> >
> > Very grateful for any kind of answer - it's been a long day.
> >
> > Thanks in advance,
> >
> > Nick
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 
  

Re:

2012-09-25 Thread Jacob Danner
Hi Nick,
If you look in the manifest from oldxbean.jar you can get the svn info
for the sources that were used to create the jar. In the latest trunk
I see something like
Apache XmlBeans version 2.3.0-r532896
 which means you could grab the r532896 revision and that should have
the sources you are looking for.
oldxbean.jar is used to 'bootstrap' the build and I used to have a
much better understanding of what that meant exactly. I vaguely
remember it had something to do with needing to compile the main
schema xsd's as part of the build.

HTH,
-jacobd

On Tue, Sep 25, 2012 at 10:07 AM, buzz lightyear
 wrote:
> Hi,
>
> I've spent most of the day trying to track down the source of oldxbean.jar,
> in particular the source of the org.apache.xmlbeans.impl.xb package. Could
> somebody possibly point me in the right direction to a source archive. I've
> pulled down all of the archived xmlbeans distributions - no luck.
>
> Very grateful for any kind of answer - it's been a long day.
>
> Thanks in advance,
>
> Nick

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: Trying to find a nice XML Bean with generic put functionality

2012-08-26 Thread Jacob Danner
I can't say I've needed xmlbeans for this, but I've used free marker
templates to do something similar based on map key/values.
Would that work for you?
-jacobd
On Aug 25, 2012 8:29 PM, "Craig Burlock"  wrote:

> Hello everyone!
>
> Does anyone know of a bean / object with a "put" method that is designed
> to be XMLizable using the key name and it's value object?
>
> Something like this:
>
> *BeanObject root = new BeanObject();
> beanObject.put("name", "Joe Smith");
> beanObject.put("gender", "Male");
> beanObject.put("age", 22);*
>
> ...will produce this xml:
>
> *
>   Joe Smith
>   Male
>   22
> *
>
> I'm certain I've used a Java Object that does this may moons ago.
>
> The standard Java Map kinda works, but it produces excessive nodes and the
> node names aren't based on the key.
>
> I am wanting something generic because I would like to avoid creating new
> classes just so my xml is clean...
>
> Can anyone help me find the Object I am looking for (or is this my version
> of Skittle-Brew)?
>
>
>


Re: [VOTE] XMLBeans v2.6.0-RC3 to become official release

2012-08-13 Thread Cezar Andrei
Not that I'm aware of, but we always welcome contributions. Saxon was
always hard to keep up to date because it's APIs always have been a
moving target.

Cezar

On Sat, 2012-08-11 at 02:49 -0700, Pascal Heus wrote:
> Thanks Cezar. BTW, is there any plan to support the latest version of
> Saxon-HE (particularly now that the package is publicly available
> through Maven)?
> best
> *P
> 
> On 8/10/12 2:02 PM, Cezar Andrei wrote:
> > Pascal,
> >
> > Thanks for the support, the list of changes can be found in CHANGES.txt:
> > http://svn.apache.org/viewvc/xmlbeans/trunk/CHANGES.txt?view=markup
> >
> > Cezar
> >
> >
> > On Wed, 2012-08-08 at 20:30 -0700, Pascal Heus wrote:
> >> Cezar:
> >> We're extensively using the package and welcome an update. This
> >> definitely has my vote (but it's non-binding)
> >> BTW, is there a full list of changes available?
> >> thanks
> >> *P
> >>
> >> On 8/8/12 8:33 PM, Cezar Andrei wrote:
> >>> Because I didn't receive any votes, I'm extending the vote period until
> >>> end of next Monday, August 13.
> >>>
> >>> Cezar
> >>>
> >>> On Wed, 2012-08-08 at 17:07 -0700, Cezar Andrei wrote:
>  The files are now up at http://xmlbeans.apache.org/dist/ please do send
>  your votes.
> 
>  Thanks,
>  Cezar
> 
>  On Thu, 2012-08-02 at 11:04 -0700, Cezar Andrei wrote:
> > The files are not here: http://xmlbeans.apache.org/dist/ yet, they
> > should get sync-ed soon. I'll send an update when they're up.
> >
> > In the meantime, you can find the same files here:
> > http://apache.org/~cezar/xmlbeans-2.6.0/
> >
> > Cezar
> >
> >
> > On Thu, 2012-08-02 at 10:46 -0700, Cezar Andrei wrote:
> >> Please cast your vote for the XMLBeans v2.6.0-RC3, as published at
> >> http://xmlbeans.apache.org/dist/ to become XMLBeans v2.6.0 official
> >> release.
> >>
> >>  
> >>
> >> The vote will be open until end of day Monday, August 6. Anyone is
> >> allowed to show support or lack of it, but only XMLBeans committer 
> >> votes
> >> are binding.
> >>
> >>  
> >>
> >> [ ]  +1  -  I am in favor of this release, and can help
> >>
> >> [ ]  +0  -  I am in favor of this release, but cannot help
> >>
> >> [ ]  -0  -  I am not in favor of this release
> >>
> >> [ ]  -1  -  I am against this proposal (must include a reason) 
> >>
> >>  
> >>
> >>
> >>
> >>
> >>
> >> My vote is:
> >>
> >> [X]  +1  -  I am in favor of this release, and can help
> >>
> >>  
> >>
> >> Cezar 
> >>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
> >> For additional commands, e-mail: dev-h...@xmlbeans.apache.org
> >>
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
> > For additional commands, e-mail: dev-h...@xmlbeans.apache.org
> >
> 
>  -
>  To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
>  For additional commands, e-mail: dev-h...@xmlbeans.apache.org
> 
> >>>
> >>> -
> >>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> >>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> >>>
> >>>
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> >> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> > For additional commands, e-mail: user-h...@xmlbeans.apache.org
> >
> >
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: [VOTE] XMLBeans v2.6.0-RC3 to become official release

2012-08-11 Thread Pascal Heus
Thanks Cezar. BTW, is there any plan to support the latest version of
Saxon-HE (particularly now that the package is publicly available
through Maven)?
best
*P

On 8/10/12 2:02 PM, Cezar Andrei wrote:
> Pascal,
>
> Thanks for the support, the list of changes can be found in CHANGES.txt:
> http://svn.apache.org/viewvc/xmlbeans/trunk/CHANGES.txt?view=markup
>
> Cezar
>
>
> On Wed, 2012-08-08 at 20:30 -0700, Pascal Heus wrote:
>> Cezar:
>> We're extensively using the package and welcome an update. This
>> definitely has my vote (but it's non-binding)
>> BTW, is there a full list of changes available?
>> thanks
>> *P
>>
>> On 8/8/12 8:33 PM, Cezar Andrei wrote:
>>> Because I didn't receive any votes, I'm extending the vote period until
>>> end of next Monday, August 13.
>>>
>>> Cezar
>>>
>>> On Wed, 2012-08-08 at 17:07 -0700, Cezar Andrei wrote:
 The files are now up at http://xmlbeans.apache.org/dist/ please do send
 your votes.

 Thanks,
 Cezar

 On Thu, 2012-08-02 at 11:04 -0700, Cezar Andrei wrote:
> The files are not here: http://xmlbeans.apache.org/dist/ yet, they
> should get sync-ed soon. I'll send an update when they're up.
>
> In the meantime, you can find the same files here:
> http://apache.org/~cezar/xmlbeans-2.6.0/
>
> Cezar
>
>
> On Thu, 2012-08-02 at 10:46 -0700, Cezar Andrei wrote:
>> Please cast your vote for the XMLBeans v2.6.0-RC3, as published at
>> http://xmlbeans.apache.org/dist/ to become XMLBeans v2.6.0 official
>> release.
>>
>>  
>>
>> The vote will be open until end of day Monday, August 6. Anyone is
>> allowed to show support or lack of it, but only XMLBeans committer votes
>> are binding.
>>
>>  
>>
>> [ ]  +1  -  I am in favor of this release, and can help
>>
>> [ ]  +0  -  I am in favor of this release, but cannot help
>>
>> [ ]  -0  -  I am not in favor of this release
>>
>> [ ]  -1  -  I am against this proposal (must include a reason) 
>>
>>  
>>
>>
>>
>>
>>
>> My vote is:
>>
>> [X]  +1  -  I am in favor of this release, and can help
>>
>>  
>>
>> Cezar 
>>
>>
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
>> For additional commands, e-mail: dev-h...@xmlbeans.apache.org
>>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: dev-h...@xmlbeans.apache.org
>

 -
 To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
 For additional commands, e-mail: dev-h...@xmlbeans.apache.org

>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
>> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>


-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: [VOTE] XMLBeans v2.6.0-RC3 to become official release

2012-08-10 Thread Cezar Andrei
Pascal,

Thanks for the support, the list of changes can be found in CHANGES.txt:
http://svn.apache.org/viewvc/xmlbeans/trunk/CHANGES.txt?view=markup

Cezar


On Wed, 2012-08-08 at 20:30 -0700, Pascal Heus wrote:
> Cezar:
> We're extensively using the package and welcome an update. This
> definitely has my vote (but it's non-binding)
> BTW, is there a full list of changes available?
> thanks
> *P
> 
> On 8/8/12 8:33 PM, Cezar Andrei wrote:
> > Because I didn't receive any votes, I'm extending the vote period until
> > end of next Monday, August 13.
> >
> > Cezar
> >
> > On Wed, 2012-08-08 at 17:07 -0700, Cezar Andrei wrote:
> >> The files are now up at http://xmlbeans.apache.org/dist/ please do send
> >> your votes.
> >>
> >> Thanks,
> >> Cezar
> >>
> >> On Thu, 2012-08-02 at 11:04 -0700, Cezar Andrei wrote:
> >>> The files are not here: http://xmlbeans.apache.org/dist/ yet, they
> >>> should get sync-ed soon. I'll send an update when they're up.
> >>>
> >>> In the meantime, you can find the same files here:
> >>> http://apache.org/~cezar/xmlbeans-2.6.0/
> >>>
> >>> Cezar
> >>>
> >>>
> >>> On Thu, 2012-08-02 at 10:46 -0700, Cezar Andrei wrote:
>  Please cast your vote for the XMLBeans v2.6.0-RC3, as published at
>  http://xmlbeans.apache.org/dist/ to become XMLBeans v2.6.0 official
>  release.
> 
>   
> 
>  The vote will be open until end of day Monday, August 6. Anyone is
>  allowed to show support or lack of it, but only XMLBeans committer votes
>  are binding.
> 
>   
> 
>  [ ]  +1  -  I am in favor of this release, and can help
> 
>  [ ]  +0  -  I am in favor of this release, but cannot help
> 
>  [ ]  -0  -  I am not in favor of this release
> 
>  [ ]  -1  -  I am against this proposal (must include a reason) 
> 
>   
> 
> 
> 
> 
> 
>  My vote is:
> 
>  [X]  +1  -  I am in favor of this release, and can help
> 
>   
> 
>  Cezar 
> 
> 
> 
>  -
>  To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
>  For additional commands, e-mail: dev-h...@xmlbeans.apache.org
> 
> >>>
> >>>
> >>> -
> >>> To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
> >>> For additional commands, e-mail: dev-h...@xmlbeans.apache.org
> >>>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
> >> For additional commands, e-mail: dev-h...@xmlbeans.apache.org
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> > For additional commands, e-mail: user-h...@xmlbeans.apache.org
> >
> >
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
> 



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: [VOTE] XMLBeans v2.6.0-RC3 to become official release

2012-08-10 Thread Pim Tjeertes

+0
Pim

Kevin Krouse schreef op 2012-08-09 19:42:

+0

Thanks,
Kevin

On Wed, Aug 8, 2012 at 5:33 PM, Cezar Andrei 
 wrote:
Because I didn't receive any votes, I'm extending the vote period 
until

end of next Monday, August 13.

Cezar

On Wed, 2012-08-08 at 17:07 -0700, Cezar Andrei wrote:
The files are now up at http://xmlbeans.apache.org/dist/ please do 
send

your votes.

Thanks,
Cezar

On Thu, 2012-08-02 at 11:04 -0700, Cezar Andrei wrote:
> The files are not here: http://xmlbeans.apache.org/dist/ yet, 
they

> should get sync-ed soon. I'll send an update when they're up.
>
> In the meantime, you can find the same files here:
> http://apache.org/~cezar/xmlbeans-2.6.0/
>
> Cezar
>
>
> On Thu, 2012-08-02 at 10:46 -0700, Cezar Andrei wrote:
> > Please cast your vote for the XMLBeans v2.6.0-RC3, as published 
at
> > http://xmlbeans.apache.org/dist/ to become XMLBeans v2.6.0 
official

> > release.
> >
> >
> >
> > The vote will be open until end of day Monday, August 6. Anyone 
is
> > allowed to show support or lack of it, but only XMLBeans 
committer votes

> > are binding.
> >
> >
> >
> > [ ]  +1  -  I am in favor of this release, and can help
> >
> > [ ]  +0  -  I am in favor of this release, but cannot help
> >
> > [ ]  -0  -  I am not in favor of this release
> >
> > [ ]  -1  -  I am against this proposal (must include a reason)
> >
> >
> >
> >
> >
> >
> >
> > My vote is:
> >
> > [X]  +1  -  I am in favor of this release, and can help
> >
> >
> >
> > Cezar
> >
> >
> >
> > 
-

> > To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
> > For additional commands, e-mail: dev-h...@xmlbeans.apache.org
> >
>
>
>
> 
-

> To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: dev-h...@xmlbeans.apache.org
>




-
To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: dev-h...@xmlbeans.apache.org






-
To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: dev-h...@xmlbeans.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



Re: [VOTE] XMLBeans v2.6.0-RC3 to become official release

2012-08-09 Thread Kevin Krouse
+0

Thanks,
Kevin

On Wed, Aug 8, 2012 at 5:33 PM, Cezar Andrei  wrote:
> Because I didn't receive any votes, I'm extending the vote period until
> end of next Monday, August 13.
>
> Cezar
>
> On Wed, 2012-08-08 at 17:07 -0700, Cezar Andrei wrote:
>> The files are now up at http://xmlbeans.apache.org/dist/ please do send
>> your votes.
>>
>> Thanks,
>> Cezar
>>
>> On Thu, 2012-08-02 at 11:04 -0700, Cezar Andrei wrote:
>> > The files are not here: http://xmlbeans.apache.org/dist/ yet, they
>> > should get sync-ed soon. I'll send an update when they're up.
>> >
>> > In the meantime, you can find the same files here:
>> > http://apache.org/~cezar/xmlbeans-2.6.0/
>> >
>> > Cezar
>> >
>> >
>> > On Thu, 2012-08-02 at 10:46 -0700, Cezar Andrei wrote:
>> > > Please cast your vote for the XMLBeans v2.6.0-RC3, as published at
>> > > http://xmlbeans.apache.org/dist/ to become XMLBeans v2.6.0 official
>> > > release.
>> > >
>> > >
>> > >
>> > > The vote will be open until end of day Monday, August 6. Anyone is
>> > > allowed to show support or lack of it, but only XMLBeans committer votes
>> > > are binding.
>> > >
>> > >
>> > >
>> > > [ ]  +1  -  I am in favor of this release, and can help
>> > >
>> > > [ ]  +0  -  I am in favor of this release, but cannot help
>> > >
>> > > [ ]  -0  -  I am not in favor of this release
>> > >
>> > > [ ]  -1  -  I am against this proposal (must include a reason)
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > My vote is:
>> > >
>> > > [X]  +1  -  I am in favor of this release, and can help
>> > >
>> > >
>> > >
>> > > Cezar
>> > >
>> > >
>> > >
>> > > -
>> > > To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
>> > > For additional commands, e-mail: dev-h...@xmlbeans.apache.org
>> > >
>> >
>> >
>> >
>> > -
>> > To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
>> > For additional commands, e-mail: dev-h...@xmlbeans.apache.org
>> >
>>
>>
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
>> For additional commands, e-mail: dev-h...@xmlbeans.apache.org
>>
>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: dev-h...@xmlbeans.apache.org
>

-
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org



  1   2   3   4   5   6   7   8   9   10   >