You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2003/06/24 16:34:26 UTC
DO NOT REPLY [Bug 21048] New: -
XSLTCSource is broken after DTM integration
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21048>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21048
XSLTCSource is broken after DTM integration
Summary: XSLTCSource is broken after DTM integration
Product: XalanJ2
Version: CurrentCVS
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Xalan-Xsltc
AssignedTo: mkwan@ca.ibm.com
ReportedBy: mkwan@ca.ibm.com
CC: xalan-dev@xml.apache.org
XSLTCSource is an XSLTC extension to the JAXP Source interface. It allows the
DOM/DTM to be built once then reused in another transformer.
XSLTCSource is broken after the DTM integration since Xalan 2.5.0. The problem
is that it always creates a new DTMManager to build the source, which is not
compatible with the requirement that all documents used in one transformation
should be built by the same DTMManager.
Because a DTM has internal references to its DTMManager, we cannot just use a
cached DTM in a new transformer without any changes. Fixing this problem
requires the DTM migration feature which migrates a DTM that is built with an
old DTMManager to a new DTMManager. This feature was already committed to the
CVS.
Because a DTM cannot be used concurrently by multiple threads, each thread
needs to have its own version of the cache DTM. For this reason, the cached
DTMs in XSLTCSource are saved in a ThreadLocal variable. It will only be
created once per thread when it is requested from the specific thread.
The usage syntax also needs to be slightly changed. You can create a
XSLTCSource from a systemId String or a Trax Source. The build() methods are
gone. There is no need to build it before using it. Building the DTM is handled
by the framework.
Here are the new public interfaces of XSLTCSource:
public XSLTCSource(String systemId);
public XSLTCSource(Source source);
public void setSystemId(String systemId);
public String getSystemId();