geronimo-xbean-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Moquin (JIRA)" <>
Subject [jira] [Created] (XBEAN-234) XSD any bugfix and missing strictOrder parameter added to XsdGenerator to match xbean-spring
Date Sun, 20 Jan 2013 01:50:12 GMT
Ryan Moquin created XBEAN-234:

             Summary: XSD any bugfix and missing strictOrder parameter added to XsdGenerator
to match xbean-spring
                 Key: XBEAN-234
             Project: XBean
          Issue Type: Bug
          Components: maven-plugin
    Affects Versions: 3.12
         Environment: Windows 8 64-bit
            Reporter: Ryan Moquin

This is meant for xbean-blueprint but the component is in the list above.

Changes the any element to have processContents lax, since blueprint always expects to validate
the xml which will fails in certain circumstances. If you try to use an element from another
namespace that isn't a root and place it as the child of an element belonging to a custom
namespace which allows "any" as a child, then you'll get a validation error during runtime
from the Blueprint parser. The reason the validation fails is because the any uses processContents="strict"
(I think it is), which only allows root elements to be placed there. 

This isn't caught in xbean-blueprint because the validation is turned off in the tests, but
it is always on in osgi blueprint. Tests will fail if you turn on validation (I had to hack
the test code to return the schema for the xml being tested and it was ugly, I'm sure someone
will know a better way to turn it on).  For example, the Favorites-xbean.xml will fail if
you try to validate it because the <list> element on line 30 isn't a root element.

The Strict order fix pull request I submitted has changes to fix this issue.  Ignore the two
commits that aren't mine, I'm not sure how I caused them to be in there.  I had to create
a branch and add in the proper commits for the pull request, everything needed should be there
for it, I apologize if I goofed, if anything is missing let me know and I'll give you whatever
it is :)

Also, the name strict order isn't actually the correct name, the changes I submitted in the
pull request are also to make it so that the strictOrder attribute is used in the XsdGenerator,
since it's missing in xbean-blueprint but present in xbean-spring.  So really there are two
similar things in this pull request.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message