Hi,
This post is related to :
http://p2p.wrox.com/topic.asp?TOPIC_ID=62762
I am able to convert all my XML to my new schemas with one exception, my <td> for my tables.
The desired transformation would change:
<ACM:td>
<ACM:Para>some text</ACM:Para>
</ACM:td>
to
<td>
<PARA>some text</PARA>
</td>
howerver I get this result
<td>
<para ACM="somedomain.com">some text</para>
</td>
Here is my XSLT templates:
Code:
<xsl:template match="ACM:Para">
<xsl:element name="PARA">
<xsl:choose>
<xsl:when test="@revision_date">
<xsl:attribute name="revdate"><xsl:for-each select="@revision_date"><xsl:value-of select="."/></xsl:for-each></xsl:attribute>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>
<xsl:choose>
<xsl:when test="@Revision">
<xsl:attribute name="revision"><xsl:for-each select="@Revision"><xsl:value-of select="."/></xsl:for-each></xsl:attribute>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<xsl:template match="ACM:table">
<xsl:element name="table">
<xsl:attribute name="numofcolumns"><xsl:value-of select="@numofcolumns"/></xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<xsl:template match="ACM:tbody">
<xsl:element name="tbody">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<xsl:template match="ACM:tr">
<xsl:element name="tr">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<xsl:template match="ACM:td">
<xsl:element name="td">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
Thanks for the help.