ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error

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

RE: xslt 2.0 xsl:copy copy-namespaces

Subject: RE: xslt 2.0 xsl:copy copy-namespaces
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sun, 12 Jun 2005 13:02:17 +0100
copy namespaces
Like exclude-result-prefixes, copy-namespaces="no" only affects the copying
of unused namespaces. Namespaces that are used in element and attribute
names will always be copied (technically, they aren't copied to the result
tree, but they are added to the result tree by the namespace fixup process).
You can't use xsl:copy or xsl:copy-of to change the name of an element, it
will always have the same local-name and namespace-uri as the original.

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

> -----Original Message-----
> From: Dave Pawson [mailto:davep@xxxxxxxxxxxxx] 
> Sent: 12 June 2005 10:45
> To: Xsl List
> Subject:  xslt 2.0 xsl:copy copy-namespaces
> 
> Given input
> xmlns:x="http://www.w3.org/1999/xhtml"
>   <content>
>     <x:div>
>       <x:h3>Content head </x:h3>
>       <x:p>Content p </x:p>
>     </x:div>
>   </content>
> 
> ssheet
> 
>  <xsl:template match="a:content">
>    <xsl:apply-templates mode="content"/>
>  </xsl:template>
> 
>  <xsl:template match="*" mode="content">
>     <xsl:copy copy-namespaces="no">
>       <xsl:copy-of select="@*"/>
>       <xsl:apply-templates mode="content"/>
>     </xsl:copy>
> </xsl:template>
> 
> 
> I'm getting output of
> 
> 
>   <x:div xmlns:x="http://www.w3.org/1999/xhtml">
>             
>             <x:h3>Content head </x:h3>
>             
>             <x:p>Content p </x:p>
>             
>          </x:div>
> 
> 
> Shouldn't the namespace be removed?
> 
> Saxon 8.4. in use.
> Or am I misinterpreting page 244 of Mikes book?
> 
> 
> (Oh I do miss the header on the pages.
> Trying to find an element now is horrible compared
> to the 1.0 book)
> 
> 
> 
> 
> 
> -- 
> Regards, 
> 
> Dave Pawson
> XSLT + Docbook FAQ
> http://www.dpawson.co.uk

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.