xsl-list
[Top] [All Lists]

RE: How do you set the action attribute for an HTML form using XSLT?

2003-04-01 05:38:26
I can't reproduce this. Using Saxon 6.5.2, and the template:

<form>
<xsl:attribute name="action" saxon:disable-output-escaping="yes"
xmlns:saxon="http://icl.com/saxon";>
  <xsl:text>&lt;&#37;&#61;request.getRequestURI()&#37;&gt;</xsl:text>
</xsl:attribute>
</form>

with the HTML output method generates

<form action="<%=request.getRequestURI()%>"></form>

What release are you using? (use the -t option to find out)

I can't see how you got a %25 in the output. Firstly,
saxon:disable-output-escaping prevents URI escaping as well as XML
escaping. Secondly, even when URI escaping happens, Saxon never escapes
% characters - only non-ASCII characters, as dictated by the spec.

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
Ricardo Castillo
Sent: 31 March 2003 23:48
To: XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] How do you set the action attribute for an 
HTML form using XSLT?


Hi.  I'm trying to transform XML into an HTML/JSP page.
I've followed the suggestion at 
http://www.dpawson.co.uk/xsl/sect2/N1553.html#> d1670e229


using:

<xsl:attribute name="action" 
saxon:disable-output-escaping="yes" 
xmlns:saxon="http://icl.com/saxon";>
  <xsl:text>&lt;&#37;&#61;request.getRequestURI()&#37;&gt;</xsl:text>
</xsl:attribute>

and have tried mine:

<xsl:attribute name="action">
  <xsl:text 
disable-output-escaping="yes">&lt;&#37;&#61;request.getRequest
URI()&#37;&gt;</xsl:text>
</xsl:attribute>

but neither seem to work for the action attribute of the
HTML form tag.  My way and the suggestion seem to work fine 
with say the input tag.  I've tried all sorts of variations, 
but I just can't get it to work.

This is what I get:

  <form method="get" action="<%25=request.getRequestURI()%25>">

And of course I'd like:

  <form method="get" action="<%=request.getRequestURI()%>">

What am I missing or is this truely a bug?

Thanks,

Ricardo J. Castillo
roadster9(_at_)lycos(_dot_)com




_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for 
$19.95/year. 
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lm
tplus

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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