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

Getting rid of a namespace declaration

Subject: Getting rid of a namespace declaration
From: "Patricia Murray" <Patricia.Murray@xxxxxxxxxxxx>
Date: Mon, 15 Mar 2004 11:03:03 -0000
trish murray
Can anyone help me with my problem!

I have a stylesheet that creates some xhtml and then incorporates xhtml
from another page. The problem is that the namespace from the
incorporated xhtml page is coming too and I don't want it to. Is there
anyway that I can do something in the template so the namespaces don't
come along too. 



At the top of the stylesheet, I define the xhtml namespace
<xsl:stylesheet 
  version="2.0" 
  xmlns:xhtml=http://www.w3.org/1999/xhtml  ....

In the body of the xsl stylesheet:

<xsl:apply-templates
select="document(concat('input/',$outputfile))//body |
document(concat('input/',$outputfile))//xhtml:body" />


The template that matches

<xsl:template match="xhtml:body">
<xsl:copy-of select="*" />
</xsl:template>


The xhtml page I am incorporating has the xhtml namespace as a default
namespace

The result looks like this and I don't want those xmlns attributes ...


    <div class="content" id="content">
            <h1 xmlns="http://www.w3.org/1999/xhtml">The Census</h1>
            <h2 xmlns="http://www.w3.org/1999/xhtml">Collecting the data
</h2>
            <p xmlns="http://www.w3.org/1999/xhtml">Every 10 years, all
people and households in the UK are counted. This census of the
population last took place on 29th April
       

Help!

Yours, Trish



***********************************
E-Learning Developer
Nomis, University of Durham
http://www.nomisweb.co.uk/
0191 334 2680
 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.