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=18586>.
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=18586

xs:token validation completely broken

           Summary: xs:token validation completely broken
           Product: Xerces2-J
           Version: 2.4.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: XML Schema datatypes
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


This is an easy one to reproduce. Simply define an element in an W3C XmlSchema
as type xs:token, and and create a document which uses that element and add
leading or trailing spaces to the text of the element, or multiple spaces
between words, or tabs or new lines--pretty much any of the junk xs:token is
meant to filter out. Xerces 2.4.0 is quite happy to validate all of it.

Sample schema:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified" attributeFormDefault="unqualified">
        <xs:element name="tok" type="xs:token">
        </xs:element>
</xs:schema>

Sample xml instance:

<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSPY v5 rel. 3 U (http://www.xmlspy.com)-->
<tok xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="file:///c:/tok.xsd">  token  
                 token </tok>

I think this worked properly in a previous version, but I couldn't swear to it.

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

Reply via email to