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

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

From: <Bibhaker.Saran@txu.com.au>
Date: Tue, 14 May 2002 10:36:14 +1000
To: xmlschema-dev@w3.org
Message-ID: <OF13F26052.F21413BA-ONCA256BB9.0001AD6D@txu.com.au>

I don't think you can define a simpleType for length as real plus a unit
qualification. Because,
Simple Type definitions provide for:
     Establishing the ·value space· and ·lexical space· of a datatype,
     through the combined set of ·constraining facet·s specified in the
     Attaching a unique name (actually a QName) to the ·value space· and ·
     lexical space·.
Bibhakar Saran
B2B Technical Architect
TXU IT Architecture & Planning
Level 6 461 Bourke St, Melbourne
Phone : (+61 3) 8602 9638
Mobile: 0411 203036
Email: bibhaker.saran@txu.com.au

                    Chuck Paussa                                                                                                  
                    <cpaussa@myrealbox        To:     xmlschema-dev@w3.org                                                        
                    .com>                     cc:                                                                                 
                    Sent by:                  Subject:     <length> = a real number plus a unit qualification                     
                    14/05/2002 06:14                                                                                              

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]"/>

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.


This email and any files transmitted with it may be confidential and are intended
solely for the use of the individual or entity to whom they are addressed. Any
confidentiality is not waived or lost because this email has been sent to you by
mistake. This email may contain personal information of individuals, and be subject to Commonwealth and/or State privacy laws in Australia. This email
is also subject to copyright. If you are not the intended recipient, you must not
 read, print, store, copy, forward  or use this email for any reason, in accordance
 with privacy and copyright laws. If you have received this email in error, please
notify the sender by return email, and delete this email from your inbox.
Received on Monday, 13 May 2002 20:37:11 UTC

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