Subject: Re: RE: [xsl] How do you set the action attribute for an HTML form using XSLT? From: "Ricardo Castillo" <roadster9@xxxxxxxxx> Date: Wed, 02 Apr 2003 11:12:06 -0600 |
I apologize for confusing some of you. First, I should say that I'm using xalan.jar that includes: javax.xml.transform.* javax.xml.transform.stream.* The class I use include: Factory Class version: org.apache.xalan.processor.TransformerFactoryImpl Transformer Class version: org.apache.xalan.transformer.TransformerImpl I have a JSP that reads in xml and then converts the XML into a JSP. Here is the XSLT I am using: ================================= <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output omit-xml-declaration="yes" indent="yes" method="html" /> <xsl:template match="/"> <xsl:text disable-output-escaping="yes"><%@ page import="java.util.Date" %></xsl:text> <html> <head><title>Test</title></head> <body> <form method="get"> <xsl:attribute name="action" saxon:disable-output-escaping="yes" xmlns:saxon="http://icl.com/saxon"> <xsl:text><%=request.getRequestURI()%></xsl:text> </xsl:attribute> <xsl:text disable-output-escaping="yes"><%</xsl:text> Date d = new Date(); <xsl:text disable-output-escaping="yes">%></xsl:text> <input type="text" size="30"> <xsl:attribute name="value"> <xsl:text disable-output-escaping="yes"><%= d.toString() %></xsl:text> </xsl:attribute> </input> </form> <xsl:text disable-output-escaping="yes"><%= d.toString() %></xsl:text> </body> </html> </xsl:template> </xsl:stylesheet> ================================= The XML is really irrelevant for this example. And this is my output: ================================= <%@ page import="java.util.Date" %><html> <head> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Test</title> </head> <body> <form method="get" action="<%25=request.getRequestURI()%25>"><% Date d = new Date(); %><input size="30" type="text" value="<%= d.toString() %>"> </form><%= d.toString() %></body> </html> ================================= The action tag has a '25' between the % and = which makes the JSP uncompilable. I used the saxon reference since that is what the example at http://www.dpawson.co.uk/xsl/sect2/N1553.html#> d1670e229 used. Can I not make a reference to SAXON from an XSLT that is being used by a XALAN Transformer? Thanks, Ricardo Castillo roadster9@xxxxxxxxx _____________________________________________________________ Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year. http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] How do you set the action, Michael Kay | Thread | Re: [xsl] How do you set the action, David Carlisle |
Re: [xsl]pass a parameter from the , David Carlisle | Date | RE: [xsl]pass a parameter from the , David Petersen |
Month |