Re: Advanced Extension Element Question

[email protected]
Newsgroups gmane.text.xml.xalan.devel,gmane.text.xml.xalan.java.user
Message-ID <OFE46AEB6E.C5FB83D0-ON8525766D.00750394-8525766D.0075D8F5@lotus.com>
> Can anyone tell me if there's any way to add an object (not node or 
> tree fragment) variable to the variable stack from an extension element?

From an extension _element_... I don't think so.


From an extension _function_, yes. If the returned value is not an 
instanceof one of the types called out in the mapping table (
http://xml.apache.org/xalan-j/extensions.html#ext-functions), it will be 
returned as an object reference. Generally you can't do much with those 
except store them in variables and/or pass them as parameters to other 
extensions.

If your returned value *is* an instanceof one of those types... The best 
suggestion I can give you is to set up a wrapper object which does not 
implement those types, return the wrapper, and have whoever is using the 
value unwrap it again before accessing it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.