RE: [xslt] Suppress namespace in output. Is it possible?

Ok, let me re-state the question.

I understand the importance of keeping namespace around. However in this
particular case, I only want the output *looks* as same as the input. In
this application, I copy the source tree to output for nothing but a
reference. So that people who look at the transformed output can tell where
the output was transformed from.

Is there anyway to achieve that, other than write my own copy template?

>-----Original Message-----
>From: xslt-bounces gnome org [mailto:xslt-bounces gnome org] 
>On Behalf Of Vincent Lefevre
>Sent: Monday, January 10, 2005 3:42 PM
>To: xslt gnome org
>Subject: Re: [xslt] Suppress namespace in output. Is it possible?
>On 2005-01-10 14:08:41 -0800, Jia Pu wrote:
>> I am trying to use xsl:copy a tree to output. It seems that the xslt
>> processor will automatically add the xmlns attribute in the output.
>> For exmaple, source tree:
>> <rule id="Digits">
>> </rule>
>> will turn into:
>> <rule xmlns=""; id="Digits">
>> </rule>
>> Is it possible to suppress that behavior so that the output 
>is exactly
>> same as the input?
>If you want to change the namespace (e.g. from
>""; to the null namespace),
>then you can't say that the output is the same. The XSLT
>processor just makes sure that the namespace is correct by
>adding the xmlns attribute.
>The context (e.g. the default namespace) is important, and you
>didn't say anything about it.
>Vincent Lefèvre <vincent vinc17 org> - Web: <>
>100% accessible validated (X)HTML - Blog: <>
>Work: CR INRIA - computer arithmetic / SPACES project at LORIA
>xslt mailing list, project page
>xslt gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]