You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "William Eliot Kimber (JIRA)" <ji...@apache.org> on 2011/03/29 22:28:05 UTC
[jira] [Created] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
-----------------------------------------------------------------------------------
Key: XMLSCHEMA-10
URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
Project: XmlSchema
Issue Type: Bug
Affects Versions: XmlSchema 1.4.6, XmlSchema 1.4.4, XmlSchema 1.4.7
Reporter: William Eliot Kimber
GIven this original markup:
<xs:restriction base="xs:anyType">
<xs:sequence>
<xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
</xs:sequence>
<xs:attribute name="lang" use="optional"/>
</xs:restriction>
After parsing and serializing the schema with no intervening modification, the serialized result is:
<xs:restriction base="tns:SimpleLiteral">
<xs:attribute name="lang" use="prohibited"/>
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:restriction>
Note the xs:attribute before the xs:simpleType.
The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
Re: [jira] [Commented] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by Benson Margulies <bi...@gmail.com>.
Yes, 2.0 is released. What have I neglected to update to make that clearer?
On Tue, Mar 29, 2011 at 5:25 PM, William Eliot Kimber (JIRA)
<ji...@apache.org> wrote:
>
> [ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012711#comment-13012711 ]
>
> William Eliot Kimber commented on XMLSCHEMA-10:
> -----------------------------------------------
>
> I can try to work up a patch--it's a very simple fix.
>
> It didn't look like 2.0 was released yet.
>
>> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
>> -----------------------------------------------------------------------------------
>>
>> Key: XMLSCHEMA-10
>> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
>> Project: XmlSchema
>> Issue Type: Bug
>> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
>> Reporter: William Eliot Kimber
>> Labels: serialization
>>
>> GIven this original markup:
>> <xs:restriction base="xs:anyType">
>> <xs:sequence>
>> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
>> </xs:sequence>
>> <xs:attribute name="lang" use="optional"/>
>> </xs:restriction>
>> After parsing and serializing the schema with no intervening modification, the serialized result is:
>> <xs:restriction base="tns:SimpleLiteral">
>> <xs:attribute name="lang" use="prohibited"/>
>> <xs:simpleType>
>> <xs:restriction base="xs:string"/>
>> </xs:simpleType>
>> </xs:restriction>
>> Note the xs:attribute before the xs:simpleType.
>> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
>> I can provide a simple unit test that demonstrates the failure if needed.
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: dev-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105416#comment-13105416 ]
Hudson commented on XMLSCHEMA-10:
---------------------------------
Integrated in xmlschema-trunk-jdk15 #14 (See [https://builds.apache.org/job/xmlschema-trunk-jdk15/14/])
[XMLSCHEMA-10] Fix issues with attributes being written out before the facets
Patch from William Eliot Kimber applied
(also fix stuff I shouldn't have committed in my last commit... need to switch
my XmlSchema checkout to git.....)
dkulp :
Files :
* /webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
> -----------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-10
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
> Reporter: William Eliot Kimber
> Assignee: Daniel Kulp
> Labels: serialization
> Fix For: XmlSchema 1.4.7, XmlSchema 2.0.1
>
> Attachments: XMLSCHEMA-10-wek-patch.txt, wek-XMLSCHEMA-10-2.0.txt
>
>
> GIven this original markup:
> <xs:restriction base="xs:anyType">
> <xs:sequence>
> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="lang" use="optional"/>
> </xs:restriction>
> After parsing and serializing the schema with no intervening modification, the serialized result is:
> <xs:restriction base="tns:SimpleLiteral">
> <xs:attribute name="lang" use="prohibited"/>
> <xs:simpleType>
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:restriction>
> Note the xs:attribute before the xs:simpleType.
> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
> I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by "William Eliot Kimber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012830#comment-13012830 ]
William Eliot Kimber commented on XMLSCHEMA-10:
-----------------------------------------------
Hmm. It may have been the fact that I was trying to find the source of the library the code I was fixing used (1.4.5) or the roundabout way I came to it, but I never found the general Web Services page nor did I realize that XmlSchema was part of the Web Services project, as opposed to the general Apache commons project or the XML project.
I'll see about upgrading to 2.0.
> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
> -----------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-10
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
> Reporter: William Eliot Kimber
> Labels: serialization
> Attachments: XMLSCHEMA-10-wek-patch.txt
>
>
> GIven this original markup:
> <xs:restriction base="xs:anyType">
> <xs:sequence>
> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="lang" use="optional"/>
> </xs:restriction>
> After parsing and serializing the schema with no intervening modification, the serialized result is:
> <xs:restriction base="tns:SimpleLiteral">
> <xs:attribute name="lang" use="prohibited"/>
> <xs:simpleType>
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:restriction>
> Note the xs:attribute before the xs:simpleType.
> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
> I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Resolved] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp resolved XMLSCHEMA-10.
----------------------------------
Resolution: Fixed
Fix Version/s: XmlSchema 2.0.1
XmlSchema 1.4.7
> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
> -----------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-10
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
> Reporter: William Eliot Kimber
> Assignee: Daniel Kulp
> Labels: serialization
> Fix For: XmlSchema 1.4.7, XmlSchema 2.0.1
>
> Attachments: XMLSCHEMA-10-wek-patch.txt, wek-XMLSCHEMA-10-2.0.txt
>
>
> GIven this original markup:
> <xs:restriction base="xs:anyType">
> <xs:sequence>
> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="lang" use="optional"/>
> </xs:restriction>
> After parsing and serializing the schema with no intervening modification, the serialized result is:
> <xs:restriction base="tns:SimpleLiteral">
> <xs:attribute name="lang" use="prohibited"/>
> <xs:simpleType>
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:restriction>
> Note the xs:attribute before the xs:simpleType.
> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
> I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Assigned] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp reassigned XMLSCHEMA-10:
------------------------------------
Assignee: Daniel Kulp
> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
> -----------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-10
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
> Reporter: William Eliot Kimber
> Assignee: Daniel Kulp
> Labels: serialization
> Attachments: XMLSCHEMA-10-wek-patch.txt, wek-XMLSCHEMA-10-2.0.txt
>
>
> GIven this original markup:
> <xs:restriction base="xs:anyType">
> <xs:sequence>
> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="lang" use="optional"/>
> </xs:restriction>
> After parsing and serializing the schema with no intervening modification, the serialized result is:
> <xs:restriction base="tns:SimpleLiteral">
> <xs:attribute name="lang" use="prohibited"/>
> <xs:simpleType>
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:restriction>
> Note the xs:attribute before the xs:simpleType.
> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
> I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by "William Eliot Kimber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012832#comment-13012832 ]
William Eliot Kimber commented on XMLSCHEMA-10:
-----------------------------------------------
There's also this comment on the 2.0 page:
XmlSchema 2.0 has not yet been released.
> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
> -----------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-10
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
> Reporter: William Eliot Kimber
> Labels: serialization
> Attachments: XMLSCHEMA-10-wek-patch.txt, wek-XMLSCHEMA-10-2.0.txt
>
>
> GIven this original markup:
> <xs:restriction base="xs:anyType">
> <xs:sequence>
> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="lang" use="optional"/>
> </xs:restriction>
> After parsing and serializing the schema with no intervening modification, the serialized result is:
> <xs:restriction base="tns:SimpleLiteral">
> <xs:attribute name="lang" use="prohibited"/>
> <xs:simpleType>
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:restriction>
> Note the xs:attribute before the xs:simpleType.
> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
> I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012752#comment-13012752 ]
Benson Margulies commented on XMLSCHEMA-10:
-------------------------------------------
Yes, 2.0 is released. Is there some conspicuous page I've neglected to update that would have clued you in?
> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
> -----------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-10
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
> Reporter: William Eliot Kimber
> Labels: serialization
> Attachments: XMLSCHEMA-10-wek-patch.txt
>
>
> GIven this original markup:
> <xs:restriction base="xs:anyType">
> <xs:sequence>
> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="lang" use="optional"/>
> </xs:restriction>
> After parsing and serializing the schema with no intervening modification, the serialized result is:
> <xs:restriction base="tns:SimpleLiteral">
> <xs:attribute name="lang" use="prohibited"/>
> <xs:simpleType>
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:restriction>
> Note the xs:attribute before the xs:simpleType.
> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
> I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by "William Eliot Kimber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012815#comment-13012815 ]
William Eliot Kimber commented on XMLSCHEMA-10:
-----------------------------------------------
If I go here: http://ws.apache.org/commons/XmlSchema/download.html
1.4.7 is the latest release shown.
I also tried guessing at the SVN location to get the code and nothing I tried worked.
Cheers,
E.
> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
> -----------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-10
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
> Reporter: William Eliot Kimber
> Labels: serialization
> Attachments: XMLSCHEMA-10-wek-patch.txt
>
>
> GIven this original markup:
> <xs:restriction base="xs:anyType">
> <xs:sequence>
> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="lang" use="optional"/>
> </xs:restriction>
> After parsing and serializing the schema with no intervening modification, the serialized result is:
> <xs:restriction base="tns:SimpleLiteral">
> <xs:attribute name="lang" use="prohibited"/>
> <xs:simpleType>
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:restriction>
> Note the xs:attribute before the xs:simpleType.
> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
> I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012818#comment-13012818 ]
Benson Margulies commented on XMLSCHEMA-10:
-------------------------------------------
I see. That's effectively archived content.
http://ws.apache.org/
would lead you in the right direction. I'll see if I can patch the former.
> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
> -----------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-10
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
> Reporter: William Eliot Kimber
> Labels: serialization
> Attachments: XMLSCHEMA-10-wek-patch.txt
>
>
> GIven this original markup:
> <xs:restriction base="xs:anyType">
> <xs:sequence>
> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="lang" use="optional"/>
> </xs:restriction>
> After parsing and serializing the schema with no intervening modification, the serialized result is:
> <xs:restriction base="tns:SimpleLiteral">
> <xs:attribute name="lang" use="prohibited"/>
> <xs:simpleType>
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:restriction>
> Note the xs:attribute before the xs:simpleType.
> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
> I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by "William Eliot Kimber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012711#comment-13012711 ]
William Eliot Kimber commented on XMLSCHEMA-10:
-----------------------------------------------
I can try to work up a patch--it's a very simple fix.
It didn't look like 2.0 was released yet.
> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
> -----------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-10
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
> Reporter: William Eliot Kimber
> Labels: serialization
>
> GIven this original markup:
> <xs:restriction base="xs:anyType">
> <xs:sequence>
> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="lang" use="optional"/>
> </xs:restriction>
> After parsing and serializing the schema with no intervening modification, the serialized result is:
> <xs:restriction base="tns:SimpleLiteral">
> <xs:attribute name="lang" use="prohibited"/>
> <xs:simpleType>
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:restriction>
> Note the xs:attribute before the xs:simpleType.
> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
> I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105465#comment-13105465 ]
Hudson commented on XMLSCHEMA-10:
---------------------------------
Integrated in xmlschema-1.4-branch-jdk15 #18 (See [https://builds.apache.org/job/xmlschema-1.4-branch-jdk15/18/])
[XMLSCHEMA-10] Fix issue of attributes being written before facets
Patch from William Eliot Kimber applied
dkulp : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1171123
Files :
* /webservices/commons/branches/modules/XmlSchema/1_4_X_BRANCH/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
> -----------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-10
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
> Reporter: William Eliot Kimber
> Assignee: Daniel Kulp
> Labels: serialization
> Fix For: XmlSchema 1.4.7, XmlSchema 2.0.1
>
> Attachments: XMLSCHEMA-10-wek-patch.txt, wek-XMLSCHEMA-10-2.0.txt
>
>
> GIven this original markup:
> <xs:restriction base="xs:anyType">
> <xs:sequence>
> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="lang" use="optional"/>
> </xs:restriction>
> After parsing and serializing the schema with no intervening modification, the serialized result is:
> <xs:restriction base="tns:SimpleLiteral">
> <xs:attribute name="lang" use="prohibited"/>
> <xs:simpleType>
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:restriction>
> Note the xs:attribute before the xs:simpleType.
> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
> I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012673#comment-13012673 ]
Benson Margulies commented on XMLSCHEMA-10:
-------------------------------------------
I don't suppose I could interest you in either (a) submitting a patch, or (b) moving to 2.0, or (c) both?
> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
> -----------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-10
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
> Reporter: William Eliot Kimber
> Labels: serialization
>
> GIven this original markup:
> <xs:restriction base="xs:anyType">
> <xs:sequence>
> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="lang" use="optional"/>
> </xs:restriction>
> After parsing and serializing the schema with no intervening modification, the serialized result is:
> <xs:restriction base="tns:SimpleLiteral">
> <xs:attribute name="lang" use="prohibited"/>
> <xs:simpleType>
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:restriction>
> Note the xs:attribute before the xs:simpleType.
> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
> I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Updated] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by "William Eliot Kimber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
William Eliot Kimber updated XMLSCHEMA-10:
------------------------------------------
Attachment: XMLSCHEMA-10-wek-patch.txt
Patch against 1.4.7
> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
> -----------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-10
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
> Reporter: William Eliot Kimber
> Labels: serialization
> Attachments: XMLSCHEMA-10-wek-patch.txt
>
>
> GIven this original markup:
> <xs:restriction base="xs:anyType">
> <xs:sequence>
> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="lang" use="optional"/>
> </xs:restriction>
> After parsing and serializing the schema with no intervening modification, the serialized result is:
> <xs:restriction base="tns:SimpleLiteral">
> <xs:attribute name="lang" use="prohibited"/>
> <xs:simpleType>
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:restriction>
> Note the xs:attribute before the xs:simpleType.
> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
> I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Updated] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by "William Eliot Kimber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
William Eliot Kimber updated XMLSCHEMA-10:
------------------------------------------
Attachment: wek-XMLSCHEMA-10-2.0.txt
Patch for 2.0. I didn't test it (not sure how to compile the project) but it's essentially identical to the 1.4.7 fix.
> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
> -----------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-10
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
> Reporter: William Eliot Kimber
> Labels: serialization
> Attachments: XMLSCHEMA-10-wek-patch.txt, wek-XMLSCHEMA-10-2.0.txt
>
>
> GIven this original markup:
> <xs:restriction base="xs:anyType">
> <xs:sequence>
> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="lang" use="optional"/>
> </xs:restriction>
> After parsing and serializing the schema with no intervening modification, the serialized result is:
> <xs:restriction base="tns:SimpleLiteral">
> <xs:attribute name="lang" use="prohibited"/>
> <xs:simpleType>
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:restriction>
> Note the xs:attribute before the xs:simpleType.
> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
> I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (XMLSCHEMA-10) Serialized xs:restriction puts
xs:attribute before xs:simpleType when it should not
Posted by "William Eliot Kimber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105514#comment-13105514 ]
William Eliot Kimber commented on XMLSCHEMA-10:
-----------------------------------------------
Thanks for the fix! I look forward to trying it out.
Cheers,
Eliot
> Serialized xs:restriction puts xs:attribute before xs:simpleType when it should not
> -----------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-10
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-10
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 1.4.4, XmlSchema 1.4.6, XmlSchema 1.4.7
> Reporter: William Eliot Kimber
> Assignee: Daniel Kulp
> Labels: serialization
> Fix For: XmlSchema 1.4.7, XmlSchema 2.0.1
>
> Attachments: XMLSCHEMA-10-wek-patch.txt, wek-XMLSCHEMA-10-2.0.txt
>
>
> GIven this original markup:
> <xs:restriction base="xs:anyType">
> <xs:sequence>
> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
> </xs:sequence>
> <xs:attribute name="lang" use="optional"/>
> </xs:restriction>
> After parsing and serializing the schema with no intervening modification, the serialized result is:
> <xs:restriction base="tns:SimpleLiteral">
> <xs:attribute name="lang" use="prohibited"/>
> <xs:simpleType>
> <xs:restriction base="xs:string"/>
> </xs:simpleType>
> </xs:restriction>
> Note the xs:attribute before the xs:simpleType.
> The bug appears to a simple coding error in org.apache.ws.commons.schema.XmlSchemaSerializer.serializeSimpleContentRestriction(Document, XmlSchemaSimpleContentRestriction, XmlSchema) in that it's putting the attributes out before the inline simple type.
> I can provide a simple unit test that demonstrates the failure if needed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org