[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

Subject: RE: Accents problems in "action" attribute of a <fORM> element
From: "Ricaud Matthieu" <matthieu.ricaud@xxxxxxx>
Date: Fri, 18 Jun 2004 14:26:08 +0200
form action attribute
The url i want the form to be posted to contains a querystring:
validForm.asp?titre=ohé

actually my xml contains : <TRUC cible=validForm.asp?titre=ohé>
I don't really want to separate titre=ohé from validForm.asp in the XML,
it's better if it's a single attribute.

If I make a onclik attibute on a <p> element in the template :
<p>
<xsl:attribute name="onclick">window.location='<xsl:value-of
select="@cibleHaut"/></xsl:attribute>
</p>


Then it work fine, the accents stays et the page is open (validForm.asp
doesn't compulsary need datas from the form==> it's contains a : if
request.form="" then do nothing)
the url of the page is then really
manythings/validForm.asp?titre=ohé

If this page can be displayed even if it contains accents in the url
(althought it's not allowed in the HTML spec, my browser  might be too
permissive ?)
The problem is then only to generate the good HTML form page with
<form action=validForm.asp?titre=ohé> instead of <form
action="validForm.asp?titre=oh%C3%A9"/>
from my XML/XSL and ASP transformation...

Ok i've just seen Mickael's mail... so i undersand, the XSL processor
prevent me from puting accents in "URI-valued attributes" so long as I
declare <xsl:output method="html"/>, it's just so. I'll try another way of
doing the stuff (putting  the accented datas in the form by using
string-functions to separate it from the rest of the cible attribute).

Thanks for your help, really complete and clear !

Matt

--------------------
Well if you are using output method of HTML (or your document element is
"HTML" then URL's should be escaped as per HTML spec. I believe that URL's
do not allow accented characters because they are non ASCII.

--

Joe

> 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={@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={@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@xxxxxxxxxxxxxxxxxxxxxx>
--+--


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.