Great - works a treat! Thanks a million! As we say in Oz - True Blue, you little rippa'
Linc > -----Original Message----- > From: Jason Johnston [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 31, 2005 10:04 PM > To: [email protected] > Subject: Re: SVG > SVG via xslt > > Lincoln Mitchell wrote: > > Not sure that would help as I just removed the namespaces from the > source > > like this: > > > > --- > > <?xml version="1.0" standalone="yes"?> > > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" > > "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" []> > > <svg width="400px" height="250px" > > > <rect width="165" height="126" fill="pink"/> > > </svg> > > --- > > > > And the result is that only the original SVG appears LESS the additional > svg > > elements added via the xslt. However, the original svg takes a few > minutes > > to appear onscreen. > > Again, removing the doctype works instantly but I don't want to do that. > > 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 > http://cocoon.apache.org/2.1/userdocs/concepts/catalog.html > > As for the elements added by your XSLT not showing up: you need to make > sure they are also in the SVG namespace. It looks like the XSLT you > posted in another part of this thread is creating the <rect/> in the > null namespace so it's probably getting ignored as an unrecognized > element. > > > > > -----Original Message----- > > From: Christoph Hermann [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 30, 2005 10:01 PM > > To: [email protected] > > Subject: Re: SVG > SVG via xslt > > > > Lincoln Mitchell schrieb: > > > > Hello, > > > > > >>I am trying to generate an SVG file from an Adobe illustrator SVG file > >>via XSLT/Cocoon. > > > > > >>If I delete the DOCTYPE (and the xmlns' on the svg tag) then all works > >>fine - but I want the file to stay intact - so that's not an option. > > > > > > How about stripping the namespaces with an additional xsl file? This way > > your first file remains intact? > > > > ---snip--- > > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > version="1.0"> > > <xsl:strip-space elements="*"/> > > > > <xsl:template match="/"> > > <xsl:apply-templates mode="copy"/> > > </xsl:template> > > > > <xsl:template match="*" priority="-1" mode="copy"> > > <xsl:element name="{name()}"> > > <xsl:copy-of select="@*"/> > > <xsl:apply-templates mode="copy"/> > > </xsl:element> > > </xsl:template> > > </xsl:stylesheet> > > ---snap--- > > > > HTH > > Christoph > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
