[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

linking to and displaying xsl templates

Subject: linking to and displaying xsl templates
From: "Jesse Wiles" <jwiles@xxxxxxxxxxxx>
Date: Thu, 14 Nov 2002 09:17:16 -0600
grapes template
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.