cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lincoln" <>
Subject How do I do a catalog (SVG > SVG via xslt)
Date Fri, 04 Aug 2006 08:42:50 GMT
A year ago I posted "SVG > SVG via xslt" however
one part of the solution involved...
"It seems to me like the problem is Cocoon (or the parser specifically) is
actually trying to fetch the DTD from the Web, which obviously takes some
time. Cocoon has a mechanism for this situation called "catalogs" that
allows you to map DTD URIs to local files so they're always quickly
accessible. See"

Jason Johnston

... now, I don't think I ever got to do this bit or just can't remember how.
I read the link and many other posting regarding catalogs and it just ain't
sinking in. I am a casual Cocooner (a few times a year) and most of these
docs just confuse me. Can someone provide a simplistic explanation of what
needs to happen from the point I got to below?

Environment: Cocoon-2.1.9, XP, JDK1.5.0_06, Jetty4.2.23

ai.svg (As saved from Adobe Illustrator):
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version:
6.00 Build 51448)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"" [
	<!ENTITY ns_svg "">
	<!ENTITY ns_xlink "">
<svg version="1.1" id="square" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;"
width="165" height="126" viewBox="0 0 165 126"
style="overflow:visible;enable-background:new 0 0 165 126;"
xml:space="preserve" >
	<g id="myRect">
		<rect width="165" height="126" fill="pink"/>

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
  <xsl:template match="/">
  <xsl:template match="//ns_svg:g[@id='myRect']">
	<xsl:apply-templates select="@*|node()"/>
	<ns_svg:rect x="100" y="100" width="165" height="126" fill="blue"/>
  <xsl:template match="@*|node()">
      <xsl:apply-templates select="@*|node()"/>


  <map:serializer name="xml"
    doctype-public="-//W3C//DTD SVG 1.0//EN"
    <!-- serializer configurations -->
  <map:match pattern="ai.svg">
    <map:generate src="ai.svg"/>
    <map:transform src="xslt.xslt"/>
    <map:serialize type="svgxml"/>

Hope this is clear enough.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message