cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jerm <je...@media.demon.co.uk>
Subject Outputting Entities from XSL
Date Tue, 23 May 2000 17:41:35 GMT
I am experimenting with producing SVG using XSL from XML.
I want to send SVG straight to the browser.

How do you get XSL to output Entities?

I am trying to do something like this, where entities are used to apply style.


<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="page">
		<xsl:processing-instruction 
			name="cocoon-format">type="image/svg-xml"</xsl:processing-instruction>
		<!DOCTYPE svg PUBLIC 
			"-//W3C//DTD SVG 20000303 Stylable//EN"
			"http://www.w3.org/2000/svg10-20000303-stylable" [
			<!ENTITY st0 "fill:#000000;stroke:none;">
			[snip]
		]>
		<svg xml:space="preserve" width="300" height="90">
		<g id="Box">
			<path style="&st0;" d="M269.01,89.79H28.06V61.44h240.94v28.35z"/>
			<g>
				<text x="42.24" y="82.7" style="&st1; &st5; fill-rule:nonzero;">
					<xsl:value-of select="content/paragraph"/>
				</text>
			</g>
		</g>
		</svg>
	</xsl:template>
</xsl:stylesheet>


I get the following error:



        org.apache.cocoon.processor.ProcessorException: Could not associate stylesheet to
document:  error reading /SharkBait/Applications/Development/Java/cocoon-1.7.4/samples/svg/page-svg.xsl:
org.xml.sax.SAXParseException: The content of elements must consist of well-formed character
data or markup.



If I leave out the DOCTYPE declaration, I get none in the output, and no Mime-Type is set.

What am I doing wrong?

Thanks

regards Jeremy
 

   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <mailto:sharkbait@mac.com>     		 <http://www.media.demon.co.uk>
    <phone:+44.[0].20.7737.6831>        <pager:jermq@sms.genie.co.uk>



Mime
View raw message