This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Sending data from Java to XSL
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: Sending data from Java to XSL
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Thu, 21 Sep 2000 12:52:03 +0100
- Reply-To: xsl-list at mulberrytech dot com
> I have a "simple" question (although it doesn't seem to be that
> simple to me at all). I have some Java code which produces an array
> of data which I want to use in an XSL. To be precise, the Java class
> returns the names of the months in German (could be anything similar
> to that, though). How would I pass that into the XSL?
Depends rather on the processor you are using: the way you pass parameters
in varies from one product to another. Probably most will allow you to
supply a node-set or result-tree-fragment as a parameter in some way. But
this seems a complicated way of doing it, why not have the names of the
months in German in a separate XML file, and read it using the document()
function?
Another approach is to wrap your Java class in an external function that
supports the method "monthName(n)" to get the name of the n'th month, and
then call this function from an XPath expression.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list