JDOM XSLT with parameters?

Discussion in 'XML' started by Son KwonNam, Jan 16, 2005.

  1. Son KwonNam

    Son KwonNam Guest

    Hi~
    I usually use JDOM for XML Processing.
    But, when I tried transforming XSL, I could not find the way to pass
    parameters to XSLT Processor.
    "parameters" which are defined in XSL document.
    ( <xsl:param name="blah.."/> )

    Is it possible to use JDOM XSL Transform with parameters?

    Thanks,
    KwonNam.
     
    Son KwonNam, Jan 16, 2005
    #1
    1. Advertising

  2. Son KwonNam wrote:


    > I usually use JDOM for XML Processing.
    > But, when I tried transforming XSL, I could not find the way to pass
    > parameters to XSLT Processor.
    > "parameters" which are defined in XSL document.
    > ( <xsl:param name="blah.."/> )
    >
    > Is it possible to use JDOM XSL Transform with parameters?


    I haven't used JDOM but looking at the API I think you need to use a
    JAXP TrAX Transformer and pass a JDOMSource in e.g.

    javax.xml.transform.Transformer xsltProcessor;

    JDOMSource xsltInput = new JDOMSource(jdomDocument);
    xsltProcessor.setParameter("blah", "Kibology");

    xsltProcessor.transform(xsltInput, suitableOutputhere);



    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jan 16, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wendy S
    Replies:
    1
    Views:
    6,462
    Darren Davison
    Aug 5, 2003
  2. Collin VanDyck
    Replies:
    3
    Views:
    416
    Collin VanDyck
    Oct 27, 2003
  3. Bernd Oninger
    Replies:
    4
    Views:
    12,703
    GIMME
    Jun 21, 2004
  4. Tinker
    Replies:
    4
    Views:
    5,441
    Harry Bosch
    Oct 9, 2005
  5. Bernd Oninger
    Replies:
    3
    Views:
    2,926
    GIMME
    Jun 21, 2004
Loading...

Share This Page