Is it possible (simpleType or complexType)?

This should cover W3C XML Schema, Relax NG and DTD related problems.
przemoc
Posts: 1
Joined: Mon Feb 21, 2005 2:33 pm

Is it possible (simpleType or complexType)?

Post by przemoc » Mon Feb 21, 2005 2:41 pm

Is it possible to define a schema for this?

I have element <arg>. I want that <arg> has simpletype (xs:integer) or only one child <var> and any other elements or text.

I don't want to create a new element e.g <number> for simpletype

<arg>
12345
</arg>

or
<arg>
<var/>
</arg/>

please, help mi

george
Site Admin
Posts: 2101
Joined: Thu Jan 09, 2003 2:58 pm

Post by george » Mon Feb 21, 2005 4:11 pm

Hi,

You cannot do that in XML Schema. You should be able to create a Relax NG schema to cover this requirement.

Best Regards,
George

Post Reply