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
    Likes Received:
    0
    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. Advertisements

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. Markus
    Replies:
    1
    Views:
    1,936
    Markus
    Nov 23, 2005
  2. Ed Slen

    xsd restriction

    Ed Slen, Jun 25, 2003, in forum: XML
    Replies:
    1
    Views:
    2,049
    Derek Harmon
    Jun 25, 2003
  3. Cat
    Replies:
    3
    Views:
    3,124
    Henry S. Thompson
    Jun 25, 2004
  4. Lars Geldner

    [XSD] derivation by restriction

    Lars Geldner, Dec 27, 2004, in forum: XML
    Replies:
    4
    Views:
    879
    Henry S. Thompson
    Jan 7, 2005
  5. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,573
    Stanimir Stamenkov
    Apr 25, 2005
  6. stiank81
    Replies:
    4
    Views:
    16,048
    stiank81
    Jun 26, 2005
  7. Rushi
    Replies:
    1
    Views:
    711
    the_edge123.nospam@club-internet.fr
    Dec 9, 2005
  8. huntingseasonson@gmail.com
    Replies:
    5
    Views:
    1,713
    Brian McCauley
    Nov 29, 2006
Loading...