[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Why is an empty xmlns="" added to child when I add na

Subject: Why is an empty xmlns="" added to child when I add namespace to parent?
From: Alex Muir <amuir@xxxxxxxxxx>
Date: Mon, 6 Jun 2011 17:30:50 +0000
 Why is an empty xmlns="" added to child when I add  na
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.