DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22457>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22457

xsi:type for union types with pattern facet does'nt work

           Summary: xsi:type for union types with pattern facet does'nt work
           Product: Xerces-C++
           Version: 2.3.0
          Platform: Sun
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Validating Parser (Schema) (Xerces 1.5 or up only)
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


XSD schema:

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>

        <xs:element name="BooleanunionPattern" type="booleanunionPattern"/>

        <xs:simpleType name="booleanunion">
                <xs:union memberTypes="xs:boolean xs:string"/>
        </xs:simpleType>

        <xs:simpleType name="booleanunionPattern">
                <xs:restriction base="booleanunion">
                        <xs:pattern value="1|true|good"/>
                </xs:restriction>
        </xs:simpleType>

</xs:schema>

XML instance:

<?xml version="1.0" encoding="UTF-8"?>
<BooleanunionPattern xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:noNamespaceSchemaLocation="boolean.xsd" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xsi:type="xsd:string">good</BooleanunionPattern>

Xerces 2.3.0 error (SAX2Count.exe on Win32):

Error at file D:\Program Files\xerces-c_2_3_0-win32\bin/boolean.xml, line 2, 
char 187
  Message: Type 'xsd:string' that is used in xsi:type is not derived from the 
type of element 'BooleanunionPattern'

Note: XSV does not give any errors.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to