Re: [xslt] Testing if parameters exist



On Tue, Feb 24, 2004 at 07:57:51AM +0000, Xyster ! wrote:
> I imagine this idea might be a little bit heretical but I'm using xsltproc 
> and was wondering if is there a way to test if a stylesheet parameter or 
> variable is defined/exists without xsltproc erroring out trying to evaluate 
> it?
> 
> This may initially sound like a silly idea since all parameters would 
> appear to be always well defined at stylesheet 'write-time'. However, if 
> parameters are dynamically evaluated based on the input document (think 
> dyn:evaluate(concat('$', $varname)) ), then in this is not the case anymore.
> Being able to evaluate the existence of parameters without causing an error 
> would be useful in this situation by providing a mechanism for backwards 
> compatibility of input documents with older stylesheets.

  That sounds like a request for enhancement. Can you bugzilla this ?

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
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]