Subject: [xsl] Getting rid of a namespace declaration From: "Patricia Murray" <Patricia.Murray@xxxxxxxxxxxx> Date: Mon, 15 Mar 2004 11:03:03 -0000 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] copying problem, poppe chris | Thread | Re: [xsl] Getting rid of a namespac, Emmanuil Batsis (Man |
RE: [xsl] XSLT 2.0 and implementati, David . Pawson | Date | Re: [xsl] Getting rid of a namespac, Emmanuil Batsis (Man |
Month |