views:

29

answers:

2

In your xml wisdom, have you a idea on how to define the type for “bDead” to be? (type=”xs:Boolean”)

<bDead>0
<xdn>state</xdn>
       <xdv>alive</xdv>
</bDead>

Here’s the schema. Where/how would I specify the type and ranges for bdead? I don’t think that I can..

<xs:element name="bDead" >
<xs:complexType mixed="true">
<xs:sequence>
<xs:element name="xdn" type="xs:string" />
<xs:element name="xdv" type="xs:string" />
              </xs:sequence>
</xs:complexType>
</xs:element
A: 

I'm not completely clear on what you're asking for; do you mean the text of bDead, which is 0 in your example? What is bDead supposed to be, an integer?

In general, it seems like you want something related to XML schema restrictions. w3schools has a good page about those here.

Lord Torgamus
+1  A: 

If I understand the question properly, you want bDead to be an xs:Boolean with mixed content? The <xs:simpleContent> element is probably what you want inside your <xs:complextType>.

As Lord Torgamus says, w3schools is a pretty good place. I uses w3c.org. It can be harder to understand sometimes, but they are the source of the standard. As for XML-Schema, their "Part 0" of the standard document is a kind of primer. http://www.w3.org/TR/2004/REC-xmlschema-0-20041028/

Jeff Walker