Next in thread → Next in month →

Re: [xml-dev] Value spaces are cool! I wish for a cross-product (aggregate) value space

From
Fourny Ghislain <>
To
"Costello, Roger L." <>
Date
2011-02-24T14:44:25Z
ID
<>
Thread
Re: [xml-dev] Value spaces are cool! I wish for a cross-product (aggregate) value space
Hi Roger,

How about going into complex types?

For example, assuming you defined three value spaces, you can define an aggregate value space with:

<xs:complexType name="Person-name">
  <xs:sequence>
    <xs:element name="first" type="First-name"/>
    <xs:element name="middle" type="Middle-name"/>
    <xs:element name="last" type="Last-name"/>
  </xs:sequence>
</xs:complexType>

an example of value being:

<person>
  <first>Roger</first>
  <middle>L</middle>
  <last>Costello</last>
</person>

I see two limitations though:
1. you cannot use this type in attributes - but with elements you can use XPath to access the component value spaces.
2. although you can add other labels for the aggregate value space, the labels for the component value spaces are fixed.

Does it make sense?

Kind regards,
Ghislain
Next in thread → Next in month →