W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2007

Re: cvc-datatype-valid.1.2.1 and cvc-type.3.1.3 - why?

From: Andreas Kemkes <a5sk4s@yahoo.com>
Date: Fri, 27 Jul 2007 13:57:00 -0700 (PDT)
To: Andreas Kemkes <a5sk4s@yahoo.com>, xmlschema-dev@w3.org
Message-ID: <964857.6837.qm@web51505.mail.re2.yahoo.com>

I was too much focused on the pattern.  Changing <xs:restriction base="xs:NMTOKEN"> to <xs:restriction base="xs:string"> passes the test.

----- Original Message ----
From: Andreas Kemkes <a5sk4s@yahoo.com>
To: xmlschema-dev@w3.org
Sent: Friday, July 27, 2007 1:45:15 PM
Subject: cvc-datatype-valid.1.2.1 and cvc-type.3.1.3 - why?

I can't figure out what the issue is in the following situation:

From the XML schema file:

    <xs:element name="modified" type="modified.type" minOccurs="0"/>

    <xs:simpleType name="modified.type">
        <xs:restriction base="xs:NMTOKEN">
            <xs:pattern value="$DateTime(: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} )?$"/>

From one of the documents:

    <modified>$DateTime: 2007/07/19 14:32:36 $</modified>

Why do I see:

cvc-datatype-valid.1.2.1: '$DateTime: 2007/07/19 14:32:36 $' is not a valid value for 'NMTOKEN'.
cvc-type.3.1.3: The value '$DateTime: 2007/07/19 14:32:36 $' of element 'modified' is not valid.

I'm using the xmlvalidate Task from Apache Ant version 1.7.0 compiled on December 13 2006

Can someone point me the right way?

How can I diagnose?

How can I correct?

Thanks in advance.

Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 

____________________________________________________________________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
Received on Monday, 30 July 2007 12:41:09 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:13 UTC