Can the XML <any> element restrict what datatype it stores?

Discussion in 'XML' started by Meredith, Nov 7, 2003.

  1. Meredith

    Meredith Guest

    Question:

    Can the XML <any> element restrict what datatype it stores? I am
    trying to write an extensible schema that has an element containing
    unbounded <any> elements of boolean type. Is it possible to control
    the <any> element within the schema or must something like an XSLT
    template be applied instead?

    I'd like to do something like this:

    <xsd:complexType name="subscribe">
    <xsd:element name="dataType" minOccurs="0">
    <xsd:any namespace="##any" type="xsd:boolean" minOccurs="0"/>
    </xsd:element>
    <xsd:element name="userName" type="xsd:string"/>
    </xsd:complexType>

    Thanks for your help!
    Meredith
     
    Meredith, Nov 7, 2003
    #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. Piers Chivers
    Replies:
    0
    Views:
    492
    Piers Chivers
    Feb 18, 2004
  2. Don Adams
    Replies:
    1
    Views:
    603
    Martin Honnen
    Mar 5, 2004
  3. Jeff
    Replies:
    2
    Views:
    1,155
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Apr 16, 2007
  4. Garg
    Replies:
    9
    Views:
    350
    Daniel Pitts
    Apr 25, 2007
  5. HANM
    Replies:
    2
    Views:
    724
    Joseph Kesselman
    Jan 29, 2008
Loading...

Share This Page