xsl-list
[Top] [All Lists]

RE: Accents problems in "action" attribute of a <fORM> element

2004-06-18 04:26:58
XSLT 1.0 requires, for the HTML output methods, that URI-valued attributes
should be escaped using the %HH notation. "URI-valued" attributes here means
attributes defined in the HTML spec as taking a URI, which includes
form/@action. The reason for this is that the HTML spec requires such
escaping.

Unfortunately browsers don't always take kindly to the escaping, especially
when the URI is interpreted on the browser (e.g. a javascript URI, or the
fragment identifier of an ordinary a/@href. 

XSLT 2.0 allows you to suppress this escaping, and Saxon has an extension
attribute on xsl:output to prevent it with XSLT 1.0.

Michael Kay 

-----Original Message-----
From: Ricaud Matthieu [mailto:matthieu(_dot_)ricaud(_at_)cned(_dot_)fr] 
Sent: 18 June 2004 11:11
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Accents problems in "action" attribute of a 
<fORM> element

Hi !

I'd like to work in english, so that i don't have accent 
probems anymore !!

I'm working with MSXML parser and make the transfomation job 
XML+XSL==>HTML
with ASP/DOM

My XML starts with <?xml version="1.0" encoding="UTF-8"?>
It contains an  <TRUC cible="ohe"> element.

While matching TRUC in an xsl template, i notice that accent problems
depends on the HTML element in which I put the XML datas.
If I do : <form action={(_at_)cible}> then I get after 
transformation :  <form
action="oh%C3%A9"/>
If I do exactly the same but with another attribute name 
(which is not HTML
but anyway...) :
<form actionABCD={(_at_)cible}> then I get after transformation :  <form
action="ohe"/>

Is there some solutions, or something I missed ?

For information :

My XSL starts with  :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html" encoding="ISO-8859-1"/>

(the problem is the same without the <xsl:output> element)

My ASP page makes the tranformation using Response.write
objXML.transformNode(objXSL) (where objXML, and objXSL are 
the loaded files
of my xml and my xsl files)
I put :
Response.charset = "ISO-8859-1"
Response.contentType = "text/html"
at the beginning of the file but It doesn't seems to change anything.


Hope you can help me, thanks in advance,

Matthieu.




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





<Prev in Thread] Current Thread [Next in Thread>