anyAtomicType cannot be used as the base of built in simpleType.
----------------------------------------------------------------

                 Key: XERCESJ-1437
                 URL: https://issues.apache.org/jira/browse/XERCESJ-1437
             Project: Xerces2-J
          Issue Type: Improvement
          Components: XML Schema 1.1 Datatypes
    Affects Versions: 2.9.1
            Reporter: Kun Xu
            Priority: Minor
             Fix For: 2.10.0
         Attachments: XSDSimpleTypeTraverser_patch.txt

Failed to check that anyAtomicType cannot be used as the base of built in 
simpleType.

Example:

XSD:

<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema";
        targetNamespace="http://www.schemaTest.org/schema11";
        xmlns:sv="http://www.schemaTest.org/schema11";>
        
<simpleType name="strType">
        <restriction base="anyAtomicType"/>
</simpleType>

<element name="root">
        <complexType>
                <sequence>
                        <element name="elAnySimpleType" type="sv:strType"/>
                </sequence>
        </complexType>
</element>    

</schema> 

XML:

<?xml version="1.0" encoding="UTF-8"?>
<dv:root xmlns:dv="http://www.schemaTest.org/schema11";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://www.schemaTest.org/schema11
        test_anyAtomicType.xsd">
        
        <elAnySimpleType>Test</elAnySimpleType>
</dv:root>

Suggestion:

Add condition when we verify the base type.  Please verify the attached patch. 
Thanks.


-- 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to