W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2004

Re: xml percent

From: Bob Schloss <rschloss@us.ibm.com>
Date: Thu, 25 Nov 2004 20:09:00 -0500
To: "Tony" <tony@codefarm.com>, xmlschema-dev@w3.org
Message-ID: <OF1BCFDD01.8217246A-ON85256F58.0005C172-85256F58.0006514A@us.ibm.com>


      Many of us have found it useful for the XML instance documents our
applications produce to simply have "information", and if we need a certain
series of characters to be shown to users, we use functions in XSLT to
transform the inherent value to the conventional human format before
presentation.  So, if you wanted to go that way, you would have a
simpleType called portion.

<xs:simpleType name="portion">
  <xs:restriction base="xs:double">
    <xs:min value="0.0"/>
    <xs:max value="1.0"/>

      On the other hand, if you really expect the instance documents to be
hand produced by human beings, and you want the percent-sign symbol at the
end, then you may be able to use the regular-expression language in the
pattern facet to represent this.

            Good Luck,

Scalable XML Infrastructure group
IBM Thomas J Watson Research Center

             m>                                                         To 
             Sent by:                  <xmlschema-dev@w3.org>              
             xmlschema-dev-req                                          cc 
                                       xml percent                         
             11/25/2004 04:14                                              


I would like to construct a percent schema type, which is a double value
between 0.0 and 100.0, with a "%" character at the end.  For example

Does anyone know how I could specify such a type in an xsd file?

Ideally it would be nice to support any double number (including those with

an exponent) in front of the % symbol, if that is possible...

Received on Friday, 26 November 2004 01:09:15 UTC

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