You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Anton Nikolaevsky (JIRA)" <xe...@xml.apache.org> on 2008/01/11 15:39:34 UTC
[jira] Updated: (XERCESC-697) Incorrect Schema Validation Failure
When Redefining Complex Type with Simple Content
[ https://issues.apache.org/jira/browse/XERCESC-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anton Nikolaevsky updated XERCESC-697:
--------------------------------------
Attachment: (was: TraverseSchema.cpp.595303.diff)
> Incorrect Schema Validation Failure When Redefining Complex Type with Simple Content
> ------------------------------------------------------------------------------------
>
> Key: XERCESC-697
> URL: https://issues.apache.org/jira/browse/XERCESC-697
> Project: Xerces-C++
> Issue Type: Bug
> Components: Validating Parser (Schema) (Xerces 1.5 or up only)
> Affects Versions: 2.1.0
> Environment: Operating System: Windows XP
> Platform: PC
> Reporter: Joe Misner
> Assignee: Xerces-C Developers Mailing List
> Attachments: TraverseSchema.cpp.611183.diff
>
>
> Running the SAXCount and DOMCount sample programs with "-n -s -f" options
> resulted in the following error diagnostic (one of several similar ones):
> Error at file C:\IVANSWork\NETParserBugs\DupDef\AcmeAdaptor_TagExt.xsd, line
> 9, char 45
> Message: The type 'ACORDAddressType_rdfn' is a simple type. It cannot be
> used in a derivation by RESTRICTION for a complexType
> The line identified in the error points to the following definition:
> <xs:redefine schemaLocation="acordV12_TagExt.xsd">
> <xs:complexType name="ACORDAddressType">
> <xs:simpleContent>
> <xs:restriction base="ACORDAddressType">
> <xs:enumeration value="BillingAddress"/>
> <xs:enumeration value="GaragingAddress"/>
> <xs:enumeration value="MailingAddress"/>
> <xs:enumeration value="StreetAddress"/>
> </xs:restriction>
> </xs:simpleContent>
> </xs:complexType>
> </xs:redfine>
>
> The original schema being redefined contains the following:
> <xsd:complexType name="AddressType" abstract="true">
> <xsd:simpleContent>
> <xsd:extension base="OpenEnum_NoID">
> <xsd:attribute name="id" type="ID"/>
> <xsd:attribute name="CodeListRef" type="IDREF"/>
> </xsd:extension>
> </xsd:simpleContent>
> </xsd:complexType>
> <xsd:complexType name="ACORDAddressType">
> <xsd:simpleContent>
> <xsd:restriction base="AddressType">
> <xsd:enumeration value="BillingAddress"/>
> <xsd:enumeration value="DataBackupStorageAddress"/>
> <xsd:enumeration value="DuplicateRecordsAddress"/>
> <xsd:enumeration value="FurthestTerminalAddress"/>
> <xsd:enumeration value="GaragingAddress"/>
> <xsd:enumeration value="MailingAddress"/>
> <xsd:enumeration value="PointOfDepartureAddress"/>
> <xsd:enumeration value="PointOfDestinationAddress"/>
> <xsd:enumeration value="PreviousAddress"/>
> <xsd:enumeration value="ShippingAddress"/>
> <xsd:enumeration value="SoftwareBackupStorageAddress"/>
> <xsd:enumeration value="StreetAddress"/>
> </xsd:restriction>
> </xsd:simpleContent>
> </xsd:complexType>
> Clearly the diagnostic message is inaccurate. The ACORDAddressType is NOT a
> simple type (in either schema); it is a complex type with simple content. It
> should be possible for the redefining schema to do simple-content
> restrictions, in this case limiting the values of the enumeration to a smaller
> subset than is given the original schema.
> FYI, the XSV, Xerces-J, and MSXML schema validators accept this syntax with no
> problem and apply it correctly to instance documents.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org