cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simeon Walker <>
Subject Namespace in DirectoryGenerator elements
Date Fri, 11 Jan 2002 10:19:08 GMT
    I'm trying to use the directory generator in Cocoon 2 but the
elements are created with the namespace URI as the prefix, i.e.
'' instead of 'dir'.

Here's the bit of my sitemap where the generator is setup:

     <map:generator  name="directory"
       src="org.apache.cocoon.generation.DirectoryGenerator" label="content"/>

which is just like the distributed sitemap.

Later on this bit calls a filter on the elements from the generator:

	<map:match pattern="teaching/module/*/materials.xml">
		<map:generate type="directory"
		<map:transform src="stylesheets/filters/directory.xsl">
			<map:parameter name="module" value="{1}"/>
		<map:serialize type="xml"/>

The filter contains the following:

	<?xml version="1.0"?>

		<xsl:param name="module"/>
		<xsl:template match="/">
			<xsl:for-each select="*">
					<xsl:value-of select="name(.)"/>
					<xsl:value-of select="@name"/>

I may then output xml to the browser to avoid any further xslt
processing or use the simple-xml2html.xsl stylesheet provided
with cocoon. Either way I get directory elements with the namespace
URI instead of the prefix.

Since no one else has mentioned this I guess I must be doing
something wrong, but I can't find it.. Any suggestions will be


Simeon Walker,                      email:
School of Biological Sciences,      phone: +44 (0)1248 383702
University of Wales, Bangor,        fax: +44 (0)1248 382569
Gwynedd, LL57 2UW, UK.              www:

To unsubscribe, e-mail:
For additional commands, email:

View raw message