sboag 00/12/07 00:16:59
Modified: java/src/org/apache/xalan/processor ProcessorOutputElem.java
Log:
Resolve xalan:entities attribute value to absolute URL.
Revision Changes Path
1.10 +21 -0
xml-xalan/java/src/org/apache/xalan/processor/ProcessorOutputElem.java
Index: ProcessorOutputElem.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorOutputElem.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ProcessorOutputElem.java 2000/12/06 05:29:53 1.9
+++ ProcessorOutputElem.java 2000/12/07 08:16:56 1.10
@@ -66,6 +66,7 @@
import org.apache.xalan.templates.ElemTemplateElement;
import org.apache.xml.utils.QName;
+import org.apache.xml.utils.SystemIDResolver;
import javax.xml.transform.TransformerException;
@@ -232,6 +233,26 @@
m_outputProperties.setDOMBackPointer(handler.getOriginatingNode());
m_outputProperties.setLocaterInfo(handler.getLocator());
setPropertiesFromAttributes(handler, rawName, attributes, this);
+
+ // Access this only from the Hashtable level... we don't want to
+ // get default properties.
+ String entitiesFileName =
+ (String)
m_outputProperties.getProperties().get(OutputProperties.S_KEY_ENTITIES);
+
+ if (null != entitiesFileName)
+ {
+ try
+ {
+ String absURL = SystemIDResolver.getAbsoluteURI(entitiesFileName,
+ handler.getBaseIdentifier());
+
m_outputProperties.getProperties().put(OutputProperties.S_KEY_ENTITIES, absURL);
+ }
+ catch(TransformerException te)
+ {
+ handler.error(te.getMessage(), te);
+ }
+ }
+
handler.getStylesheet().setOutput(m_outputProperties);
ElemTemplateElement parent = handler.getElemTemplateElement();