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

default namespace in xsl and xpath expressions

Subject: default namespace in xsl and xpath expressions
From: "stefan krause" <stefan.krause@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Jul 2004 18:12:18 +0200
xsl default namespace
Dear all,

There's something I haven't understood quite (warning: this is a
namespace newbie question), so I'm calling for a patient list member to
answer the following question:

I have an xml document with an schema and a xsl style sheet.
Of course any Xpath expressions will not yield the result I wanted if I
don't add the namespace qualifier.
[Example: document looks like ... <document xmlns="mynamespace"> ...,
Xpath expression tries to select "/document" and returns no nodes]

But why doesn't it work when I set the default namespace to the
document's namespace and try to use Xpath expressions in XSL without
namespace qualifiers?
[Example: document looks like ... <document xmlns="mynamespace"> ...,
XSL looks like ... <xsl:template match="/" xmlns="mynamespace">
and Xpath expression is the same as above]

Thanks for all answers,
Stefan

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.