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

[no subject]

[no subject]
This variable is a result tree fragment. In XSLT 1.0 you aren't allowed to
probe inside a result tree fragment using path expressions such as
$warning/warning.

<xsl:call-template name="warning">
	<xsl:with-param name="warning" select="$warning" />
      <xsl:with-param name="level">3</xsl:with-param> 
</xsl:call-template>
> 
> I don't like it. I'd rather do it in one fell swoop, a la:
> 
> <xsl:call-template name="warning">
> 	<xsl:with-param name="warning">
>         	<warning>New contacts may only be added to active
consumers.</warning>
>     </xsl:with-param>
>     <xsl:with-param name="level">3</xsl:with-param> 
> </xsl:call-template>

This code is completely equivalent to what you had before.
> 
> But my template complains: Reference to variable or parameter 
> 'warning' must evaluate to a node list.

It's right to complain. You can't use a result tree fragment as an operand
of "/".

It was wrong not to complain before, when you used the xsl:variable.

What processor are you using?

Michael Kay
http://www.saxonica.com/


> 
> Also, I'm all about syntax efficiency. Are there any other 
> shortcuts I could take besides the one I'm looking for?
> 

Well, if you want to make full use of result tree fragments / temporary
trees, your best bet is to move to XSLT 2.0.

Michael Kay
http://www.saxonica.com/

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.