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 "Herbert Oppmann (JIRA)" <xe...@xml.apache.org> on 2013/02/11 10:57:12 UTC

[jira] [Created] (XERCESC-2008) xsi:type whiteSpace facet

Herbert Oppmann created XERCESC-2008:
----------------------------------------

             Summary: xsi:type whiteSpace facet
                 Key: XERCESC-2008
                 URL: https://issues.apache.org/jira/browse/XERCESC-2008
             Project: Xerces-C++
          Issue Type: Bug
          Components: Validating Parser (XML Schema)
    Affects Versions: 2.8.0, 3.0.0, 3.1.0, 3.1.1
         Environment: Windows 7, Command Prompt, example program DOMCount. 
            Reporter: Herbert Oppmann
            Priority: Minor


With the example below, the validation returns "type ' ItemT' specified in 'xsi:type' cannot be resolved".
Obviously, Xerces does not do Attribute Value Normalization applying whiteSpace="collapse" on the attribute 'xsi:type'.
The value of the attribute 'xsi:type' is QName (see http://www.w3.org/TR/xmlschema-1/#xsi_type). QName is an atomic type (see http://www.w3.org/TR/xmlschema-2/#built-in-datatypes). For atomic datatypes the value of the whiteSpace facet is 'collapse' (see http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace).

The command line used is: DOMCount.exe -v=always -s -f -n Type.xml

Schema Type.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:test="http://www.example.com/Type" targetNamespace="http://www.example.com/Type" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xsd:element name="Type">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Item" type="test:ItemT" maxOccurs="unbounded"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:complexType name="ItemT">
		<xsd:attribute name="Id" type="xsd:unsignedInt" use="required"/>
	</xsd:complexType>
</xsd:schema>

Example Type.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.example.com/Type" xsi:schemaLocation="http://www.example.com/Type Type.xsd">
	<Item Id="1" xsi:type=" ItemT"/>
	<Item Id="2" xsi:type="ItemT&#10;"/>
</Type>


--
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: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org