Hello, everyone:
I am writing a xslt style sheet to transform a xml to another xml.
Here is the simplified version of original xml:
<eml>
<datatable>
<physical>
<distribution id="100"/>
</physical>
</datatable>
<software>
<implementation>
<distribution id="200"/>
</implementation>
</software>
<additionalMetadata>
<describes>100</describes>
<describes>200</describes>
<describes>300</describes>
<describes>400</describes>
</additionalMetadata>
</eml>
I try to use a Xpath to select node-set of "describes" that doesn't have the value which equals the id value of //physical/distribution or software/implementation/distribution. In above case, I want to get the node-set:
<deseribes>300</describes>
<deseribes>400</describes>
(100 and 200 are attribute id values of //physical/distribution or software/implementation/distribution).
I wrote something like:
<xsl:with-param name="describes-list" select="./describes[//physical/distribution/@id !=. and //software/implementation/distribution/@id != .] "/>
It works on above example. However, the element of datatable and software are repeatable. So this xml is valid:
<eml>
<datatable>
<physical>
<distribution id="100"/>
</physical>
</datatable>
<datatable>
<physical>
<distribution id="300"/>
</physical>
</datatable>
<software>
<implementation>
<distribution id="200"/>
</implementation>
</software>
<additionalMetadata>
<describes>100</describes>
<describes>200</describes>
<describes>300</describes>
<describes>400</describes>
</additionalMetadata>
</eml>
But my xslt doesn't work on the above example :(
Would you mind shedding some light on this? Thank you in advance!
Jing