How can i call an XSL template within a hyperlink in the XSL stylesheet

Posted by AdRock on Stack Overflow See other posts from Stack Overflow or by AdRock
Published on 2010-04-15T11:37:39Z Indexed on 2010/06/09 16:32 UTC
Read the original article Hit count: 324

Filed under:
|
|
|
|

I am making my own XSL stylesheet which will perform different views on the same XML document

Because the XML document is so large, i would like some links at the top of the outputted page to call each template that will be used to display the data.

At the moment I can create links that use anchors to a place in the document but it would be better if i just call each template as needed.

How can i just call each template in a link? Would i have to use xlink?

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="folktask">
  <html>
    <body>
   <a href="folk.xml#organisers">Show all the users</a>
   <a href="folk.xml#organisers">Show all the festival organisers</a>
   <xsl:call-template name="show_all_users" />
   <xsl:call-template name="show_all_organisers" />
    </body>
  </html>
</xsl:template>

</xsl:stylesheet> 

© Stack Overflow or respective owner

Related posts about Xml

Related posts about template