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 June 26th, 2007, 02:24 AM
Authorized User
 
Join Date: Mar 2007
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default New Line

i am passing a parameter to XSLT in the form of string. suppose string is this

[u]"welcome to <br /> the XML"</u>

[u]<xsl:param name="content" /></u>
and then i am selecting the value in this way

 [u]<xsl:value-of select="$content" disable-output-escaping="yes" /></u>
but still it is showing the result with the [u]<br /></u> tag. i want to print "the XML" on new line how it is possible.


I Love XML and family
__________________
I Love XML and family
 
Old June 26th, 2007, 02:35 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

disable-output-escaping doesn't work in all environments and it's best not to rely on it. The best approach to this kind of thing is to turn the input into an XML tree before you start (by putting it through an XML parser). You'll need to wrap it in a start/end tag pair to make it well-formed.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old June 26th, 2007, 04:33 AM
Authorized User
 
Join Date: Mar 2007
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

mhkay:

i tried whta you said before sending the string i converted it into xml tree and when i executed it gave this error.

[u]A potentially dangerous Request.Form value was detected from the client </u>

I Love XML and family
 
Old June 26th, 2007, 09:09 AM
Authorized User
 
Join Date: Mar 2007
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

mhkay

actually you know what is happening, i am first converting input string into XML tree and then passing it to DataSet and in DataSet it is taking as [u]&lt;Name&gt;</u>, ok i know this forum is not related to DataSet, but the thing is that in DataSet data resides in form of XML we can access that data through XSLT, XSLT treats DataSet as XML File,
so it gives error for this. [u]&lt;</u>. i tried to use this

[u]<xsl:value-of select="replace('Name','&lt;','<')" /></u> but then how for the [u]&gt;</u>. any help

I Love XML and family
 
Old June 26th, 2007, 09:15 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

What is "DataSet" in this context?

Remember that I have no idea what kind of environment you are working in. The term "DataSet" reminds me mainly of IBM mainframes.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to draw indicator line in owc line chart AlexOo General .NET 0 July 9th, 2007 10:32 PM
Reading a string from line by line vaidyapragati ASP.NET 2.0 Professional 1 May 3rd, 2007 08:43 AM
How to read file line by line in EVC++ iriskab Visual C++ 0 September 27th, 2006 01:39 PM
Reading line by line from a .txt file x_ray VB.NET 2002/2003 Basics 5 February 10th, 2006 01:55 PM
how can i take line by line in the richtextbox kamarajraj Beginning VB 6 0 August 12th, 2005 04:29 AM





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