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

<% ... %> and html output method

Subject: <% ... %> and html output method
From: Mark Hayes <mark@xxxxxxxxxxx>
Date: Tue, 23 Nov 1999 09:22:05 -0800
xslt request getparameter
Hi,

When I use XSLT with the html output method, often I'm actually producing
JSP files.  In the currently shipping versions of JSP, the JSP file cannot
be a valid XML document because the use of <%, <%= and %> in JSP files
really is necessary for directives as well as script snippets.  The
alternatives (I can think of) for outputting the <%= ... %> sections are
below.  If anyone has used the XT tag extension mechanism, please let me
know if you think that option might work.

If the desired output document should contain:

	<h1> <%= request.getParameter("title") %> </h1>

1- In the stylesheet I can use <xsl:text> with disable-output-escaping as
shown below.  Obviously, this is very verbose and I'd like to avoid it.

	<h1>
	<xsl:text disable-output-escaping='yes'> &lt;%= </xsl:text>
	request.getParameter("title")
	<xsl:text disable-output-escaping='yes'> %&gt; </xsl:text>
	</h1>

2- I could hope that the html output method will eventually support
<%=>...</%=> in the stylesheet and do the right thing with the output.  See
below.  In the meantime, I could hack XT (which I'm using) to try to make
this work -- this would probably be difficult since % is not valid in an
element name.  It seems likely that this would become nothing more than my
own proprietary syntax, which I would also like to avoid.

	<h1> <%=> request.getParameter("title") </%=> </h1>

3- I could try using the extension tag mechanism to create tags that would
be used as below and expanded by my XT hacks into the desired output.  I
haven't looked at XT to see how difficult this would be.  It would be my own
proprietary syntax, but at least I would have a chance of making it work in
other XSLT processors in the future.

	<h1> <my:write> request.getParameter("title") </my:write> </h1>

I'm tending toward trying 3 at the moment.  Or perhaps I could combine 2 and
3 -- use the tag extension to add the <%=> tag.  Any thoughts?

thanks,
mark


 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.