Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 23rd, 2003, 03:22 PM
Registered User
 
Join Date: Sep 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default variables in xslt

Hello,

I would like my stylesheet to be dynamic based on the xml document. By this i want to show a disclaimer if there are certain criteria in the xml.

i have tried to set a global variable in the stylesheet but when i set the value in the for-each block the value does not change after the for-each block.

any ideas?
thanks
 
Old September 24th, 2003, 01:23 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 147
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to armmarti
Default

Quote:
quote:Originally posted by will.richardson
 Hello,

I would like my stylesheet to be dynamic based on the xml document. By this i want to show a disclaimer if there are certain criteria in the xml.
Hi,
it's hard to say something... show us what you want to do (xml doc and xsl stylesheet).
Quote:
quote:
i have tried to set a global variable in the stylesheet but when i set the value in the for-each block the value does not change after the for-each block.
XSLT is a functional programming language: you can't update the value of a variable(in the xsl:for-each you declare new variable which is in the "local" scope). Again, show us the code, and we'll try to find a solution according to XSLT.

Regards,
Armen





Similar Threads
Thread Thread Starter Forum Replies Last Post
General XSLT Questions in the XSLT Forum jminatel BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 0 March 31st, 2008 07:50 PM
Can XSLT read DTD/schema and Generate XSLT.. ROCXY XSLT 1 November 6th, 2006 09:39 AM
dynamic xslt -> xslt creation namespace problem jkmyoung XSLT 2 July 15th, 2006 12:42 AM
XSLT: Joining params with Variables shasto100 XSLT 2 April 24th, 2006 07:15 AM
xslt with an xslt outputfile alleycat XSLT 4 February 20th, 2006 09:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.