- From: Christoph Schneegans <Christoph@Schneegans.de>
- Date: Fri, 21 Jan 2005 23:13:25 GMT
- To: <www-html-editor@w3.org>
Hello!
<http://www.w3.org/TR/2002/NOTE-xhtml1-schema-20020902/> defines the
following types:
<xs:simpleType name="Length">
<xs:restriction base="xs:string">
<xs:pattern value="[-+]?(\d+|\d+(\.\d+)?%)"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="MultiLength">
<xs:restriction base="xs:string">
<xs:pattern value="[-+]?(\d+|\d+(\.\d+)?%)|[1-9]?(\d+)?\*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="MultiLengths">
<xs:restriction base="xs:string">
<xs:pattern
value="[-+]?(\d+|\d+(\.\d+)?%)|[1-9]?(\d+)?\*(,\s*[-+]?(\d+|\d+(\.\d+)?%)|[1-9]?(\d+)?\*)*"/>
</xs:restriction>
</xs:simpleType>
Obviously, the "MultiLengths" pattern is based on the "MultiLength"
pattern which is based on the "Length" pattern. However, additional
parentheses are needed in the "MultiLengths" pattern to make it work
as intended:
<xs:pattern
value="([-+]?(\d+|\d+(\.\d+)?%)|[1-9]?(\d+)?\*)(,\s*([-+]?(\d+|\d+(\.\d+)?%)|[1-9]?(\d+)?\*))*"/>
--
<http://schneegans.de/> |
Received on Friday, 21 January 2005 23:19:00 UTC