You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Didier VILLEVALOIS <dv...@techmetrix.net> on 2000/05/24 12:12:08 UTC
Xalan context support... (Question bundle :-)
Hi,
I'm trying to compile XSL stylesheets to Java with some XSL stylesheets. I
don't yet want to manage XPath expressions. So i have LOTS of QUESTIONS.
So i'd like to plug my generated Java code to Xalan processor. I need:
- a path context to manage current selected node set, environnement
variables and namespaces.
- an output context to manage output documents.
Here is what i understood from Xalan against my need:
1) I must instanciate a XSLTEngineImpl. Let's call it 'engine'.
2) With engine.getExecContext() i get the XPathSupport object which manage
path context. (BUT engine is itself an XPathSupport)
3) With new XPathProcessorImpl(processor.getXMLProcessorLiaison()) i get the
an XPath parser that creates XPath objects from a string. I may then execute
it with the context retrieved before.
4) To output i call the SAX methods of the DocumentHandler retrieved with
engine.getFormatterListener().
Can you tell me what are the initialisation of engine i must take care in
order that it's in an appropriate state (root input node, ouput document...)
?
Can you tell me from where does come the engine.getVarStack() used in
ElemVariable class? I can't find it in the docs.
What is the equivalent of getVarStack() for namespace stack? And why the
need of a PrefixResolver in the execute methods if there is a such namespace
stack ?
How can i know what namespaces have allready been added to output ?
I'm not sure which push/pop methods to use in XPathSupport!!
How may i pop lots of variables in one time ? Do you manage named scopes so
that i may pop multipe scopes in one pop(name) call ?
Are all these stuff are stable ? Or do you have a better interface that i
should plug on ?
I hope you can help me. Thanks for those that read up to here.
Didier.