Whole document tree
    

Whole document tree

FAQ
Gnome LogoRed Hat Logo

The XSLT C library for Gnome

FAQ

Main Menu
API Indexes
Related links
  1. passing parameters on the xsltproc command line doesn't work

    xsltproc --param test alpha foo.xsl foo.xml

    the param does not get passed and ends up as ""

    In a nutshell do a double escaping at the shell prompt:

    xsltproc --param test "'alpha'" foo.xsl foo.xml

    i.e. the string value is surrounded by " and ' then terminated by ' and ". Libxslt interpret the parameter values as XPath expressions, so the string ->alpha<- is intepreted as the node set matching this string. You really want ->'alpha'<- to be passed to the processor. And to allow this you need to escape the quotes at the shell level using ->"'alpha'"<- .

    or use

    xsltproc --stringparam test alpha foo.xsl foo.xml

Daniel Veillard