xsl-list
[Top] [All Lists]

Re: default namespace in match attribute of xsl:template

2003-02-04 01:24:15
Hello,

"Peter" == Peter Paulus <paulus(_at_)neroc(_dot_)nl> 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(_at_)fct(_dot_)ru                             Dig my grave and let me 
relax..."


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



<Prev in Thread] Current Thread [Next in Thread>