PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3200 *** shadow/3200 Tue Aug 21 05:19:10 2001 --- shadow/3200.tmp.2946 Tue Aug 21 05:19:10 2001 *************** *** 0 **** --- 1,79 ---- + +============================================================================+ + | function document() uses wrong base URI in XalanTransformer | + +----------------------------------------------------------------------------+ + | Bug #: 3200 Product: XalanC | + | Status: NEW Version: 1.2.x | + | Resolution: Platform: Other | + | Severity: Normal OS/Version: Other | + | Priority: Other Component: XalanC | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + /dir1/test.xml + -------------- + <?xml version="1.0"?> + <A> + </A> + + /dir1/include.xml + ----------------- + <?xml version="1.0"?> + <B> + </B> + + /dir1/test.xsl + --------- + <?xml version="1.0"?> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + <xsl:template match="/"> + <xsl:for-each select="document('include.xml',/)"> + <xsl:copy-of select="."/> + </xsl:for-each> + </xsl:template> + </xsl:stylesheet> + + + Using testXSLT: + /> testXSLT -IN dir1/test.xml -XSL dir1/test.xsl + results in + <?xml version="1.0" encoding="UTF-8"?> + <B> + </B> + + This is right as far as I know. + + Using TransformerAPI: + #include <util/PlatformUtils.hpp> + #include <Include/PlatformDefinitions.hpp> + #include <XalanTransformer/XalanTransformer.hpp> + + int main(int argc, char* argv[]) + { + XMLPlatformUtils::Initialize(); + XalanTransformer::initialize(); + + XalanTransformer theXalanTransformer; + + XSLTInputSource xmlIn(argv[1]); + XSLTInputSource xslIn(argv[2]); + XSLTResultTarget xmlOut(argv[3]); + int theResult = + theXalanTransformer.transform(xmlIn,xslIn,xmlOut); + + XalanTransformer::terminate(); + XMLPlatformUtils::Terminate(); + + return theResult; + } + + />a.out dir1/test.xml dir1/test.xsl out + results in: + <?xml version="1.0" encoding="UTF-8"?> + + *** This may be wrong ***
