This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Urgent !!! '&' being replaced by '&'
- To: Mahesh Nanavate <mahesh dot nanavate at ecapsol dot com>
- Subject: Re: Urgent !!! '&' being replaced by '&'
- From: Jeni Tennison <jeni at friday dot u-net dot com>
- Date: Mon, 07 Aug 2000 19:15:16 +0100
- Cc: xsl-list at mulberrytech dot com
- Reply-To: xsl-list at mulberrytech dot com
Mahesh,
>The code snippet I posted was a right one.
>I indeed need the ' . 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 ' 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'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 ', but from what you were saying I don't think
that was your problem. Certainly, there is no & 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@epistemics.co.uk
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list