Community
Participate
Working Groups
The regex in the below xsd snippet is termed as invalid by the XSD Validator. IMHO, it is valid. <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/NewXMLSchema" xmlns:tns="http://www.example.org/NewXMLSchema"> <xsd:simpleType name="LoginNameType"> <xsd:annotation> <xsd:documentation>Name that uniquely identifies a user of the system.</xsd:documentation> </xsd:annotation> <xsd:restriction base="xsd:string"> <xsd:minLength value="6"/> <xsd:maxLength value="30"/> <xsd:pattern value="[a-zA-Z0-9 \.\,#\-\\\:\;\@]+"/> </xsd:restriction> </xsd:simpleType> </xsd:schema> Thanks, -Steve
Possible to fix for 1.0.2?
According to our resident Xerces expert (Michael Glavassevich) this is not a bug although he agreess the error message is rather misleading. I'm going to return this bug (as invalid) since it sounds like a valid error. Feel free to comment if you disagree and we can evaluate this further. Here's Michael's comments... [a-zA-Z0-9 \.\,#\-\\\:\;\@]+ looks invalid to me. The value of a pattern [1] must conform to the syntax for regular expressions [2] defined in the schema spec. Under production 24 [Single Character Escape], there is a table listing all of the valid single character escapes. Several of the escapes being used in this expression are not in the table. The error message: "This expression is not supported in the current option setting" is misleading. The option its referring to instructs the regular expression parser to parse the pattern according to the rules of XML schema. You cannot configure it. Thanks. [1] http://www.w3.org/TR/xmlschema-2/#dt-pattern [2] http://www.w3.org/TR/xmlschema-2/#regexs
This bug was moved to 'closed' state, since it is so old is is assumed its dup, invalid, or worksforme resolution is no longer in qustion and the bugzilla needs no further attention. Feel free to re-open, or open a new bug, if this semi-automatic processing was done in error in this case.