[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Urgent !!! '&' being replaced by '&'

Subject: Re: Urgent !!! '&' being replaced by '&'
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 07 Aug 2000 19:15:16 +0100
apostrophe replaced in emails
Mahesh,

>The code snippet I posted was a right one.
>I indeed need the &apos; . It's part of the title attribute of 
>the card element from WML 1.1.
>Can u please suggest me some work around , so that I get &apos; in the
title attribute?

I can't replicate your problem.  With the following:

---- test.xml ----
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="test.xsl" ?>
<XML-MSG>
	<SERVICE-INFO>
		<OUTPUT>
			<Result>
				<headline>Nothing&apos;s wrong!</headline>
			</Result>
		</OUTPUT>
	</SERVICE-INFO>
</XML-MSG>
----

---- test.xsl ----
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml"/>

<xsl:template match="/">
	<xsl:variable name="cardTitle"
select="XML-MSG/SERVICE-INFO/OUTPUT/Result/headline" />
	<card id="News" title="{$cardTitle}" />
</xsl:template>

</xsl:stylesheet>
----

I get the output (using SAXON) of:

---- out.xml ----
<?xml version="1.0" encoding="utf-8"?>
<card id="News" title="Nothing's wrong!"/>
----

The apostrophe in the output will always have exactly the same effect as if
it had been escaped as &apos;, but from what you were saying I don't think
that was your problem.  Certainly, there is no &amp; in the output.

As Mike said, posting the XML source that you're using and a bit more of
the context of the stylesheet might help us give a better clue about what's
going wrong for you.

Cheers,

Jeni

Dr Jeni Tennison
Epistemics Ltd * Strelley Hall * Nottingham * NG8 6PE
tel: 0115 906 1301 * fax: 0115 906 1304 * email: jeni.tennison@xxxxxxxxxxxxxxxx


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.