[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Need xml dir list by dc:title

Subject: RE: Need xml dir list by dc:title
From: "Jim Fuller" <jim.fuller@xxxxxxxxxxxxxxxxxx>
Date: Tue, 22 Jul 2003 15:46:54 +0100
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.