xsl-list
[Top] [All Lists]

AW: how to prevent adding xmlns attribute

2004-11-11 08:15:57
Hi Dusa,

I think you should additionally declare

        exclude-result-prefixes="exsl"

in your <xsl:stylesheet> element.
This attribute defines, that the namespace with the specified namespace prefix 
should not be copied to your result tree (if it is not used somewhere)

wbr,
Roman


-----Ursprüngliche Nachricht-----
Von: Dusan Zatkovsky [mailto:zatkovsky(_at_)printsoft(_dot_)cz]
Gesendet: Donnerstag, 11. November 2004 16:10
An: xslt mailinglist
Betreff: [xsl] how to prevent adding xmlns attribute

Hi.

I have one question:

xml:
-----
<root>
      <lama/>
</root>


xsl:
-----
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:exsl="http://exslt.org/common"; version="1.0">
      <xsl:output method="xml"/>

      <xsl:variable name="dataVar">
              <root>
                      <data>123456</data>
              </root>
      </xsl:variable>

      <xsl:template match="/"><xsl:apply-templates></xsl:template>

      <xsl:template match="lama">
              <lama>
                      <xsl:value-of select="exsl:node-
set($dataVar)/root/data"/>
              </lama>
      </xsl:template>

</xsl:stylesheet>


output:
-------
<lama xmlns:exsl="http://exslt.org/common";>12345</lama>


I need to remove namespace from 'lama' tag:
<lama>12345</lama>

How to do this?

I am using XalanC.

Thanks.

--


Dusan Zatkovsky

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>
  • AW: how to prevent adding xmlns attribute, Huditsch Roman <=