I am having trouble generating the quotes inside the attributes from your
example. I am using the following XSLT with Saxon 8:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xhtml" encoding="utf-8" omit-xml-declaration="yes"
use-character-maps="ssi"/>
<xsl:character-map name="ssi">
<xsl:output-character character="󰀁" string="<!--"/>
<xsl:output-character character="󰀂" string="-->"/>
<xsl:output-character character="󰀃" string="""/>
</xsl:character-map>
<xsl:template match="/">
<a src="󰀁 󰀃fff󰀃 󰀂 ">d</a>
</xsl:template>
</xsl:stylesheet>
This generates:
<a src='<!-- "fff" --> '>d</a>
I'd like to preserve the double quotes surrounding the attribute. Is this
possible?
From: David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Embedding an SSI echo in an XML attribute
Date: Wed, 9 May 2007 10:45:29 +0100
> To acheive this in XSLT 1 we generated the code as CDATA in a plain text
> file:
If you are using plain text ie xsl:output method="text" then you don't
need
<xsl:text disable-output-escaping="yes">
as the text output method never does any escaping anyway.
In XSLT If you want to use the xml output method so you can generate
most of the elements as elements then you can do something like
<xsl:output use-character-maps="ssi"/>
<xsl:character-map name="ssi">
<xsl:output-character character="��" string="<!--"/>
<xsl:output-character character="��" string="-->"/>
</xsl:character-map>
<xsl:template match="jhkhgf">
<a href="��echo var="grar.5.url" encoding="none"
"��">link</a>
David
________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
_________________________________________________________________
Txt a lot? Get Messenger FREE on your mobile.
https://livemessenger.mobile.uk.msn.com/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--