[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] linking to and displaying xsl templates
Hi. I have an xml document for which I would like to create a TOC entirely through an XSL stylesheet. The idea is to create html hyperlinks which point to <xsl:template> elements in the .xsl document. So: <?xml version="1.0"?> <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> <xsl:template match="/"> <a href="some_way_to_link_to.xml#template_Apples">Apples</a> <a href="some_way_to_link_to.xml#template_Oranges">Oranges</a> <a href="some_way_to_link_to.xml#template_Pears">Pears</a> <a href="some_way_to_link_to.xml#template_Grapes">Grapes</a> </xsl:template> <xsl:template match="Apples"> ...formatting... </xsl:template> <xsl:template match="Oranges"> ...formatting... </xsl:template> <xsl:template match="Pears"> ...formatting... </xsl:template> <xsl:template match="Grapes"> ...formatting... </xsl:template> </xsl:stylesheet> with xml source that looks like: <?xml version='1.0' encoding='UTF-8'?> <?xml-stylesheet href="wwh.xsl" type="text/xsl"?> <Source> <Apples> children and descendents </Apples> <Oranges> children and descendent </Oranges> <Pears> children and descendents </Pears> <Grapes> children and descendents </Grapes> </Source> The idea is to create several HTML output pages from the single xml source doc. It seems like it should be pretty straightforward, but I've been having a tough time sorting it out. Please advise. Thanks. Jesse Wiles XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|