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

Re: questions regd namespaces

Subject: Re: questions regd namespaces
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 9 Jul 2002 14:26:04 +0100
Re:  questions regd namespaces
<center>
<all-centers xmlns = "http://www.nda-centres.com/namespaces">

That is a center element in no namespace with child a all-centers
element in the namespace http://www.nda-centres.com/namespaces
(Do you really want to change namespaces at that point?)

An Xpath that selects that would be

/center/x:all-centers

where x: has been bound to the http://www.nda-centres.com/namespaces
namespace

so you want

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:x="http://www.nda-centres.com/namespaces">


<xsl:template match="/">
<xsl:value-of select="/center/x:all-centers"/>

Xpaths like attribute names do not use the default namespace binding:
unprefixed QNames in XPath always refer to elements or attributes in no
namespace. 

David
(This is a FAQ)

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

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


Current Thread
  • questions regd namespaces, (continued)
        • subbu - Mon, 8 Jul 2002 17:29:09 -0400 (EDT)
        • Jeni Tennison - Mon, 8 Jul 2002 18:33:38 -0400 (EDT)
        • subbu - Tue, 9 Jul 2002 04:59:40 -0400 (EDT)
        • subbu - Tue, 9 Jul 2002 08:40:53 -0400 (EDT)
        • David Carlisle - Tue, 9 Jul 2002 09:26:14 -0400 (EDT) <=
        • Michael Kay - Tue, 9 Jul 2002 04:44:09 -0400 (EDT)
        • subbu - Tue, 9 Jul 2002 05:03:24 -0400 (EDT)
    • ashu t - Tue, 9 Jul 2002 02:58:16 -0400 (EDT)

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.