MaKSiNG
Technical User
- Dec 4, 2003
- 19
I have an XML file as follows:
<record>
<item name="c_link">
<value>
<item name="link_linktext">
<value>Details</value>
</item>
<item name="link_linktarget">
<value> </value>
</item>
<item name="link_linktype">
<value>_self</value>
</item>
</value>
</item>
</record>
Bearing in mind there may be a number of these @name='c_link' groupings. The XSL I have is:
<xsl:for-each select="record/item/value/item">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="@name='link_linktarget'"/>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:choose>
<xsl:when test="@name='link_linktype'"/>
</xsl:choose>
</xsl:attribute>
</xsl:element>
</xsl:for-each>
Is this anywhere near correct as a start? How do I incorporate the @name='link_linktext' as the displayed clickable link?
Thx,
MaKS
<record>
<item name="c_link">
<value>
<item name="link_linktext">
<value>Details</value>
</item>
<item name="link_linktarget">
<value> </value>
</item>
<item name="link_linktype">
<value>_self</value>
</item>
</value>
</item>
</record>
Bearing in mind there may be a number of these @name='c_link' groupings. The XSL I have is:
<xsl:for-each select="record/item/value/item">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="@name='link_linktarget'"/>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:choose>
<xsl:when test="@name='link_linktype'"/>
</xsl:choose>
</xsl:attribute>
</xsl:element>
</xsl:for-each>
Is this anywhere near correct as a start? How do I incorporate the @name='link_linktext' as the displayed clickable link?
Thx,
MaKS