W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2002

Please confirm parser error concerning ws

From: Rainer Becker <rainerbecker.mail@t-online.de>
Date: Sun, 22 Sep 2002 18:14:58 +0200
Message-ID: <3D8DEC82.EA3C3795@t-online.de>
To: xmlschema-dev@w3.org

Hallo newsgroup readers,

I have a question concerning the following schema and the handling
of whitespaces:

   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

      <xsd:element name="Final">
               <xsd:element name="Test" type="TestType" />

      <xsd:complexType name="TestType">
            <xsd:extension base="xsd:string">
                <xsd:attribute name="id" type="xsd:ID"/>


Validating the following instance against it works just fine, (as

   <Test id="myId"></Test>

But if i put any whitespaces into the attribute value, the tells me,
that "attribute content is invalid according to DTD/Schema". So

   <Test id="

does not work. The parser tells me that
"Attribute Value is invalid according to Schema"

The fact is, that ID inherits whitespace="collapse" from
the value space of token. Additionally, ID inherits the
NCName pattern (from the value space of NCName)

Because the whitespace normalization takes place BEFORE the
attribute value is validated against the schema, the second
instance should be valid too. Can one confirm please?

Thank, you very much!

Rainer Becker
Received on Sunday, 22 September 2002 12:14:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:05 UTC