You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Dimitar Hristozov <Di...@chemie.uni-erlangen.de> on 2004/05/05 11:51:49 UTC
Problem with validating string pattern, which uses regular expression
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
Re: Problem with validating string pattern, which uses regular
expression
Posted by Khaled Noaman <kn...@ca.ibm.com>.
According the schema errata [1], the '-' is no longer a valid character
range.
Khaled
[1] http://www.w3.org/2001/05/xmlschema-errata.html#e2-18
"Jeroen N.
Witmond"
<jn...@xs4all.nl> To
xerces-c-dev@xml.apache.org
05/05/2004 02:25 cc
PM
Subject
Re: Problem with validating string
Please respond to pattern, which uses regular
xerces-c-dev expression
> 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
> v@chemie.uni-erla
To
> ngen.de> xerces-c-dev@xml.apache.org
>
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: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Problem with validating string pattern,
which uses regular expression
Posted by "Jeroen N. Witmond" <jn...@xs4all.nl>.
> 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
> v@chemie.uni-erla To
> ngen.de> xerces-c-dev@xml.apache.org
> 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: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Problem with validating string pattern, which uses regular expression
Posted by Khaled Noaman <kn...@ca.ibm.com>.
If you do not want to change the schema yourself, then I guess you need to
contact the authors.
Khaled
Dimitar Hristozov
<Dimitar.Hristozo
v@chemie.uni-erla To
ngen.de> xerces-c-dev@xml.apache.org
cc
05/05/2004 11:29
AM Subject
Re: Problem with validating string
pattern, which uses regular
Please respond to expression
xerces-c-dev
Thanks for the quick answer, Khaled,
Does this mean that I should modify the CML schema ? This is something that
I
don't want to do (and I have to check if I'm aloud to do it), but I may
contact the authors if the problem is there.
thanks again,
cheers,
Dimitar Hristozov
On Wednesday 05 May 2004 15:48, Khaled Noaman wrote:
> The pattern value contains an invalid character [A-Za-z0-9_-]. You should
> use '\-' instead.
> ^
>
> Khaled
>
>
>
>
>
> Dimitar Hristozov
> <Dimitar.Hristozo
> v@chemie.uni-erla
To
> ngen.de> xerces-c-dev@xml.apache.org
>
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: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Problem with validating string pattern, which uses regular expression
Posted by Dimitar Hristozov <Di...@chemie.uni-erlangen.de>.
Thanks for the quick answer, Khaled,
Does this mean that I should modify the CML schema ? This is something that I
don't want to do (and I have to check if I'm aloud to do it), but I may
contact the authors if the problem is there.
thanks again,
cheers,
Dimitar Hristozov
On Wednesday 05 May 2004 15:48, Khaled Noaman wrote:
> The pattern value contains an invalid character [A-Za-z0-9_-]. You should
> use '\-' instead.
> ^
>
> Khaled
>
>
>
>
>
> Dimitar Hristozov
> <Dimitar.Hristozo
> v@chemie.uni-erla To
> ngen.de> xerces-c-dev@xml.apache.org
> 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: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Problem with validating string pattern, which uses regular expression
Posted by Khaled Noaman <kn...@ca.ibm.com>.
The pattern value contains an invalid character [A-Za-z0-9_-]. You should
use '\-' instead.
^
Khaled
Dimitar Hristozov
<Dimitar.Hristozo
v@chemie.uni-erla To
ngen.de> xerces-c-dev@xml.apache.org
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: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org