473,387 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

XSL: escape ' character

Hi,

how can I escape the ' character in the word "don't"? That's my source:

<xsl:variable name="text.general.ifNotRegistered" select="'If you don't
have a user, please'"/>

Thx :),

Angus
Jul 20 '05 #1
1 13791

To get a ' into an XPath string literal you need to use " to surround
the string as in

"If you don't have a user, please"

then to get that expression into an XML attribute you either delimit
with ' and quote the '

select='"If you don&apos;t have a user, please"'

or delimit with " and quote the "
select="&quot;If you don't have a user, please&quot;"

Or for most purposes you can use the aternaive form using content not an
attribute and not have to quote anything
<xsl:variable name="text.general.ifNotRegistered"
If you don't have a user, please</xsl:variable>


David
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Niko | last post by:
I am trying to pass a piece of XMLthat has escaped characters e.g &gt; into a new piece of XML. However when I pass it I don't want these characters escaped and want them to appear in the XML. Any...
2
by: Tony | last post by:
I'm working with a web application that uses xslt to diplay info contained in a xml file. The xslt file also contains input fields to be submitted to the database. When I have a backquote, `, in...
2
by: Gene Ellis | last post by:
Put simple I would like to have this line in my XSL template: document.writeln("<a href='http://www.mydomain.com/user/login.php' class='login'>") My XML parser seems to be breaking on the...
4
by: Johannes Busse | last post by:
Hello NG, I'm struggling with the following problem. I think can be solved quite easily (in fact it should be a FAQ), but it seems that I cannot solve it myself :-( my source looks like...
7
by: teachtiro | last post by:
Hi, 'C' says \ is the escape character to be used when characters are to be interpreted in an uncommon sense, e.g. \t usage in printf(), but for printing % through printf(), i have read that %%...
3
by: simon | last post by:
Hi, I was wondering how you include an asp.net button inside an xsl transform file. I want to put a button next to each entry when i style my xml data. Thanks in advance, Simon
4
by: Jon | last post by:
Hi, I used XslCompiledTransform with the following Xsl file. The <xsl:text disable-output-escaping="yes"does not work when using XslCompiledTransform to do the trnasform (namely the output...
8
by: Larry | last post by:
Hi, I'm trying to get the following working but I'm at a loss and dont know what is wrong with it: <div class="name"> <a href=" <xsl:apply-templates select="key" mode="getValue" /"...
1
by: David Greene | last post by:
I am allowing my visitors to view my c#, xsl, xml code at my website: http://www.dlgreene.com You can view the code by clicking the Code link at the top or bottom left of every page. Every code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.