xsl-list
[Top] [All Lists]

Re: [xsl] [XSL] read java variable from XSL

2008-02-21 05:59:31
igutierrez027(_at_)ikasle(_dot_)ehu(_dot_)es 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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>