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>
|
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
|