|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: [XSL] read java variable from XSL
igutierrez027@xxxxxxxxxxxxx wrote:
Hi
> The only possibility is pass de variable to de XSL? What I
> need doing in this case? What toolbox or program I have to
> use?
If you need to pass values to the stylesheet from the wild outside
(for instance from Java code), the easiest is often to use stylesheet
parameters (look for xsl:param). If you are using JAXP (the standard
Java's API for XSLT transforms) you can have a look at:
javax.xml.transform.Transformer.setParameter(String,Object)
For instance, in XSLT:
<xsl:stylesheet ...>
<xsl:parma name="some-uri"/>
and in Java:
TransformerFactory factory = ...;
Transformer trans = factory.newTransformer(style);
trans.setParameter("some-uri", "http://actual-uri");
trans.transform(source, result);
Regards,
--drkm
_____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

![Re: [XSL] read java variable from XSL](/images/get_stylus.gif)




