sboag 01/06/19 14:38:04
Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
Log:
Set the base URL of the source. If the systemID is not set in the
Source object, try and use the URL of the stylesheet. If that is
null also, use the user.dir property. Part of the fop codegen
fix.
Revision Changes Path
1.101 +17 -0
xml-xalan/java/src/org/apache/xalan/transformer/TransformerImpl.java
Index: TransformerImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/TransformerImpl.java,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- TransformerImpl.java 2001/06/18 21:42:54 1.100
+++ TransformerImpl.java 2001/06/19 21:38:03 1.101
@@ -564,6 +564,23 @@
try
{
+ String base = source.getSystemId();
+
+ // If no systemID of the source, use the base of the stylesheet.
+ if(null == base)
+ {
+ base = m_stylesheetRoot.getBaseIdentifier();
+ }
+
+ // As a last resort, use the current user dir.
+ if(null == base)
+ {
+ String currentDir = System.getProperty("user.dir");
+
+ base = "file:///" + currentDir + java.io.File.separatorChar
+ + source.getClass().getName();
+ }
+ setBaseURLOfSource(base);
DTMManager mgr = m_xcontext.getDTMManager();
DTM dtm = mgr.getDTM(source, false, this, true, true);
boolean hardDelete = true; // %REVIEW% I have to think about this. -sb
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]