> 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.