This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Another Beginner's Question
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: Another Beginner's Question
- From: Laurie Mann <laurie dot mann at ansys dot com>
- Date: Mon, 27 Mar 2000 14:59:02 -0500
- Reply-To: xsl-list at mulberrytech dot com
I'm trying to learn XSL so I can convert XML documents to HTML.
I have a simple XML file that looks something like this:
<refentry>
<refnamediv>
<refname>Test</refname>
<refpurpose> </refpurpose></refnamediv>
<refsect1>
<title>Object Orientation</title>
<para>In order...</para>
<para>and so on...<para>
</refsect1>
<refsect1>
<title>Input Vector Orientation Option</title>
<para>The current...</para>
<para>and so on...<para>
</refsect1>
</refentry>
I'm running XT, and my XSL file looks like this:
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match=" /">
<html>
<head>
<title>Drop Test Module Online Help</title>
</head>
<body BGCOLOR="#FFFFFF" TEXT="#000000">
<xsl:apply-templates select="refentry" />
</body>
</html>
</xsl:template>
<xsl:template match="refentry">
<h1><xsl:value-of select="refname" /></h1>
</xsl:template>
<xsl:template match="refentry">
<p><xsl:value-of select="para" /></p>
</xsl:template>
</xsl:stylesheet>
The "select-of" functions aren't working at all - the value of the node
is thrown away in the HTML file, and I'm only left with empty
pairs of tags in the output file. What am I missing?
(Is is a heading problem? I've looked in miscellaneous sample XSL
files on the Web and in books and am finding slightly different versions,
with little explanation about why they are different.)
Thanks!
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list