Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help, about schema

Status
Not open for further replies.

bennych

Programmer
Sep 5, 2004
1
CN
Hi ,

I have an xml file which has the following requirement :

A root node will have :
i> one or more required nodes (can occurs 1 or n times) and
ii> some optional nodes (can occurs 0 or 1 times) and
iii> some optional nodes (can occurs 0 or n times) and
iiii> all the nodes are in any orders.

e.g.

<root>
<title>abc</title>
<creator>benny</creator>
<creator>danny</creator>
<date>yyyy-mm-dd</date>
</root>

notes:
the title node is a required node (occurs 1 or n times)
the creator nodes are optional nodes (occurs 0 or n times)
the date node is a node that cannot be repeated (occurs 0 or 1 times)
all these nodes can list in any order.


I'm not able to create a schema with the above restrction using the existing XSD indicaters( "All", "choice" or "sequence") .

hope somebody can give me some idea
 
The problem is requirement 4: All the nodes are in any orders.

This basically says you've got an unstructured document. You need to go back to whoever is giving you this document and get them to decide on an order.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top