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

tag extension to get XSL formatting inside JSP pages?

Subject: tag extension to get XSL formatting inside JSP pages?
From: "miles thompson" <miles@xxxxxxxx>
Date: Wed, 29 Mar 2000 12:13:32 +1200
tag extension
Hiya, 

I dont know much about how XSL/Saxon works so I
wonder if  this is even possible ?

problem: 

 - we are gonna be using JSP's for general site pages.
 - I'd like to incorporate XSL/XML as a way to format 
    certain little pieces of specialised "content" into  HTML chunks
   (  which will be placed inside the page at appropriate places )

question:
  
 - whats a good way to integrate these two approaches? Has
   anybody had experience with this ?

 possible answer:

 I was thinking along the lines of extending SAXON
 by defining a JSP tag extension that reads in the XSL
from the page, grabs the XML from some external source
and outputs the formatted HTML back where the tag extension
was...

That is, sortof  like the following...

  welcome.jsp:

<%@ page import="com.icl.saxon.*" %><%@ page errorPage="error.jsp" %>
<%
  //...  various bits of database connection / datagrabbing etc etc..
%>
<HTML>
<HEAD>
</HEAD>
<BODY>

<SPECIAL_JSP_TAGEXTENSION xmlsource="<% choose a file source here..%>
<xls:template match="myFrag">
    ... xsl transformation conversion stuff.. yadda yadda yadda
</xsl:template>
</SPECIAL_JSP_TAGEXTENSION>

<% do some other stuff %>
<other html>
<SPECIAL_JSP_TAGEXTENSION xmlsource="<% choose a different source .%>
 .. another fragment... 
</SPECIAL_JSP_TAGEXTENSION>

</BODY>
</HTML>

---

So. The question is.. Is this even possible or am I missing some basic
understanding ?

And if it is possible..  
 - Has anyone done something like this already?
 - Any guesses on how this approach might work performance-wize?

It would be really cool, because then we could have the JSP page contain
just the XSL, and <%%> scripting stuff that is wanted for presentation
and have the business logic inside our java beans.

 Thanks heaps in advance for any suggestions ..
 
---

Miles Thompson
miles@xxxxxxxxxxxxxxxx


 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.