You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by MIDON ALEXIS <AL...@sgam.com> on 2004/10/04 10:42:09 UTC
XML ID question
Hi,
Does anyone know how to reduce the scope of an ID attribute?
I mean that xs:ID is an unique identifier for the whole message and I would
like to make it unique in a message sub-part.
example:
The following message contains 2 financial products. They describe deals
between the same 2 parties.
Since the xs:id are global, this message is not valid.
Solutions :
* pull up parties in the <message> tag - Impossible due to business
limitations
* add an xs:ID to the <product>, concatenate product id and party id -
dangerous since the same entities have different identifier
* make ids unique in the scope of the <product> element. Is it
possible?
I know that my question is not in the real scope of this mailing list but I
also know that many of you are XML experts ;)
Thanks for your help.
Alexis.
<message>
<product>
...
<swap>
<notional>1 000 USD<notional/>
<party ref="128"/>
<party ref="256"/>
</swap>
<party id="128"/>
<party id="256"/>
</product>
<product>
...
<swap>
<notional>5 000 000 EUR<notional/>
<party ref="128"/>
<party ref="256"/>
</swap>
<!-- #######################
ID conflict
############################ -->
<party id="128"/>
<party id="256"/>
</product>
</message>