RE: [xsl] linking to and displaying xsl templates

Subject: RE: [xsl] linking to and displaying xsl templates
From: "Jesse Wiles" <jwiles@xxxxxxxxxxxx>
Date: Thu, 14 Nov 2002 12:49:19 -0600
Hi Wendell,

 you wrote:
 "When one of your links is traversed, what document should load?"

I'd like the template referred to in the link to load when the "Orange"
link is traversed.

  <Orange enabled="true">
    <Seeds enabled="true" />
  <Apple enabled="false">
    <Seeds enabled="false" />
  <Pear enabled="true">
    <Seeds enabled="true" />
  <Grapes enabled="true">
    <Seeds enabled="false" />
  <xsl:template match="/">
     <title>Your settings</title>
     <a href="options.xml#Orange">Orange settings</a>
     <a href="options.xml#Apple">Apple settings</a>
     <a href="options.xml#Pear">Pear settings</a>
     <a href="options.xml#Grapes">Grapes settings</a>
<!-- Begin 2nd level node rules -->
  <xsl:template match="Orange">
     <title>My Orange settings</title>
    <h2>These are the Orange settings:</h2>
       <xsl:when test="@enabled='true'">
        <span style="color: Green"> yes</span>
       <xsl:when test="@enabled='false'">
        <span style="color: Blue"> no</span>
        <span style="color: Red"> invalid value</span>
      <xsl:apply-templates />

<!-- Apple, Pear, and Grapes nodes would have similar formatting, with
each 2nd level template match, producing a well-formed XHTML page.-->

So, can I pass a template parameter to the XSL engine in either Mozilla
or Internet Explorer through an ordinary html <a href>, or in any other
way?  I've looked at XLink and XPointer, but can't seem to make these
work for this problem using the XSL engines in these browsers.


Jesse Wiles

-----Original Message-----
From: Wendell Piez [mailto:wapiez@xxxxxxxxxxxxxxxx] 
Sent: Thursday, November 14, 2002 11:52 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] linking to and displaying xsl templates


When one of your links is traversed, what document should load?

In most architectures, the file loaded will be another HTML document,
may also happen to be created from XML source using a stylesheet (which
what you say you want to do). (The usual scenario runs the
on the server or in a batch process, and the browser never sees anything

but HTML. Perhaps this isn't your case?)

That is, the generated link points to a document you will generate --
to its XML sourcer (what you say you want), which resides in a separate 
laye, nor to your stylesheet (what your code implies you want to do by 
pointing to templates).

If you want to generate both a table of contents, and broken-out HTML
from a single XML source, and have all the links point correctly to each

other -- this is definitely possible with XSLT. XSLT is also capable of 
describing transformations into formats suitable for other

Please clarify?


At 12:27 PM 11/14/2002, you wrote:
>David Carlisle wrote:
>"If you are making a table of contents don't you
>want to point to the generated html documents?"
>I don't want to point to generated html docs.  Rather, I would like to
>generate a XSL transformed html "document" with hyperlinks to fragments
>(2nd level nodes) of the xml source document.
>Specifically, our product uses an xml file to read user settings.  The
>options in this file include enabling and disabling buttons in our
>application, settings colors and font options, and certain navigation
>options.  I want to make this document less cumbersome to read by
>rendering it in html.  It's a long document, so rather than rendering
>in one long html file, I want to break it up into sections, or several
>html pages.  Can I do this using xsl?
>  XSL-List info and archive:

Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.      
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
   Mulberry Technologies: A Consultancy Specializing in SGML and XML

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread