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

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

From: Christoph Schneegans <Christoph@Schneegans.de>
Date: Mon, 12 Jun 2006 23:07:37 GMT
To: <www-html@w3.org>
Message-ID: <e6l34p.39o.1@mail.christoph.schneegans.de>

Alexandre Alapetite wrote:

> In the XML Schema for XHTML 1.0 Frameset (dated 2002-08-28 mimasa)
> [http://www.w3.org/2002/08/xhtml/xhtml1-frameset.xsd] that is the
> current official version, there is apparently an error in the
> regular expression pattern for the MultiLengths type,
>
>   <xs:pattern
>     value="([+-]?(\d+|\d+(\.\d+)?%)|([1-9]\d*)*\*)(,\s*([+-]?(\d+|\d+(\.\d+)?%)|([1-9]\d*)*\*))*"/><!-- Line corrected -->

See
<http://lists.w3.org/Archives/Public/www-html-editor/2005JanMar/0018.html>.
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, so you just need to change

  <MultiLength>(,\s*<MultiLength>)*

to

  (<MultiLength>)(,\s*(<MultiLength>))*

or

  ([-+]?(\d+|\d+(\.\d+)?%)|[1-9]?(\d+)?\*)(,\s*([-+]?(\d+|\d+(\.\d+)?%)|[1-9]?(\d+)?\*))*

in expanded form.

This error was corrected in
<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>

:-/

-- 
<http://schneegans.de/>                                              |
Received on Monday, 12 June 2006 23:11:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:06 GMT