[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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>
Re: cvc-datatype-valid.1.2.1 and cvc-type.3.1.3 - why?

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@y...>
To: xmlschema-dev@w...
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} )?$"/>
        </xs:restriction>
    </xs:simpleType>

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. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC





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

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.