Schema XSD restriction

Discussion in 'XML' started by gmaxey@mvps.org, Jun 23, 2011.

  1. gmaxey@mvps.org

    gmaxey@mvps.org

    Joined:
    Jun 15, 2008
    Messages:
    2
    Is it possible to write and element restrictions such that "" or null is an acceptable value?

    E.g., can the following be adapted so than a "" or null value is also acceptable?

    <xs:element name="age">
    <xs:simpleType>
    <xs:restriction base="xs:integer">
    <xs:minInclusive value="0"/>
    <xs:maxInclusive value="120"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>

    Thank you.
     
    gmaxey@mvps.org, Jun 23, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ed Slen

    xsd restriction

    Ed Slen, Jun 25, 2003, in forum: XML
    Replies:
    1
    Views:
    1,954
    Derek Harmon
    Jun 25, 2003
  2. Cat
    Replies:
    3
    Views:
    2,743
    Henry S. Thompson
    Jun 25, 2004
  3. stiank81
    Replies:
    4
    Views:
    15,515
    stiank81
    Jun 26, 2005
  4. Rushi
    Replies:
    1
    Views:
    582
    the_edge123.nospam@club-internet.fr
    Dec 9, 2005
  5. huntingseasonson@gmail.com
    Replies:
    5
    Views:
    1,107
    Brian McCauley
    Nov 29, 2006
Loading...

Share This Page