You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Michael Hermann Malburg (JIRA)" <xe...@xml.apache.org> on 2013/08/16 14:29:47 UTC
[jira] [Updated] (XERCESJ-1619) Restricting a sequence of three
elements with final wildcard to the wildcard alone yields error
[ https://issues.apache.org/jira/browse/XERCESJ-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Hermann Malburg updated XERCESJ-1619:
---------------------------------------------
Attachment: Restriction-2.xsd
Restriction-1.xsd
> Restricting a sequence of three elements with final wildcard to the wildcard alone yields error
> -----------------------------------------------------------------------------------------------
>
> Key: XERCESJ-1619
> URL: https://issues.apache.org/jira/browse/XERCESJ-1619
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.0 Structures
> Affects Versions: 2.11.0
> Environment: oXygen 14.1 with Xerces 2.11 sentenced to work with Windows 7
> Reporter: Michael Hermann Malburg
> Attachments: Restriction-1.xsd, Restriction-2.xsd
>
>
> I receive validation errors for #cos-particle-restrict and #derivation-ok-restriction when restricting a sequence consisting of two optional elements followed by an wildcard to a wildcard standing alone, see example for details. The situation turn curious in inspecting the attached file (attachment "Restriction-2.xsd") which has an intermediate class working fine.
> Example (attachment "Restriction-1.xsd")
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="vdpNs"
> version="1.0" xml:lang="en" xmlns:vdp="vdpNs" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <xsd:complexType name="TopType">
> <xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="0" name="first" type="xsd:int" />
> <xsd:element maxOccurs="1" minOccurs="0" name="second" type="xsd:string" />
> <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="skip" />
> </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="BottomType">
> <xsd:complexContent>
> <xsd:restriction base="vdp:TopType">
> <xsd:sequence>
> <xsd:element maxOccurs="0" minOccurs="0" name="first" type="xsd:int" />
> <xsd:element maxOccurs="0" minOccurs="0" name="second" type="xsd:string" />
> <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="skip" />
> </xsd:sequence>
> </xsd:restriction>
> </xsd:complexContent>
> </xsd:complexType>
> </xsd:schema>
> Extract from oXygen's formatted result (belonging both to line 11 = "… complexType … BottomType …"):
> Engine name: Xerces
> Severity: error
> Description: cos-particle-restrict.2: Forbidden particle restriction: 'any:choice,sequence,all,elt'.
> URL: http://www.w3.org/TR/xmlschema-1/#cos-particle-restrict
> Engine name: Xerces
> Severity: error
> Description: derivation-ok-restriction.5.4.2: Error for type 'BottomType'. The particle of the type is not a valid restriction of the particle of the base.
> URL: http://www.w3.org/TR/xmlschema-1/#derivation-ok-restriction
> Further observations:
> - only forbiding one of elements "first" and "second" validates fine in both cases
> - both examples are validated with success by the W3C validator
> - example printed inline above seems minimal in some sense
> - changing the wildcard's namespace only leads to slightly differing results
> - incrementing all "maxOccurs" values by 1 results in successful validation
--
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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org