For example, how to generate <A HREF="http://mypage.html">home page</A> in HTML where link is provided from XML file.
Use AVTs (attribute value templates) for most simple expressions.
AVTs are expressions within attributes enclosed with {} curly braces, e.g.
<A HREF="{/bio/homepage}">home page</A>
When you need to generate the value of an attribute using more complex XSLT
(e.g. the value is to be built using template calls or the like) then you
can use the instruction, e.g.
<A>
<xsl:attribute name="HREF">
<xsl:call-template name="build-the-href"/>
</xsl:attribute>
<xsl:text>home page</xsl:text>
</A>
No comments:
Post a Comment