Joerg, it works! :-))) I removed the default namespace from cincludeFiles.xsl as you suggested and changed the match statements in news.xsl. Further I removed the default namespace from my XML data. The elements <news> and <file> are now matched and properly displayed.
The attached archive contains the following files:
-sitemap.xmap
-cincludeFiles.xsl
-news.xsl
-news1.xml
The directory structure looks like this (+ directory, ~ file):
+sevencs/
+content/
+news/
~news1.xml
~sitemap.xmap
+styles/
+xsl/
~cincludeFiles.xsl
~news.xsl
I understand, that working without namespaces is not a good idea, *but for
now* it enables me to continue my work.
Thanks a lot!
Nele
> Hmm, now I'm nearly speechless :) It looks okay and it should work IMO.
>
> Can you try ...
>
> On 07.01.2004 14:16, Nele Vogel wrote:
>
>>>But you do not put <dir:file/> elements out in cincludeFiles.xsl, do
>>>you?
>>
>>
>> No. cincludeFiles.xsl puts out the following:
>>
>> <news xmlns:dir="http://apache.org/cocoon/directory/2.0"
>> xmlns:cinclude="http://apache.org/cocoon/include/1.0"
>> xmlns="http://www.sevencs.com">
>
> to remove the default namespace here ...
>
>> <file path="news/news1.xml">
>> <article>
>> [... other elements ...]
>> </article>
>> </file>
>> [... other files ...]
>> </news>
>
> ... so that these elements are not in any namespace ...
>
>>>When you send the stylesheets the first time to the list, you put
>>>out <file/> elements in the default namespace "http://sevencs.com". In
>>>news.xsl you must match on prefix:file, where the prefix is bound to the
>>>default namespace od cincludeFiles.xsl, i.e. "http://sevencs.com".
>>
>>
>> This is the header of news.xsl and the most important templates.
>> Now, from what I understand the prefix *sevencs* is bound to the default
>> namespace "http://www.sevencs.com". Is that correct?
>>
>> <xsl:stylesheet version="1.0"
>> xmlns="http://www.sevencs.com"
>> xmlns:sevencs="http://www.sevencs.com"
>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>>
>> <xsl:template match="/">
>> <xsl:apply-templates/>
>> </xsl:template>
>>
>> <xsl:template match="sevencs:news">
>> <xsl:apply-templates/>
>> </xsl:template>
>
> ... and match here ...
>
>> <xsl:template match="sevencs:file">
>
> ... and here on unprefixed 'news' and 'file' again.
>
>> <xsl:text>following file was added:</xsl:text>
>> <xsl:value-of select="./@path"/>
>> <xsl:apply-templates/>
>> </xsl:template>
>>
>> [... other templates ...]
>>
>> </xsl:stylesheet>
>>
>> But it still doesn't match.
>
> I really don't understand it now. Can you resend a zipped version of the
> sitemap and the stylesheets again?
>
> Joerg
files.zip
Description: Zip archive
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
