XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Mark MaltbySubject: Passing recursive elements to templates in separate xsl stylesheets
Author: Mark Maltby
Date: 04 May 2006 04:30 AM
I would like to be able to pass a recursive element for examples 'BOOKS' to a sparate style sheet so that i can access any of the elements or attributes in Book.

eg

<xsl:with-param name="BOOKS"><xsl:value-of select="Books"/></xsl:with-param>


<xsl:param name="BOOKS"/>

Then using my variable:
<xsl:value-of select="$Books/Book/title"/>

This doesn't seem to work

Postnext
(Deleted User) Subject: Passing recursive elements to templates in separate xsl stylesheets
Author: (Deleted User)
Date: 04 May 2006 09:55 AM
Hi Mark,

Can you elaborate on what happens? Do you get any error?

BTW, the variables are case-sensitive. Try changing $Books to $BOOKS.

If not, please post the sample xsl and xml that you have.

Regards
Srini

Posttop
(Deleted User) Subject: Passing recursive elements to templates in separate xsl stylesheets
Author: (Deleted User)
Date: 04 May 2006 10:42 AM
Hi Mark

Here is another thing you can try...

Either change

<xsl:with-param name="BOOKS"><xsl:value-of select="Books"/></xsl:with-param>

TO

<xsl:with-param name="BOOKS" select="Books"/>


<xsl:param name="BOOKS"/>

Then using variable:
<xsl:value-of select="$BOOKS/Book/title"/>

OR TO

<xsl:with-param name="BOOKS"><xsl:value-of select="Books"/></xsl:with-param>


<xsl:param name="BOOKS" select="Books"/>

Then using variable:
<xsl:value-of select="$BOOKS/Book/title"/>


Regards
Srini

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.