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

<length> = a real number plus a unit qualification

From: Chuck Paussa <Chuck.Paussa@systems.dhl.com>
Date: Mon, 13 May 2002 13:31:43 -0400 (EDT)
Message-ID: <3CDFF9B7.1090105@systems.dhl.com>
To: xmlschema-dev@w3.org
I'm trying to create a simpleType definition for length, which is 
defined as a real number plus a unit qualification. I've come up with 
this, which I know is wrong.

    <simpleType name = "length_Type">
        <restriction base = "NMTOKEN">
            <pattern value = "[+-]?\d+\.?\d*[p|m|i|c|e][x|t|m|n]"/>
        </restriction>
    </simpleType>

The unit qualification is one of px, pt, mm, in, cm, em  so I 
constructed the above 2 part choice. The problem being it allows illegal 
values such as ix. How do I create a list of atoms greater than one 
character? [px|pt|mm|cm|in|em] is not right.

Chuck
Received on Monday, 13 May 2002 21:01:00 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:56 UTC