This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: with-param and xsl:apply-templates


> Saxon, XT, and Xalan all do something other than I expect with the
> following stylesheet, which leads me to believe I've forgotten
> something about XSLT. What is it?
> 
> Assuming a test document of "<doc><p>foo</p></doc>", I expect
> the xsl:message to produce "??? 1, doc, Rubble", but it produces
> "??? 0, doc, Flintstone". Why?

Because your <xsl:apply-templates/> is not invoking the relevant template
rule directly. The current node is the root, so it invokes the built-in
template rule for the root. This invokes your specific rule, which applies
to all element nodes. The built in rule passes the mode through unchanged,
but not the parameters.

Mike Kay

> 


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]