The XSL custom tag library contains an working examples of the tags described in the JavaServerPages specification, Version 1.1. As such, the tags are focused more on being examples of custom tag library code techniques, and less on being useful in production applications.
With this custom tag library you can process a XML document with a XSL stylesheet and insert it in place.
The binary distributions of the packages :
this can be found at http://xml.apache.org/dist
, we recommend
that you use the version of the Xerces library that comes with the Xalan
binary distribution
Follow these steps to configure your web application with this tag library:
xsl/xsl.tld
) to the /WEB-INF
subdirectory of your web application.
xsl/xsl.jar
) to the /WEB-INF/lib
subdirectory of your web application.
xerces.jar
and xalan.jar
to the /WEB-INF/lib
directory of your web application.
<taglib>
element to your web application deployment
descriptor in /WEB-INF/web.xml
like this:
<taglib> <taglib-uri>http://jakarta.apache.org/taglibs/xsl-1.0</taglib-uri> <taglib-location>/WEB-INF/xsl.tld</taglib-location> </taglib>
To use the tags from this library in your JSP pages, add the following directive at the top of each page:
<%@ taglib uri="http://jakarta.apache.org/taglibs/xsl-1.0" prefix="x" %>where "x" is the tag name prefix you wish to use for tags from this library. You can change this value to any prefix you like.
This custom tag library includes several tags, with the following characteristics:
This tag inserts a XML document previously transformed by a XSL stylesheet into the output of the current page.
Attribute | Description | Required |
---|---|---|
url | The URL of XML document to be inserted in place | Yes |
xsl | The URL of XSL formatting stylesheet aplied to the XML document before inserting | Yes |
This tag flush the output buffers of the page, this is an utility tag. This not have any attributes
This tag clears the output buffers of the page, this is an utility tag. This not have any attributes
xsl/xsl-examples.war
) for examples of
the usage of the tags from this custom tag library.