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 February 19th, 2007, 12:22 PM
Authorized User
 
Join Date: Feb 2007
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default adding value and passing to method

actually i want to concat some string value....
i'm doing this...but it is not correct for<>..how to add it??
<xsl:variable name ="val" select ="'<br>'+string($names)+'<br>'"/>

suppose after the ading i want to pass it in a js method waht will be the syntax to pass it? i can't put $val directly....then how i will pass the value...itself

<input type="button" value="More..." ONCLICK="showText('ONCLEARDETAILS', 'ON-CLEAR-DETAILS: TriggerText',[u]value of variable val</u> "/>


thnx...
 
Old February 19th, 2007, 05:08 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

XSLT takes a tree as input and produces a tree as output. To write an element node to the output you need to use an instuction such as xs:element. You can't write markup like <br> to the output because the output is not lexical XML or HTML, it is a tree of nodes.

If you want to add the string value of a variable to a text node in the result tree, use the xsl:value-of instruction.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old February 20th, 2007, 04:45 AM
Authorized User
 
Join Date: Feb 2007
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thnx u i got it.....






Similar Threads
Thread Thread Starter Forum Replies Last Post
method amit_p_patel VB How-To 2 May 25th, 2007 01:46 AM
passing DataOuputStr/DataInputStream to a method dglnz BOOK: Beginning Java 2 0 March 8th, 2007 04:38 AM
Why is this method placed in filip BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 1 August 25th, 2006 09:40 PM
best method for passing variables jamara VBScript 2 March 29th, 2005 05:26 PM
Access Forms Open Method of Passing Parameters androman Access VBA 8 September 22nd, 2004 09:04 AM





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