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

Re: XSLT2 variables / nodesets and their namespace

Subject: Re: XSLT2 variables / nodesets and their namespace
From: Tom Schutzer-Weissmann <trmsw@xxxxxxxxxxx>
Date: Fri, 21 Jan 2005 12:51:17 +0000
xpath default namespace xalan
On Fri, 2005-01-21 at 12:10, David Carlisle wrote:
[...]

> You didn't say what your source looked like but perhaps your problem
> isn't about generating elements at all but with selecting elements:
> one example had
>       <xsl:copy-of select="head/*"/>
> the other had
>       <xsl:copy-of select="f:head/*"/>
> 
> the first one selects a head element in no-namespace the second selects
> an element head in the xhtml namespace. Which element does your source
> file have?

The obvious question! Most of the problems I had were immediately fixed
by setting the source's namespace to the xhtml one. Clearly my brain
wasn't working last night - only succeeded in confusing myself (and
possibly others...)

> In XSLT1 you have no alternative but to use prefixes to select
> namespaced elements, but in xslt2 you can make teh first unprefixed form
> also select an xhtml head if you use the new
> xpath-default-namespace="http://www.w3.org/1999/xhtml"
>  attribute on xsl:stylesheet

This is what I was missing. It works now :)

Thanks again,
Tom

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.