[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: schema for XHTML 1.0

From: C. M. Sperberg-McQueen <cmsmcq@acm.org>
Date: Fri, 15 Sep 2006 20:07:06 -0600
Message-Id: <A58F45E0-80AA-4F26-9EB9-EAE8B78EBB3B@acm.org>
Cc: "C. M. Sperberg-McQueen" <cmsmcq@acm.org>, xmlschema-dev@w3.org
To: Wolfgang Jeltsch <wolfgang@jeltsch.net>
Re: schema for XHTML 1.0


On 15 Sep 2006, at 13:36 , Wolfgang Jeltsch wrote:

> ...
> 	[1]
> 	cannot derive simpleType by restriction: "([-+]?(\d+|\d+(\.\d+)?%) 
> (,\s*[-+]?
> 	(\d+|\d+(\.\d+)?%))*)" invalid value for pattern facet: character  
> "-" must be
> 	escaped with "\" in this context [st-props-correct.1]
>
> 	[2]
> 	cannot derive simpleType by restriction: "([-+]?(\d+|\d+(\.\d+)? 
> %))" invalid
> 	value for pattern facet: character "-" must be escaped with "\" in  
> this
> 	context [st-props-correct.1]
>
> 	[3]
> 	cannot derive simpleType by restriction: "([-+]?(\d+|\d+(\.\d+)?%)| 
> [1-9]
> 	(\d+)?\*)" invalid value for pattern facet: character "-" must be  
> escaped
> 	with "\" in this context [st-props-correct.1]
>
> What's the reason for this?  Is escaping the - characters enough to  
> get a
> correct schema?

As Michael Kay has noted, the first edition of the spec had an error
(ambiguity in the grammar, if I remember correctly), which the Working
Group fixed in an erratum by requiring that hyphens be escaped in
the context shown here.  When the Proposed Edited Recommendation
for XML Schema 1.0 Second Edition was published, there was a
comment arguing that the erratum was unnecessary and badly done,
and proposing a less problematic way to repair the original problem.
On consideration, the Working Group agreed with that comment, and
made another correction.

It is (or should be, if the grammar is now correct) unnecessary to  
escape
the hyphens above.  But it should also be harmless to do so (and to be
honest I thought the HTML Working Group had drawn the obvious
conclusion and put the escapes in, since doing so would mean the
schema had a better chance of working with all processors -- are you
sure you're working with the most recent schema documents for the
XHTML namespace?).

I hope this helps.

--Michael Sperberg-McQueen
Received on Saturday, 16 September 2006 02:07:45 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.