XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Hans-Peter KüchlerSubject: SS6pro r2 287L: InvalidDatatypeValueException
Author: Hans-Peter Küchler
Date: 16 May 2005 07:56 PM
If I validate the file error10.xhtml, I get the following errors:
file:///error10.xhtml:13,71: Datatype error: Type:InvalidDatatypeValueException, Message:'-' is not a valid character range; use '\-' instead.
file:///error10.xhtml:13,71: Datatype error: Type:InvalidDatatypeValueException, Message:'-' is not a valid character range; use '\-' instead.
file:///error10.xhtml:15,38: Datatype error: Type:InvalidDatatypeValueException, Message:'-' is not a valid character range; use '\-' instead.
file:///error10.xhtml:16,38: Datatype error: Type:InvalidDatatypeValueException, Message:'-' is not a valid character range; use '\-' instead.
file:///error10.xhtml:17,36: Datatype error: Type:InvalidDatatypeValueException, Message:'-' is not a valid character range; use '\-' instead.

The XML document error10.xhtml is NOT valid (5 errors)

The file http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd validates without errors. What's wrong with my file?

thank you, Hans-Peter Küchler


Unknownerror10.xhtml
testcase

Postnext
Ivan PedruzziSubject: SS6pro r2 287L: InvalidDatatypeValueException
Author: Ivan Pedruzzi
Date: 16 May 2005 09:25 PM
Hi Hans,

It seems like the attachment didn't make it.
Could you try again?

Thank You
Ivan

Postnext
Minollo I.Subject: SS6pro r2 287L: InvalidDatatypeValueException
Author: Minollo I.
Date: 16 May 2005 09:40 PM
I was able to retrieve the attachment.
The problem is actually in the XML Schema; XercesJ provides good information about that error:

http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd:230,38: (Error) InvalidRegex: Pattern value '[-+]?(\d+|\d+(\.\d+)?%)' is not a valid regular expression: ''-' is an invalid character range. Write '\-'.'.
http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd:241,38: (Error) InvalidRegex: Pattern value '[-+]?(\d+|\d+(\.\d+)?%)|[1-9]?(\d+)?\*' is not a valid regular expression: ''-' is an invalid character range. Write '\-'.'.
http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd:276,38: (Error) InvalidRegex: Pattern value '[-+]?(\d+|\d+(\.\d+)?%)(,\s*[-+]?(\d+|\d+(\.\d+)?%))*' is not a valid regular expression: ''-' is an invalid character range. Write '\-'.'.

If you escape the '-' used in the character lists, as '\-', then your XHTML validates fine.

Hope this helps,
Minollo

Postnext
Hans-Peter KüchlerSubject: SS6pro r2 287L: InvalidDatatypeValueException
Author: Hans-Peter Küchler
Date: 17 May 2005 06:05 PM
Hi Minollo,
after reading http://www.w3.org/TR/xmlschema-2/#regexs, I think that the - should only be escaped if it is used to form a 'atom'. In this case the - is a metacharacter. But used in a character class, the - isn't an atom. Instead, the complete character class itself is an atom. http://www.w3.org/TR/xmlschema-2/#dt-charrange says "The - character is a valid character range only at the beginning or end of a ·positive character group·." The - used in the schema is the beginning of a positive character group [-+] containing - or +.

Btw. I can't change the schema easily because it's referenced by http://www.w3.org/TR/xhtml1-schema/Overview.html;-)

regards, Hans-Peter

Posttop
(Deleted User) Subject: SS6pro r2 287L: InvalidDatatypeValueException
Author: (Deleted User)
Date: 18 May 2005 03:35 AM
Hi Hans-Peter,
you are right, there is an error in both Xerces-C and Xerces-J validators; as a partial excuse for them is the fact that the presence of the "-" character in the regular expression grammar was ambiguos, and an errata (E2-18, http://www.w3.org/2001/05/xmlschema-errata.html#e2-18) prohibited altogether. After that, another errata (E2-67, http://www.w3.org/2001/05/xmlschema-errata.html#e2-67) reversed the change and added the clarification note that you are quoting. It looks like the Xerces team overlooked the latter.

Thanks for reporting this,
Alberto

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.