W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2002

Re: <length> = a real number plus a unit qualification

From: Jeni Tennison <jeni@jenitennison.com>
Date: Tue, 14 May 2002 13:16:38 +0100
Message-ID: <51913122144.20020514131638@jenitennison.com>
To: xmlschema-dev@w3.org
Noah (and various others) wrote:
> I understand that it may not meet the need, but there are many who
> would argue that:
>         <length units="cm">2.54</length>
> is better markup than:
>         <length> 2.54 cm</length>
> It's easier to manipulate with tools like XPath, XSL, and presumably
> Query, it can be more strongly typed. etc. Of course, since XML does
> not have structured attributes, it works only for elements. Still,
> it's worth considering if it meets your needs.

While I agree in general, Chuck did say (in an earlier message) that
he was trying to model XSL-FO data types. I believe that part of the
reason that XSL-FO doesn't separate length and unit is because it
didn't want to have to expand:

  space-before="2px 1cm 3in force retain"


    <minimum units="px">2</minimum>
    <optimum units="cm">1</optimum>
    <maximum units="in">3</maximum>

and that they wanted then to have consistency about how the "length"
data type was used throughout the markup language.
There are many cases in W3C and other markup languages where designers
have had to make a trade-off between processability and conciseness
and ended up on the side of conciseness. The data attribute of
svg:path springs to mind, as does XPath, and the xsi:schemaLocation

It would be great if the next version of XML Schema provided more
support for these kinds of values.



Jeni Tennison
Received on Tuesday, 14 May 2002 08:40:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:01 UTC