IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

XmlSpy does not like this code snip Options · View
hardywang
Posted: Thursday, July 23, 2009 12:16:54 PM
Rank: Newbie

Joined: 5/12/2008
Posts: 8
I downloaded a XSD with following lines inside, XmlSpy complains about the red part saying "value is not a valid XML regular expression".

I tried that expression in C# it works fine. Anybody can tell me why?

<xs:simpleType name="ComponentGuid">
<xs:annotation>
<xs:documentation>Values of this type will look like: "01234567-89AB-CDEF-0123-456789ABCDEF" or "{01234567-89AB-CDEF-0123-456789ABCDEF}", but also allows "PUT-GUID-HERE" for use in examples. It's also possible to have an empty value "".</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[{(]?[0-9A-Fa-f]{8}\-?[0-9A-Fa-f]{4}\-?[0-9A-Fa-f]{4}\-?[0-9A-Fa-f]{4}\-?[0-9A-Fa-f]{12}[})]?|PUT\-GUID\-(?:\d+\-)?HERE|([!$])(\(var|\(loc|\(wix)\.[_A-Za-z][0-9A-Za-z_.]*\)|\*|^$"/>
</xs:restriction>
</xs:simpleType>
vlad
Posted: Thursday, July 23, 2009 12:54:23 PM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
This is because regular expressions in XML Schemas follow their own rules defined by W3C: http://www.w3.org/TR/xmlschema-2/#dt-regex
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.