Re: [xslt] xsltproc --param



On Wed, Oct 03, 2001 at 09:41:24PM -0700, Daniel Allen wrote:
> If it is obvious, I came over from using sablotron
> looking for exslt, so I am trying to make my previous
> use of xslt compatible with libxslt.
> 
> Sablotron has a pretty sweet interface for passing in
> params from the command line.  The problem with
> xsltproc is with quotes.  If I was in
> 
> --param foo "'here is a quot \". '"
> 
> it prints 
> 
> here is a quot ". 

  And I don't see the problem. Looks like exactly what you asked for !

> as the output...and it is not even possible to get
> single quotes in there...is there anyway to implement

  --param foo '"here is a single quote \'. "'

> was sablotron has, where the params are passed as
> 
> \$foo="here's what I like \" about sablotron"

  I don't see the improvement. Explain

> which becomes
> 
> here's what I like " about sablotron
> 
> Also, they have the ability to pass in nodesets from
> the command line...is that possible with libxslt. 

  --param foo bar

 foo will be bound to the bar nodeset. The command line interface is 
completely compatible with XPath expressions.

  --param foo 1

 will be the number 1 not string "1"

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]