Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > what's wrong with this schema definition?

Reply
Thread Tools

what's wrong with this schema definition?

 
 
kk
Guest
Posts: n/a
 
      08-09-2003
I have this portion in my schema definition:

<xsd:simpleType name="MyTimeType">
<xsd:restriction base="xsd:dateTime">
<xsdattern value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}-Z"/>
<xsdattern
value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}+\d{2}:\d{2}"/>
<xsdattern
value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}-\d{2}:\d{2}"/>
</xsd:restriction>
</xsd:simepleType>

When I validate this with XMLSpy, it high-lights the second pattern
and gives this error message:

"This schema doesn't appear to be valid by itself (as a part
of anohter schema, it might still be OK): Schema error -
invalid regular expression: \ expected at position 41"

Could someone tell what's wrong with this pattern?

thanks a lot.

kk

 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      08-09-2003


kk wrote:
> I have this portion in my schema definition:
>
> <xsd:simpleType name="MyTimeType">
> <xsd:restriction base="xsd:dateTime">
> <xsdattern value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}-Z"/>
> <xsdattern
> value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}+\d{2}:\d{2}"/>
> <xsdattern
> value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}-\d{2}:\d{2}"/>
> </xsd:restriction>
> </xsd:simepleType>
>
> When I validate this with XMLSpy, it high-lights the second pattern
> and gives this error message:
>
> "This schema doesn't appear to be valid by itself (as a part
> of anohter schema, it might still be OK): Schema error -
> invalid regular expression: \ expected at position 41"
>
> Could someone tell what's wrong with this pattern?


Have you tried using
\+
instead of
+
The plus symbol is meta character thus you might need to escape it to
have it literally included in the pattern



--

Martin Honnen
http://JavaScript.FAQTs.com/

 
Reply With Quote
 
 
 
 
kk
Guest
Posts: n/a
 
      08-10-2003
Martin Honnen wrote:
>
>
> Have you tried using
> \+
> instead of
> +
> The plus symbol is meta character thus you might need to escape it to
> have it literally included in the pattern
>


Thank you very much, that was dumb on my part



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with schema-validation and property "http://apache.org/xml/properties/schema/external-schemaLocation" Markus Java 1 11-23-2005 02:41 PM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
Is XML Doc wrong or is Schema wrong? (or both) Matthew XML 7 01-07-2005 10:05 PM
Schema Metadata not a Metadata Schema Brett Selleck XML 1 09-04-2003 05:02 PM
Re: Convert DB2 schema to XML Schema Klaus Johannes Rusch XML 0 08-06-2003 11:23 AM



Advertisments