How to pass value to XSLT stylesheet during run time?

Jan Matèrne

You have to use parameters.


XSL stylesheet
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="date">DEFAULT-DATE</xsl:param> ... Calling via Ant
<xslt in="${xml}" out="${out}" style="${xsl}"> <param name="date" expression="${DATE}"/> </xslt>
If you're using Java, then you can also use
javax.xml.transform.Transformer.setParameter(name, val);
to do the same.
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact