RE: [xsl] url encoding gets wrong with וצה?

Subject: RE: [xsl] url encoding gets wrong with וצה?
From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx>
Date: Thu, 08 Jun 2006 11:44:14 +0100
Niklas

If your output is XHTML then that's an XML output not an HTML one.

--

Joe


From: "Niklas Holmberg" <Niklas.Holmberg@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [xsl] url encoding gets wrong with evd?
Date: Thu, 8 Jun 2006 12:32:10 +0200


Thank you =) Worked great.


Thought i was done with my xsl by now but discovered another problem. I use output method="html" (since my output is to a xhtml file). &amp; is then put out as & in the html-file. I want to keep it as &amp; in the output too. If i use output xml instead &amp; is kept as &amp; like i want to but then all my EDVedv is being put out as "?".

html output:
<li><a href="http://gulasidorna.eniro.se/query?what=yp&search_word=Aff%E4rsluncher";>Aff&auml;rsluncher</a></li>


xml output:
<li><a href="http://gulasidorna.eniro.se/query?what=yp&amp;search_word=Aff%E4rsluncher";>Aff??rsluncher</a></li>



So my questions:
1. What is the point of using output html, what is the difference from using xml (other than that &amp; is put out as &).
2. Should i stick to output html and try to solve if from there os swich to xml and the try to solve why edv doesn't get put out right?


Thanks again!
/Niklas


Here's my code:


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns:javaUrlEncoder="java.net.URLEncoder" exclude-result-prefixes="javaUrlEncoder">
<xsl:output method="html" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<ul id="tagcloud">
<xsl:for-each select="root/row">
<xsl:sort select="word"/>
<li class="weight1"><a><xsl:attribute name="href">http://gulasidorna.eniro.se/query?what=yp&amp;search_word=<xsl:value-of select="javaUrlEncoder:encode(word, 'ISO-8859-1')"/></xsl:attribute><xsl:value-of select="word"/></a></li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>




-----Original Message-----
From: Joe Fawcett [mailto:joefawcett@xxxxxxxxxxx]
Sent: den 8 juni 2006 11:29
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] RE : RE: [xsl] url encoding gets wrong with evd?

Niklas

<xsl:stylesheet exclude-result-prefixes="javaUrlEncoder" ....

--

Joe




Confidentiality Notice: This e-mail transmission may contain confidential or legally privileged information that is intended only for the individual or entity named in the e-mail address. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or reliance upon the contents of this e-mail is strictly prohibited and may be unlawful. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete all copies of this message.

Current Thread