-----Original Message-----
From: hgadm(_at_)cswebmail(_dot_)com [mailto:hgadm(_at_)cswebmail(_dot_)com]
Sent: 22 July 2003 15:21
To: XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Need xml dir list by dc:title
Dear all,
I want to provide a (dynamically generated) HTML page
with links to all XML files in a given directory.
The links should however not named by the xml file name
but with the <dc:title> element of these xml files.
I've got a nice solution with cocoon using the
XPathFileGenerator, but I cannot run Cocoon in the
current environment so I would need a pure XML/XSL
solution.
you will still need a processor somewhere, either in the browser or on the
server....
ok without thinking ( or testing )
xml file
<?xml version="1.0" ?>
<test xmlns:dc="http://test.org">
<dc:title>somepage.xml</dc:title>
</test>
xsl file
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dc="http://test.org"
<xsl:output method = "html" encoding="Windows-1252" />
<xsl:template match="test">
<html>
<title></title>
<body>
<xsl:apply-templates select="dc:title"/>
</body>
</html>
</xsl:template>
<xsl:template match="dc:title">
<a href="{.}"><xsl:value-of select="."/></a>
</xsl:template>
</xsl:stylesheet>
something like this should do, but we dont know your xml format, note that I
had to declare the dc namespace ( though I didnt have the correct URI ).
gl, jim fuller
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list