Re: [xslt] Structured parameters how to



Hi Daniel,

Daniel Veillard wrote:

> the values are evaluated as XPath expressions in the context of the root
> of the target document, exactly like the global variables or parameter
> values. 

Yes, that's what I have noticed (I have been quite surprised at the 
begining but I reckon it has some advantages!).

> So the values can be nodesets, but the current API doesn't allow
> to directly pass a subtree. If you use "document()" in the expression it
> should be possible to load a node-set dynamically when the parameter is
> evaluated.

Don't you need to save it on file first? I would prefer to work in memory.

>   I hope this will be sufficient, otherwise it might be possible to
> add that functionality, but it would require an API extension I'm afraid.

For the application I am working on, yes it will be (I have ended up 
passing the structured content as a string and "parsing" it in a named 
template... not the most beautiful solution, but that works). However, 
passing substrees is very powerfull and this might be a useful extension 
to consider for a future version.

Thanks

Eric

> Daniel
> 
-- 
See you in Paris.
                      http://www.afnet.fr/afnet/net200x/programme.html#T9
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------




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