> The pattern value contains an invalid character [A-Za-z0-9_-]. You should > use '\-' instead.
XML Schema Part 2: Datatypes: F Regular Expressions http://www.w3.org/TR/xmlschema-2/#dt-regex contains the following: "A single XML character is a �character range� that identifies the set of characters containing only itself. All XML characters are valid character ranges, except as follows: [...] The - character is a valid character range only at the beginning or end of a �positive character group�." This seems to indicate that the pattern is valid, and contains upper and lower case characters, digits, the underscore and the dash. This would be consistent with other implementations of regular expressions. Please correct me if I'm wrong. Regards, Jeroen. > ^ > > Khaled > > > > > > Dimitar Hristozov > <Dimitar.Hristozo > [EMAIL PROTECTED] To > ngen.de> [EMAIL PROTECTED] > cc > 05/05/2004 05:51 > AM Subject > Problem with validating string > pattern, which uses regular > Please respond to expression > xerces-c-dev > > > > > > > > > > Dear all, > > I experienced the following problem with xerces-c-2_5_0 under SuSE Linux > 9.0: > > When trying to validate the attached CML ( Chemical Markup Language ) file > against the schema, both SAX2Print and DOMPrint report the following > error: > > Error at file "/home/dimitarh/cml/cml_try12.xml", line 4, column 89 > Message: Datatype error: Type:InvalidDatatypeValueException, Message:'-' > is > > not a valid character range; use '\-' instead. > > I went through the mailing list archives and through the API, but found > nothing about this issue, so I will appreciate any help/comments. > > The idType definition in the CML schema is the following ( full schemas > available at http://cml.sourceforge.net/ ): > > <xsd:simpleType name="idType" id="st.idType"> > <xsd:annotation> > <xsd:documentation> > <!-- ommited --> > </xsd:documentation> > </xsd:annotation> > <xsd:restriction base="xsd:string"> > <xsd:pattern value="([A-Za-z][A-Za-z0-9_-]*:)?[A-Za-z] > [A-Za-z0-9_\-\.]*"/> > </xsd:restriction> > </xsd:simpleType> > > When I remove all ids from the attached file, the validation is OK. > Any ideas are welcome, > > thanks for your help, > kind regards, > Dimitar Hristozov > > > > > [attachment "cml_try12.xml" deleted by Khaled Noaman/Toronto/IBM] > --------------------------------------------------------------------- > To > unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
