aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/events
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2008-07-12 12:19:40 +0000
committerJeremias Maerki <jeremias@apache.org>2008-07-12 12:19:40 +0000
commitd98eb3e8a5612dd77b12613e5245da9d3461a750 (patch)
treefe876ff33670860e5cde82692c30438eecef44b1 /src/java/org/apache/fop/events
parentba050723cc11f34a4426012380848fec1f48d22c (diff)
downloadxmlgraphics-fop-d98eb3e8a5612dd77b12613e5245da9d3461a750.tar.gz
xmlgraphics-fop-d98eb3e8a5612dd77b12613e5245da9d3461a750.zip
Attempt to fix a potential build problem.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@676161 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/events')
-rw-r--r--src/java/org/apache/fop/events/model/EventModel.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/java/org/apache/fop/events/model/EventModel.java b/src/java/org/apache/fop/events/model/EventModel.java
index 61e221b3b..54c58bd4b 100644
--- a/src/java/org/apache/fop/events/model/EventModel.java
+++ b/src/java/org/apache/fop/events/model/EventModel.java
@@ -46,15 +46,15 @@ import org.apache.xmlgraphics.util.XMLizable;
public class EventModel implements Serializable, XMLizable {
private static final long serialVersionUID = 7468592614934605082L;
-
+
private Map producers = new java.util.LinkedHashMap();
-
+
/**
* Creates a new, empty event model
*/
public EventModel() {
}
-
+
/**
* Adds the model of an event producer to the event model.
* @param producer the event producer model
@@ -62,7 +62,7 @@ public class EventModel implements Serializable, XMLizable {
public void addProducer(EventProducerModel producer) {
this.producers.put(producer.getInterfaceName(), producer);
}
-
+
/**
* Returns an iterator over the contained event producer models.
* @return an iterator (Iterator&lt;EventProducerModel&gt;)
@@ -79,7 +79,7 @@ public class EventModel implements Serializable, XMLizable {
public EventProducerModel getProducer(String interfaceName) {
return (EventProducerModel)this.producers.get(interfaceName);
}
-
+
/**
* Returns the model of an event producer with the given interface.
* @param clazz the interface of the event producer
@@ -88,7 +88,7 @@ public class EventModel implements Serializable, XMLizable {
public EventProducerModel getProducer(Class clazz) {
return getProducer(clazz.getName());
}
-
+
/** {@inheritDoc} */
public void toSAX(ContentHandler handler) throws SAXException {
AttributesImpl atts = new AttributesImpl();
@@ -102,8 +102,9 @@ public class EventModel implements Serializable, XMLizable {
}
private void writeXMLizable(XMLizable object, File outputFile) throws IOException {
- Result res = new StreamResult(outputFile);
-
+ //Result res = new StreamResult(outputFile); //Does not seem to work in all environments
+ Result res = new StreamResult(outputFile.toURI().toURL().toExternalForm());
+
try {
SAXTransformerFactory tFactory
= (SAXTransformerFactory)SAXTransformerFactory.newInstance();