D
David Blickstein
I'm dealing with an XML Schema that uses Schema keys. Specifically the
Schema takes advantage of the ability to define the keys to be specific to a
particular scope, which allows duplication between scopes.
That is I can have a schema like this:
<Company Name="Nike">
<Product Name="Sneaker"/>
<Warehouse ProductStored="Sneaker"/>
</Company>
<Company Name="Asics">
<Product Name="Sneaker"/>
<Warehouse ProductStored="Sneaker"/>
</Company>
The key is the "Name" attribute of the "Product" tag and its scope is
limited to the local "Company". And ProductStored is the keyref to that
key. If the key were not scoped, "Sneaker" would be a duplicate but
because it's scoped to the company, each reference isunambiguous.
Now the question I have is... in XSLT, I want to use these scoped keys
because I want to create hyperlinks from the Warehouse output to the
Product.
Is there any support in XSLT to handle locally scoped keys? If not, are
there techniques to deal with this?
Thanks,
Dave Blickstein
Schema takes advantage of the ability to define the keys to be specific to a
particular scope, which allows duplication between scopes.
That is I can have a schema like this:
<Company Name="Nike">
<Product Name="Sneaker"/>
<Warehouse ProductStored="Sneaker"/>
</Company>
<Company Name="Asics">
<Product Name="Sneaker"/>
<Warehouse ProductStored="Sneaker"/>
</Company>
The key is the "Name" attribute of the "Product" tag and its scope is
limited to the local "Company". And ProductStored is the keyref to that
key. If the key were not scoped, "Sneaker" would be a duplicate but
because it's scoped to the company, each reference isunambiguous.
Now the question I have is... in XSLT, I want to use these scoped keys
because I want to create hyperlinks from the Warehouse output to the
Product.
Is there any support in XSLT to handle locally scoped keys? If not, are
there techniques to deal with this?
Thanks,
Dave Blickstein