Send a parameter to XSL
1 posts in topic
Flat View  Flat View

Posted By:   Damic_Orion
Posted On:   Monday, January 21, 2002 07:28 AM


Does anyone know how to set a variable/parameter in XSL that's send from a form? So basically, I fill in a form and I want to use it as a condition "Exception[MessageID=$mID]".

Dunno, maybe it's impossible, maybe it's because I'm a noobie :)

Thanx in advance!

Greetz, D.O.

Re: Send a parameter to XSL

Posted By:   Shane_Curcuru  
Posted On:   Wednesday, January 23, 2002 11:54 AM

Sounds like you might want to start with a generic XSL tutorial. But some basics:

(using JAXP/TRaX, supported by some Saxon versions and Xalan-J 2.x)

transformer = factory.newTransformer(new StreamSource("stylesheet.xsl");
transformer.setParameter("param1", "new value");
transformer.transform(xmlSource, result);

////////// stylesheet.xsl
// blah blah blah

default value

// blah blah blah

About | Sitemap | Contact