|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Another Beginner's Question
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
|
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
|

Cart








