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

Re: default namespace in match attribute of xsl:templa

Subject: Re: default namespace in match attribute of xsl:template
From: Sergey Groznyh <gsm@xxxxxx>
Date: 04 Feb 2003 11:24:15 +0300
Re:  default namespace in match attribute of xsl:templa
Hello,

>>>>> "Peter" == Peter Paulus <paulus@xxxxxxxx> writes:

    Peter> The response element falls in the default namespace
    Peter> 'someuri'. How do you indicate this namespace in the match
    Peter> parameter of xsl:template. We tried match='response',
    Peter> match=':response', match='namespace::/response',
    Peter> match='#default:response'.

default namespace declarations don't apply to XPath expressions.  So
you must use some prefix to indicate namespace for element 'responce'.
Instead of

  <xsl:apply-templates select='response'/>

and

  <xsl:template match='someuri:response'>

use 

  <xsl:apply-templates select='s:response' xmlns:s='someuri'/>

and

  <xsl:template match='s:response' xmlns:s='someuri'>
    

-- 
SM Groznyh                            "Under the wide and heavy VAX
gsm@xxxxxx                             Dig my grave and let me relax..."


 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.