sboag 01/06/19 14:41:51
Modified: java/src/org/apache/xalan/lib Redirect.java
Log:
Pass the extension element as the prefix resolve, instead of whatever
is pushed on the XPathContext stack. The Variable hack needs this
to work correctly.
Comment out patch that makes the filename relative to the current
output URL. Just to make fop codegen work. This will need to
be commented back in, once we can get fop to change their
stylesheets.
Revision Changes Path
1.14 +8 -6 xml-xalan/java/src/org/apache/xalan/lib/Redirect.java
Index: Redirect.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/lib/Redirect.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Redirect.java 2001/06/12 19:14:36 1.13
+++ Redirect.java 2001/06/19 21:41:50 1.14
@@ -288,7 +288,7 @@
org.apache.xpath.XPathContext xctxt
= context.getTransformer().getXPathContext();
XPath myxpath = new XPath(fileNameExpr, elem,
xctxt.getNamespaceContext(), XPath.SELECT);
- XObject xobj = myxpath.execute(xctxt, context.getContextNode(),
xctxt.getNamespaceContext());
+ XObject xobj = myxpath.execute(xctxt, context.getContextNode(), elem);
fileName = xobj.str();
if((null == fileName) || (fileName.length() == 0))
{
@@ -367,11 +367,12 @@
// TransformerImpl.setOutputTarget() to set the desired Result base.
// String base = urlToFileName(elem.getStylesheet().getSystemId());
- Result outputTarget = transformer.getOutputTarget();
- if ( (null != outputTarget) && ((base = outputTarget.getSystemId()) !=
null) ) {
- base = urlToFileName(base);
- }
- else
+ // %REVIEW% This breaks FOP codegen. -sb
+// Result outputTarget = transformer.getOutputTarget();
+// if ( (null != outputTarget) && ((base = outputTarget.getSystemId())
!= null) ) {
+// base = urlToFileName(base);
+// }
+// else
{
base = urlToFileName(transformer.getBaseURLOfSource());
}
@@ -381,6 +382,7 @@
File baseFile = new File(base);
file = new File(baseFile.getParent(), fileName);
}
+ // System.out.println("file is: "+file.toString());
}
if(mkdirs)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]