xsl-list
[Top] [All Lists]

[xsl] Why is an empty xmlns="" added to child when I add namespace to parent?

2011-06-06 12:31:06
Hi,

The following code adds a namespace to the mediawiki element and a
copyAll I import copies the other elements

 <xsl:import href="copyAll.xsl"/>
 <xsl:template match="mediawiki">
    <mediawiki  xmlns="http://www.mediawiki.org/xml/export-0.4/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.4/
http://www.mediawiki.org/xml/export-0.4.xsd"; version="0.4"
xml:lang="en">
      <xsl:apply-templates/>
    </mediawiki>
  </xsl:template>

However in the result the child element <page> gets a blank xmlns=""
attribute added..... Why?

<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.4/";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.4/
http://www.mediawiki.org/xml/export-0.4.xsd";
  version="0.4" xml:lang="en">
  <page xmlns="">


Regards

-- 
Alex Muir
Instructor
Program Organizer
University Technology Student Work Experience Building
https://sites.google.com/a/utg.edu.gm/alex/Home
Come to Gambia, Join UTSWEB
https://sites.google.com/a/utg.edu.gm/utsweb/
+220 359 1203

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