xsl-list
[Top] [All Lists]

RE: [xsl] root siblings contain xmlns=""

2006-06-12 03:31:53
<xsl:copy> copies an element without change. That means its namespace in the
result document will be the same as its namespace in the source document (in
this case, the null namespace). To change the namespace of an element, use
<xsl:element name="{local-name()}" namespace="..."/>.

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: christoph(_dot_)klocker(_at_)rcm(_dot_)at 
[mailto:christoph(_dot_)klocker(_at_)rcm(_dot_)at] 
Sent: 12 June 2006 07:16
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] root siblings contain xmlns=""

Hi,
I do an transformation where I add a a schema declaration to the root
element:
 
in the Stylesheet I define the root element as follows:
 
 
 
  <xsl:template match=3D"Element">
 <XML xmlns=3D"http://www.something.at/Something"; xmlns:xsi=3D"http:
 //www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=3D"http:
 //www.something.at/Something
             http://www.something.at/something.xsd";>
          <xsl:apply-templates/>
             <Arranger>
                 <xsl:apply-templates 
select=3D"$Var//ArrangerList/*"/>
             </Arranger>
     </XML>

  <xsl:template match=3D"node()|@*">
         <xsl:copy>
             <xsl:apply-templates/>
         </xsl:copy>
     </xsl:template>
 
 in the result document all the siblings of the root Element 
contain  the empty namespace ' <element xmlns=3D""> ' 
 How can I get rid of this=3F=3F
 
 I am using Saxon8B 

 thx Christoph
 



This message and any attachment ("the Message") are 
confidential. If you are not the intended recipient any use 
is strictly prohibited. If you have received the Message in 
error, please notify the sender immediately and delete the 
Message from your system, any use is forbidden. 
Correspondence via e-mail is primarily for information 
purposes. KAG/RVG/RIFA/ImmoKAG neither makes nor accepts 
legally binding statements unless otherwise agreed to the contrary

--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>
--~--