Whats wrong with this XSLT code?
I'm an infrequent user of XSLT looking for some help. I'm trying to transform an XML file that contains many nodes of the form <name>aaaaa</name><value>bbbbb</value>, and only one node with a different format.
I'm attempting to use one template to process all except the Header data in the file, but the kicker is I want it to IGNORE the one node called "ServiceDelivery".
First question: Will this template do what I want (ie, skip the ServiceDelivery node)?
Second question: What's wrong syntactically with this code? When I save it, XMLSpy doesn't complain, but when I attempt to use it, I get "xsl:when cannot be used here".
After I get these answers, I think I'll have more questions. Thank you for any suggestions.
Here's the XSL template I'm attempting to use:
<xsl:template match="LogInformation">
<ul>
<xsl:for-each select="*">
<!-- <h2> -->
<xsl:value-of select="name()" />
<xsl:choose>
<xsl:when test="ServiceDelivery">
<br/>
<!-- Service Delivs are handled by their own template, so don't process them here; just put a <CR> -->
</xsl:when>
<xsl:otherwise>
<!-- :value-of select="name()" /> - -->
<xsl:value-of select="@NumberOfRecord"/>
<xsl:choose>
<xsl:when test="@NumberOfRecord > 1"> Records</xsl:when>
<xsl:when test="@NumberOfRecord = 1"> Record</xsl:when>
</xsl:choose>
<ul>
<xsl:for-each select="./Name">
<li><xsl:value-of select="." /></li>
</xsl:for-each>
</ul>
</xsl:otherwise>
</xsl:choose>
<br/>
</xsl:for-each>
</ul>
</xsl:template>

