Greetings,

Could someone please enlighten me on why these document had been validated without error? Shouldn't the line feed be preserved when
validating the 'd' attribute so that the pattern check fails?

======= b.xml =============
<?xml version="1.0"?>
<e xmlns="e" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="e a.xsd" d="k
"/>
===========================
======= a.xsd =============
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:e="e" targetNamespace="e">
        <xs:simpleType name="a">
                <xs:restriction base="xs:string">
                        <xs:pattern 
value="[&#x0020;]*[&#x0021;-&#x007E;][&#x0020;-&#x007E;]*"/>
                        <xs:whiteSpace value="preserve"/>
                </xs:restriction>
        </xs:simpleType>
        <xs:complexType name="c">
                <xs:attribute name="d" type="e:a">
                </xs:attribute>
        </xs:complexType>
        <xs:element name="e" type="e:c"/>
</xs:schema>
===========================

Good luck!
        Vitaly

Reply via email to