views:

57

answers:

1

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"&gt;

<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> 
A: 

Because the XML document is so large

Is your concern about the XSL transformation performance or it is about presentation of the data?

If it's the latter, you could transform the data into multiple presentations within a single HTML document and use CSS + JavaScript to toggle the different presentations.

Ates Goral