Custom JSP tags. Lets you apply the given XSL stylesheet to
the given XML data and rendering the output to your JSP page. You may set an XML data as
- a some string with XML data or
- an URL (or file name) points to XML data or
- a body for setXML tag
and XSL data you may set as
- a some string with XSL stylesheet or
- an URL (or file name) points to XSL stylesheet
- a body for setXSL tag
For example:
Tags are:
applyXSL
Body tag lets you apply the given XSL stylesheet to the given XML data and rendering the output to your JSP page. Parameters are:
1) xmlString Describes a string with XML data (see setXML tag also)
2) xslString Describes a string with XSL data (see setXSL tag also)
3) xmlData URL or file with XML data
4) xslData URL or file with XSL data
5) xmlCacheScope Optional parameter. You
may cache xmlData per users (session scope) or globally (application scope).
So possible values are session or application. Cache will be updated
according to date of modification for your XML file.
6) xslCacheScope Optional parameter. You
may cache xslData per users (session scope) or globally (application scope).
So possible values are session or application. Cache will be updated
according to date of modification for your XSL file.
7) id Optional parameter. Describes a name for page scope variable for output (type is
java.lang.String). Without this parameter tag just prints data.
8) ignoreDTD Optional parameter. Possible values are
true or false. Lets you ignore external DTD during the parsing.
Default value is false.
9) systemId Optional parameter. Describes a name systemId for your XSL data.
Must be a String that conforms to the URI syntax.
setXML
Body tag lets you set XML data. You can use this tag inside of applyXSL. Parameters are: none
setXSL
Body tag lets you set XSL data. You can use this tag inside of applyXSL. Parameters are:
1) systemId Optional parameter. Describes a name systemId for your XSL data. Must be a String that conforms to the URI syntax.
setParameter
Body tag lets you set a parameter for XSL stylesheet. Tag's body describes a value for parameter. You can use this tag inside of applyXSL. Parameters are:
1) name Describes a name for your parameter
Notes:
1. Taglib uses JAXP for parsing XML files
.
for downloading:
Library: xsltag.jar Description: taglib.tld
© Coldbeans Software Comments?
See also Coldtags suite - the largest collection of custom JSP tags.