satellite03
IS-IT--Management
XML
====
XSLT
====
<xsl:value-of select="@name"/> ---> this is valid because all are XSL compliant
but
<a href="viewForum?id={@id}">
@id is a XSL/Xpath compliant . how can we use it in the anchor tag ? anchor is a html tag. how can i mix both ? is not it wrong ? if it is not wrong ,then whats the rule ?
====
Code:
<?xml version="1.0" encoding="UTF-8"?>
<discussionForumHome>
<messageBoard id="1" name="Java Programming"/>
<messageBoard id="2" name="XML Programming"/>
<messageBoard id="3" name="XSLT Questions"/>
</discussionForumHome>
XSLT
====
Code:
<xsl:template match="messageBoard">
<li>
<a href="viewForum?id={@id}"> // HTML and @id has been mixed!
<xsl:value-of select="@name"/>
</a>
</li>
</xsl:template>
<xsl:value-of select="@name"/> ---> this is valid because all are XSL compliant
but
<a href="viewForum?id={@id}">
@id is a XSL/Xpath compliant . how can we use it in the anchor tag ? anchor is a html tag. how can i mix both ? is not it wrong ? if it is not wrong ,then whats the rule ?