D
darin dimitrov
I have a XML file with a structure summarized below.
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="transform.xsl"?>
<ns0:root xmlns:ns0="http://po">
<products>
<ns1
roduct xmlns:ns1="http://ns1">
<name>Product A</name>
</ns1
roduct>
<ns2
roduct xmlns:ns2="http://ns2">
<name>Product B</name>
</ns2
roduct>
</products>
</ns0:root>
I would like to apply a XSL transformation on this document which
will iterate through all the *product* nodes and will output the value
of the *name* sub-node. The problem is that there is a namespace on
the *product* node which I cannot remove (the structure of the XML
document cannot be changed). Is there a possibility to perform this
using the for-each attribute and probably some well formed XPath
expressions? I am new to XSL, so I would appreciate any suggestions.
Thanks,
Darin
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="transform.xsl"?>
<ns0:root xmlns:ns0="http://po">
<products>
<ns1
<name>Product A</name>
</ns1
<ns2
<name>Product B</name>
</ns2
</products>
</ns0:root>
I would like to apply a XSL transformation on this document which
will iterate through all the *product* nodes and will output the value
of the *name* sub-node. The problem is that there is a namespace on
the *product* node which I cannot remove (the structure of the XML
document cannot be changed). Is there a possibility to perform this
using the for-each attribute and probably some well formed XPath
expressions? I am new to XSL, so I would appreciate any suggestions.
Thanks,
Darin