cziegeler 01/10/23 04:10:02
Modified: . build.xml
src/org/apache/cocoon/serialization SVGSerializer.java
Log:
Fixed svg image generation when used as webapp
Revision Changes Path
1.85 +3 -0 xml-cocoon2/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/build.xml,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- build.xml 2001/10/23 10:16:02 1.84
+++ build.xml 2001/10/23 11:10:02 1.85
@@ -575,6 +575,9 @@
</fileset>
</copy>
+ <!-- correct the image references -->
+ <replace dir="${build.war}/documentation/svg" token="context://images"
value="context://documentation/images"/>
+
<!-- copy i18n sample webapp-->
<copy todir="${build.war}/i18n" filtering="off">
<fileset dir="${webapp.dir}/i18n">
1.6 +11 -2
xml-cocoon2/src/org/apache/cocoon/serialization/SVGSerializer.java
Index: SVGSerializer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/org/apache/cocoon/serialization/SVGSerializer.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SVGSerializer.java 2001/10/11 07:28:23 1.5
+++ SVGSerializer.java 2001/10/23 11:10:02 1.6
@@ -18,11 +18,14 @@
import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.TranscoderOutput;
import org.apache.batik.transcoder.TranscodingHints;
+import org.apache.batik.util.ParsedURL;
import org.apache.cocoon.caching.CacheValidity;
import org.apache.cocoon.caching.Cacheable;
import org.apache.cocoon.caching.NOPCacheValidity;
import org.apache.cocoon.components.transcoder.ExtendableTranscoderFactory;
import org.apache.cocoon.components.transcoder.TranscoderFactory;
+import org.apache.cocoon.components.url.ParsedContextURLProtocolHandler;
+import org.apache.cocoon.components.url.ParsedResourceURLProtocolHandler;
import org.apache.cocoon.environment.Environment;
import org.apache.cocoon.util.ClassUtils;
import org.apache.cocoon.xml.XMLConsumer;
@@ -41,10 +44,16 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Ross Burton</a>
- * @version CVS $Revision: 1.5 $ $Date: 2001/10/11 07:28:23 $
+ * @version CVS $Revision: 1.6 $ $Date: 2001/10/23 11:10:02 $
*/
public class SVGSerializer extends SVGBuilder
- implements Composable, Serializer, Configurable, Poolable, Cacheable {
+implements Composable, Serializer, Configurable, Poolable, Cacheable {
+
+ // add cocoon specific protocols
+ static {
+ ParsedURL.registerHandler(new ParsedContextURLProtocolHandler());
+ ParsedURL.registerHandler(new ParsedResourceURLProtocolHandler());
+ }
/** The <code>ContentHandler</code> receiving SAX events. */
private ContentHandler contentHandler=null;
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]