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

RE: RE: XPath to match XML from Cocoon Request Generat

Subject: RE: RE: XPath to match XML from Cocoon Request Generator
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Thu, 15 May 2003 10:25:01 -0400
generat
[Tim Heighes]
> Thanks for the response Jarno but I still have the problem - 
> may be I have
> misunderstood you - there is no x, so '/path/request/@target' 
> should work:

You have to declare the "x" (or whatever) prefix and bind it to the
namespace in question __in the stylesheet__ (usually in the
xsl:stylesheet element).  Then your select expressions like
"/page/x:request/@target" will work as you desire.

The point is that all the unprefixed elements in your source __do__ have
a namespace - the default namespace.  In the stylesheet you have to
refer to that namespace somehow, and to do that you need to declare it
__with a prefix__.  It does not matter whether or not a prefix is used
in the source document.  What matters is whether a particular element in
the source is bound a a specific namespace, with or without a prefix.

You do not need to match the prefix in the stylesheet with the prefix in
the source - only the corresponding namespace URIs have to match.

Cheers,

Tom P

 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.