xsl-list
[Top] [All Lists]

Re: [xsl] SSI echo as an attribute value

2006-09-14 08:02:21
I lied - it doesn't work either way when the attribute is href. It seems to be fine when the attribute is not href doing it either way. I am using saxon 8. Here is my full stylesheet:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY  start-comment "&#xE501;">
<!ENTITY  end-comment "&#xE502;">
]>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="2.0">
   <xsl:output method="html" encoding="utf-8" indent="no"
       use-character-maps="comment-delimiters"/>
   <xsl:character-map name="comment-delimiters">
       <xsl:output-character character="&start-comment;" string="&lt;!--"/>
       <xsl:output-character character="&end-comment;" string="--&gt;"/>
   </xsl:character-map>
   <xsl:template match="/">
<a href="&start-comment;ddd&end-comment;" hreuf="&start-comment;ddd&end-comment;">
           &start-comment;dffffdd&end-comment;  </a>
   </xsl:template>
</xsl:stylesheet>

The hreuf attribute comes out as intended, the href attribute comes out as %EE%94%81ddd%EE%94%82.

Any ideas?


From: "tom tom" <tomxsllist(_at_)hotmail(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] SSI echo as an attribute value
Date: Thu, 14 Sep 2006 15:14:31 +0100

yes, <a href="&start-comment;fff&end-comment;"/> works! I thought I was taking a safer option by putting it in an xsl:attribute and stupidly didn't try it that way.

FYI when I put it in an xsl:attribute it comes out as:

<a href="%EE%94%81fff%EE%94%82">



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] SSI echo as an attribute value
Date: Thu, 14 Sep 2006 14:28:55 +0100

  <a>
  <xsl:attribute
name="href"><xsl:text>&start-comment;</xsl:text>fff<xsl:text>&end-comment;</xsl:text></xsl:attribute>
  </a>
  This doesn't work.

It should work I think, although I'd write it as

 <a href="&start-comment;fff&end-comment;"/>

Did you specify the character map in xsl:output?

David

--~------------------------------------------------------------------
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>
--~--


_________________________________________________________________
Download the new Windows Live Toolbar, including Desktop search! http://toolbar.live.com/?mkt=en-gb


--~------------------------------------------------------------------
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>
--~--


_________________________________________________________________
Windows Live? Messenger has arrived. Click here to download it for free! http://imagine-msn.com/messenger/launch80/?locale=en-gb


--~------------------------------------------------------------------
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>
--~--