W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2010

Recursive XSD Design

From: <nickle@gmail.com>
Date: Mon, 22 Mar 2010 11:42:06 +0000
Message-ID: <00163642745fbd28ad0482622fe4@google.com>
To: xmlschema-dev@w3.org
I'm having trouble creating an XSD for some xml.

A bit of background might help. The xml is for messaging. In particular,  
the message
is designed to be simple, and designed to be cross referenced easily. At  
its heart
is a recursive key value set up.

Simple Key values are like this.

<key name="quantity">5</key>
<key name="price" representation="percentage">99.78</key>

There is an optional representation attribute where the infromation
could be represented in two different forms.

Reference Key Values are like this

<key name="currency" reference="instrument">
<id name=" INSID" system="XXXX" instance="PROD">DEM</id>
<id name=" EXTERN_ID1" system="XXXX" instance="PROD"> ext128k</id>

This form is used for foreign key references or for references to  
The cross reference service will select out all keys with an attribute of  
It will then get all possible ids for that reference, and add in additional  
fields, and replace that sub element with the new version.

ie ".//key[@reference]" as an Xpath can get all the enumerations and  
from the xml

Lastly there is a the recursive structure. Here the value part of the key  
can be a key value itself.

<key name="trade" type="trade">
<key name="value_day">1999-03-12</key>
<key name="quantity">5</key>
<key name="leg" type="leg">
<key name="rate">5.00</key>
<key name="period">3m</key>
<key name="cashflows" type="cashflows">
<key name="cashflow">10</key>
<key name="cashflow">20</key>

Now, I'm having real trouble creating an XSD for this structure.

Can anyone help?


Received on Monday, 22 March 2010 14:40:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:55 UTC