cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: content aggregation + links to used files
Date Wed, 07 Jan 2004 11:48:14 GMT
On 07.01.2004 12:26, Nele Vogel wrote:

> Hello!
> I changed my stylesheet news.xsl as Joerg suggested using prefixed
> matching, but unfortunately it still doesn't work.
> In my pipeline I use a directory generator to process all files. The
> output belongs to the namespace
> xmlns:dir="".
> <dir:directory name="news">
>   <dir:file name="news0.xml"/>
>   <dir:file name="news1.xml"/>
> </dir:directory>
> (Note: I deleted some attriubtes.)
> The stylesheet cincludeFiles.xsl uses prefixed matching - its the same
> kind of problem, isn't it? This template matches as expected, the one in
> news.xsl doesn't.

But you do not put <dir:file/> elements out in cincludeFiles.xsl, do 
you? When you send the stylesheets the first time to the list, you put 
out <file/> elements in the default namespace "". In 
news.xsl you must match on prefix:file, where the prefix is bound to the 
default namespace od cincludeFiles.xsl, i.e. "".


>>Well, in that case it is b/c the ouput must be namespace less if I remember
>>Le Mercredi 07 Janvier 2004 02:13, Joerg Heinicke a écrit :
>>>I don't think, simply removing all namespaces is a good solution,
> though the namespace might not be needed here. Furthermore this
> approach slows down the processing through an additional transformer
> step where it is not necessary.
>>>Her problem is the output of cincludeFiles.xsl in the default
> namespace. Matching on such elements has to be done in XSLT prefixed,
> i.e. the namespace must be bound to a prefix and then these elements
> can be matched. So the news.xsl has to be something like the following:
>>><xsl:stylesheet version="1.0"
>>>     xmlns=""
>>>     xmlns:s=""
>>>     xmlns:xsl="">
>>>   <xsl:template match="s:file">
>>>     <xsl:text>following file was added:</xsl:text>
>>>     <xsl:value-of select="./@path"/>
>>>   </xsl:template>
>>>It's an XSLT FAQ and more about it can be found here:

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

View raw message