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

RE: apply-template inside xsl:variable returns a docu

Subject: RE: apply-template inside xsl:variable returns a documentFragment with a child node tree
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Fri, 24 Feb 2006 12:13:15 +0100 (CET)
xslt apply template to variable
"John P. Flanigan [Software Technology Initiative, Inc.]" wrote:

>   <xsl:variable name="thisContent">
>     <xsl:apply-templates select="$elementContent">
>       <xsl:with-param name="elementName" select="@name"/>
>     </xsl:apply-templates>
>   </xsl:variable>

  In XSLT 1.0, the value of $thisContent is a RTF.  In XSLT 2.0, it is
a Temporary Tree (so a document node, root of this tree).

> The file content.xml has a structure like

>   <content>
>     <elements>
>       <element id="table">
>         <caption>Table</caption>
>         <description>Name of table in database</description>
>         <help href="table.help"/>
>       </element>
>     </elements>
>     ...
>   </content>

> I would like $thisContent to be equivalent to the single
> <element> shown above, when @name = "table".

  In XSLT 2.0, you can use xsl:variable/@as:

    <xsl:variable name="thisContent" as="element(element)">




Nouveau : tiliphonez moins cher avec Yahoo! Messenger ! Dicouvez les tarifs exceptionnels pour appeler la France et l'international.
Tilichargez sur http://fr.messenger.yahoo.com

Current Thread


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.
First Name
Last Name
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.