An old text, turned out and reviewed it. BTW, protesting 9CBS classification, how can XML be attributed to .NET! !
Sender: HAX (Hai Yan), News District: WebDevelop
Title: Compile time label (XSLT pre-processes for JSP)
Sending station: Drinking water Source (February 12, 2002 00:10:32 Tuesday), station letter
Compile time label (XSLT pre-processes for JSP)
Original: http://www.mail-archive.com/taglibs-dev@jakarta.apache.org/msg00390.html
From: James Strachan
Subject: [OT]: Compile Time Tags. (XSLT Preprocessing Of JSP)
Date: WED, 21 Mar 2001 12:20:55 -0800
Translation: Hax at Sjtu Dot Edu Dot CN
Here is the idea that I have fallen about the separation here ...
I like JSP and custom labels, let us put complex performance (Presentation) and
Business logic abstract, hidden to the XML tag. I also like fast JSP development.
Ring - Edit a JSP, press Reload in the browser, Ula!
I noticed some replacement of JSP tags using XSLT. For example Cocoon
XTP of XSP and RESIN.
http://xml.apache.org/cocoon/xsp.html
http://www.caucho.com/articles/xtp_templates.xtp
It makes me amazed, adding to our tools to our tools while using standard JSP
What will the "compile time" tag of the SLT?
What is necessary? The answer is: We only need to use JSP in XML format, and in our
The servlet engine is trying to run them, apply our XSLT document to these JSPs.
XSLT can prepare a specific XML tag to complete simple format conversion or join dynamic code
. These tags give namespaces like a general JSP custom label. Have a compilation
Translate tag, after we can do more ...
----
achieve:
If the servlet engine is not fully supported (JSP) XML format (I have tried many engines
So this), then we can always use the XSLT pre-processing process to put JSP XML format
Convert to standard <% =%> format.
Today we can immediately realize XSLT pretreatment, just in using our web application
Before, build (BULID) all JSP files with Ant Build System.
However, this interrupted our wonderful "editing JSP and then Reload" development environment. Instant
With that we can integrate the XSLT 'pretreatment' stage into our JSP compiler, that will
It is very Cool.
(This section is an example in Tomcat / Jasper, translated)
... I have been roughly seen Jasper's source code, it looks to it to join some pretreatment
The configuration of the device is not too difficult. (Of course, if you have Web Deployment in the JSP standard
Descriptor's entry (entry) for XSLT pre-processing, which will be better ;-))
----
example:
Compile time tags can only use compile time variables, although it can output JSP small scripts
(Scriptlet) expression. For example, here is an example of a normal HTML form in a JSP fragment.