I'm transforming xml into wordml using xslt. I would like to be able to format content of table cell differently if attribute of element that carries content of that cell is different. For example, I have following xslt:
<xsl:template match="/ns0:RootElement/ns0:Items/ns0:Item0">
<w:tc>
<w:tcPr>
<w:tcW w:w="2268" w:type="dxa" />
<w:noWrap />
</w:tcPr>
<ns0:Item0>
<xsl:for-each select="@ns0:*|@*[namespace-uri()='']">
<xsl:attribute name="{name()}" namespace="{namespace-uri()}">
<xsl:value-of select="." />
</xsl:attribute>
</xsl:for-each>
<w:p wsp:rsidR="00F75372" wsp:rsidRPr="0058287E" wsp:rsidRDefault="00F75372" wsp:rsidP="0058287E">
<w:r wsp:rsidRPr="0058287E"> <w:t><xsl:value-of select="." /></w:t></w:r>
</w:p>
</ns0:Item0>
</w:tc>
</xsl:template>
Let's say that Item0 has attribute selected, I would like to change formating based on this attribute. Any idea about how to modify presented xslt to achieve that? Regards