[xsl] Stupid newbie question..

Subject: [xsl] Stupid newbie question..
From: "Jordan S. Jones" <jordan@xxxxxxxxxxxxxxxx>
Date: Fri, 18 Oct 2002 12:16:09 -0600
Hey all..

I am attempting to do something that I believe would be rather simple, but
just can't seem to get it to work..

I am trying to call a template based off of the value of an attribute..  I
am probably going about it in a dumb manner..

Here is my xml:

<?xml version="1.0" ?>
 <description>Test number one</description>
  <module id="one">
    <media type="img">image.jpg</media>
    <title>This is the title</title>
    blah blah blah blah blah blah blah blah blah.

Here is the xslt:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
 <xsl:output method = "html" encoding="Windows-1252" />

 <xsl:template match="/">
   <xsl:if test="document/description">
    <title><xsl:value-of select="document/description" /></title>
   <xsl:if test="document/content">
    <xsl:apply-templates select="document/content" />

 <xsl:template match="document/content">
  <xsl:apply-templates />

 <xsl:template match="module">
  <xsl:apply-templates select="@id" />

 <xsl:template match="one">
  This is module one.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread