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

M

Meredith

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top