Hi,
I posted earlier about an xsl document help with a similar xml doc and got perfect help. However, I don't know what I am doing wrong with this one...
I'm been having trouble with this xsl for the folllowing xml document. It is well formed, however, when you run it, none of the values for UIC, Name or Type appear in the results, just their blank elements. The reason I need this xsl transform is bc the xml is received from a webservice and it skips blank elements (meaning first row can have 3 elements, but if row two has an element that does not have data, it write 2 elements for that row).
At any rate, I need the actual data along with the elements to show up. If anyone can help me out with this I would GREATLY appreciate it.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:
vb="urn:ShipSchedules">
<xsl:template match="ArrayOfUnitType">
<UnitType>
<UIC><xsl:value-of select="
vb:UIC"/></UIC>
<Name><xsl:value-of select="
vb:Name"/></Name>
<Type><xsl:value-of select="
vb:Type"/></Type>
</UnitType>
</xsl:template>
</xsl:stylesheet>
-----------------------------------
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfUnitType xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlsns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<?xml-stylesheet type="text/xsl" href="UnitType.xsl"?>
<UnitType>
<UIC xmlns="urn:ShipSchedules">C2000</UIC>
<Name xmlns="urn:ShipSchedules">N33</Name>
<Type xmlns="urn:ShipSchedules">type1</Type>
</UnitType>
<UnitType>
<UIC xmlns="urn:ShipSchedules">C2001</UIC>
<Type xmlns="urn:ShipSchedules">type2</Type>
</UnitType>
</ArrayOfUnitType>