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

Re: Namespaces and For-each

Subject: Re: Namespaces and For-each
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 24 Feb 2000 17:21:47 GMT
Re: Namespaces and For-each
> Can anyone tell me if this is to be expected? 

no it's not. as it sounds like it should work.

However if I ignore

> In contrast, if I have a series of
> templates matching "/", "*" and "my-element" with each of the doing an
> apply-templates, I *do* select the "my-element".

I could answer the more usuaal usual quaestion as to why //my-element
might not select an element named my-element. In the hope that
perhaps you lied:-)

You said:

> I am trying to transform a document which uses several namespace
> prefixes.

but whether it uses many (or even no) prefixes is not the point, the
point is how many namespaces does it use, and in particular what
namespace is my-element in.

If your document has used xmlns="xxx" somewhere so that my-element is
in the namespace xxx then 

<xsl:for-each select="//my-element">

will not match it, you need so do xmlns:x="xxx" in the stylesheet
and use "//x:my-element"

David


 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.