For a Schema question, ask for help.
(Store the home page at pm and move it to the question area. Thank you !)
Now you need to define such a node:
<Nodes>
<Node> this is a node </Node>
<Node>
<Text> this is another node </Text>
<Node> nest other subnodes. </Node>
</Node>
</Nodes>
Now, the key question is, how can such nodes be defined using Schema? My current solution is as follows:
<Xs: complexType name = "Node">
<Xs: sequence>
<Xs: choice>
<Xs: element name = "SimpleNode" type = "SimpleNode"/>
<Xs: element name = "NestNode" type = "NestNode"/>
</Xs: choice>
</Xs: sequence>
</Xs: complexType>
<Xs: complexType name = "NestNode">
<Xs: sequence>
<Xs: element name = "Text" type = "xs: string" minOccurs = "0" maxOccurs = "unbounded"/>
<Xs: element name = "Node" type = "Node" minOccurs = "1" maxOccurs = "unbounded"/>
</Xs: sequence>
</Xs: complexType>
<Xs: complexType name = "SimpleNode">
<Xs: simpleContent>
<Xs: extension base = "xs: string">
</Xs: extension>
</Xs: simpleContent>
</Xs: complexType>
The problem is that the definition of the first Node type is incorrect. That is to say, I cannot use Node as both SimpleNode and NestNode.
What are the comments of prawns?