[JIRA] Created: (JAXB-947) xjc: Incorrect propOrder if xs:all in an extension of an attribute-only type

  • From: "georgm (JIRA)" <jira-no-reply@...>
  • To: issues@...
  • Subject: [JIRA] Created: (JAXB-947) xjc: Incorrect propOrder if xs:all in an extension of an attribute-only type
  • Date: Tue, 5 Feb 2013 17:52:54 +0000 (GMT+00:00)
  • Auto-submitted: auto-generated

xjc: Incorrect propOrder if xs:all in an extension of an attribute-only type
----------------------------------------------------------------------------

                 Key: JAXB-947
                 URL: http://java.net/jira/browse/JAXB-947
             Project: jaxb
          Issue Type: Bug
          Components: xjc
    Affects Versions: 2.2.6
            Reporter: georgm
            Assignee: Iaroslav Savytskyi


I have the following schema:

{code}
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema";
        targetNamespace="http://www.example.org/proporder";
        xmlns:proporder="http://www.example.org/proporder";
        elementFormDefault="qualified">

    <complexType name="parent">
        <attribute name="version" type="string"></attribute>
    </complexType>

    <complexType name="child">
        <complexContent>
                <extension base="proporder:parent">
                        <all>
                                <element name="foo" type="string"></element>
                                <element name="bar" type="string"></element>
                        </all>
                </extension>
        </complexContent>
    </complexType>

    <element name="childInstance" type="proporder:child"/>
</schema>
{code}

The generated source for the child element class ignores the all group model 
and sets propOrder={"foo", "bar"}.
The correct behavior would be propOrder={ }

With the current behavior, the following xml will not validate, even if 
correct:

{code}
<?xml version="1.0" encoding="UTF-8"?>
<proporder:childInstance version="foobar" 
xmlns:proporder="http://www.example.org/proporder";>
  <proporder:bar>bar</proporder:bar>
  <proporder:foo>foo</proporder:foo>
</proporder:childInstance>
{code}

Looking at the source, the reason is that the ALL-Check is only done in 
FreshComplexTypeBuilder.java, but not in ExtendedComplexTypeBuilder.java.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[JIRA] Created: (JAXB-947) xjc: Incorrect propOrder if xs:all in an extension of an attribute-only type

georgm (JIRA) 02/05/2013
Terms of Use; Privacy Policy; Copyright ©2013-2016 (revision 20160708.bf2ac18)
 
 
Close
loading
Please Confirm
Close