[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: [XSL] read java variable from XSL

Subject: Re: [XSL] read java variable from XSL
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Thu, 21 Feb 2008 13:57:53 +0100 (CET)
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.