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

Re: RE: How do you set the action attribute for an HTM

Subject: Re: RE: 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
ricardo castillo
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">&lt;&#37;&#64; page import="java.util.Date" &#37;&gt;</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>&lt;&#37;&#61;request.getRequestURI()&#37;&gt;</xsl:text>
    </xsl:attribute>

<xsl:text disable-output-escaping="yes">&lt;&#37;</xsl:text>
   Date d = new Date();
<xsl:text disable-output-escaping="yes">&#37;&gt;</xsl:text>

         <input type="text" size="30">

            <xsl:attribute name="value">
              <xsl:text disable-output-escaping="yes">&lt;&#37;&#61; 
d.toString() &#37;&gt;</xsl:text>
            </xsl:attribute>

         </input>
      </form>

      <xsl:text disable-output-escaping="yes">&lt;&#37;&#61; d.toString() &#37;&gt;</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

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.