cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elizabeth Sadler <esad...@ualberta.ca>
Subject Re: cinclude leaves its namespace in the output XML
Date Fri, 17 Jun 2005 01:20:57 GMT
I apologize if I'm misunderstanding the problem, but have you tried  
using the exclude-result-prefixes flag in your XSL declaration? Like  
this:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/ 
Transform" xmlns:i18n="http://apache.org/cocoon/i18n/2.1"  
xmlns:dir="http://apache.org/cocoon/directory/2.0" exclude-result- 
prefixes="dir">

Bess

On 16-Jun-05, at 1:07 PM, Geert Josten wrote:

> Yeah, pretty annoying, but this is not the only place where it  
> happens. XSL transforms can do that as well. I usually let the  
> namespaces clutter up and use one XSL to get rid of all unused  
> namespaces with these templates:
>
>   <xsl:template match="@*">
>     <xsl:attribute name="{name()}" namespace="{namespace-uri()}">
>       <xsl:value-of select="." />
>     </xsl:attribute>
>   </xsl:template>
>
>   <xsl:template match="*">
>     <xsl:element name="{name()}" namespace="{namespace-uri()}">
>       <xsl:apply-templates select="@*|node()" />
>     </xsl:element>
>   </xsl:template>
>
> I think it has something to do with the XML writer having  
> difficulty with tracking whether namespaces have actually been used  
> within certain scopes or not. Though I would think it should not be  
> that difficult to make it right.
>
> HTH,
> Geert
>
> Gerald Aichholzer wrote:
>
>
>> Hi,
>> I've just found out that the cinclude-transformer leaves
>> its namespace in the output XML, e.g.
>>   <symbol xmlns:cinclude="http://apache.org/cocoon/include/1.0">
>>     ...
>>   </symbol>
>> Can I get rid of this using a parameter or do I have to
>> follow each cinclude with an identity transformation which
>> removes the namespace only?
>> In my opinion this has no use in the output XML because
>> no element of cinclude's namespace is used anyway.
>> WDYT?
>> Gerald
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
> -- 
> =====================================
> NB: het Daidalos kantoor is sinds 22 april
> jl. gevestigd op een nieuw adres:
>
> Daidalos BV
> Hoekeindsehof 1 - 4
> 2665 JZ Bleiswijk
> tel: +31 (0)10 850 12 00
> fax: +31 (0)10 850 11 99
>
> Bovenstaand adres is tevens het postadres.
> ======================
> Geert.Josten@Daidalos.nl
> IT-consultant at Daidalos BV
>
> http://www.daidalos.nl/
>
> GPG: 1024D/12DEBB50
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message