W3C home > Mailing lists > Public > www-html@w3.org > June 2006

Re: Pattern error for MultiLengths type in xhtml1-frameset.xsd

From: Alexandre Alapetite <alexandre@alapetite.net>
Date: Tue, 13 Jun 2006 22:43:43 +0200
Cc: www-html@w3.org, "'Masayasu Ishikawa'" <mimasa@w3.org>
To: "'Christoph Schneegans'" <Christoph@schneegans.de>
Message-ID: <000101c68f2a$0ad24a70$f9043f50@athlon1100>

Dear Christoph,
Thank your for your answer. Unfortunately, the problem(s) are still there.

The XML Schemas for XHTML 1.0 are not based on XHTML modularisation, so  
XHTML 1.0 Frameset is not affected by any modification
of the XHTML modules.

The only almost official schema for XHTML 1.0 Frameset seems to be  
[http://www.w3.org/2002/08/xhtml/xhtml1-frameset.xsd] (v 1.5
2002/08/28 09:53:29 mimasa) that still contains this error in MultiLengths  

In the meantime, I found a test schema for XHTML 1.0 Frameset
(v 1.17 2004/07/27 15:44:48 mimasa) that could be a
substitute while waiting for a more official correction but it contains a  
similar error, although the pattern is not the same
(it still does not match e.g. "50%, 50%").

> I'm not sure if your pattern is correct, but I think it's best to keep
> things simple. The "MultiLengths" pattern is obviously based on the
> "MultiLength" pattern,

The fatal error is indeed in MultiLengths, due to wrong parenthesis, but  
MultiLength (without 's') could also be improved, since
it tolerates some wrong values that could easily be handled (e.g. "0*"),  
and since the syntax could be better.

A part of the pattern is currently written "[1-9]?(\d+)?\*", which can be  
simplified with the strict same meaning to "\d*\*"
since the first part "[1-9]?" is useless when followed by "\d+": this was  
clearly an attempt to reject inputs such as "0*", but
it fails to do so. This part of the pattern should be changed to something  
like "([1-9]\d*)*\*". This is what I did in my
previous correction proposition. (See  

> <http://www.w3.org/TR/2006/PR-xhtml-modularization-20060213/SCHEMA/xhtml-datatypes-1.xsd>:
>  <!-- comma-separated list of MultiLength -->
>  <xs:simpleType name="MultiLengths">
>    <xs:restriction base="xs:string"/>
>  </xs:simpleType>

Oh, thank you for pointing this! It is not related to XHTML 1.0 Frameset,  
but it shows imho a new issue in XHTML modularisation.
Using a simple "xs:string" as a pattern for a "comma-separated list of  
MultiLength" is what I would call a very lazy validation,
or yet a new mistake, but not a proper correction.

I can see that "XHTML 1.0 in XML Schema" (Strict, Transitional, Frameset)  
[http://www.w3.org/TR/xhtml1-schema/] is only a "W3C
Note". One the one hand, it should mean that updating could be made more  
easily. On the other hand, it means that this is a low
priority at W3C, which is sad as they are needed today, since XHTML 1.0 is  
currently broadly used, DTD is not enough, XHTML 1.0
official schemas are not available at W3C in other schema languages either  
(e.g. RelaxNG), while XML Schemas are almost done.

I am already very grateful to Masayasu Ishikawa (apparently alone) to have  
published this note and associated schemas, and it
would be wonderful if those ones could be updated.

Received on Tuesday, 13 June 2006 21:05:09 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 30 April 2020 16:20:59 UTC