|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Need xml dir list by dc:title
> -----Original Message----- > From: hgadm@xxxxxxxxxxxxx [mailto:hgadm@xxxxxxxxxxxxx] > Sent: 22 July 2003 15:21 > To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx > Subject: 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
|
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








