cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject SVG Gurus - please help with textPath/xlink
Date Tue, 21 May 2002 12:56:06 GMT
I have the following stylesheet (can be applied to any document) - 
the first 2 pictures are drawn OK - the problem comes when I try
to use a textPath element with xlink - can anyone help me with why
this is happening and how to overcome it?  (I think it may be a 
namespace problem, but am not sure)

>From the logs, I get the following error:

ERROR   (2002-05-21) 14:52.09:976   [cocoon  ]
(/cocoon/indicators/svg-images/6b6c55-edf3156502--7ffe.png)
HttpProcessor[8080][4]/SVGSerializer: SVGSerializer: Exception writing
image
java.util.MissingResourceException: Can't find resource for bundle
java.util.PropertyResourceBundle, key uri.badTarget

Thanks!
Derek

<?xml version="1.0"?>

<xsl:stylesheet 
  version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:xlink="http://www.w3.org/1999/xlink"
	xmlns:svg="http://www.w3.org/2000/svg">

<xsl:template match="/">

<html>
  <head>
    <title>SVG Test</title>
  </head>
  <body bgcolor="#ffffff">
  <p align="center">Test inclusion of SVG into web page as HTML...</p>

  <p align="center">

  <svg:svg width="300" height="300">
    <svg:circle style="fill:blue;stroke:red;" cx="150" cy="150"
r="100"/>
  </svg:svg>  

  </p>
  <p align="center">
	
  <svg:svg 
    width="300" height="300"
    xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    >
      <svg:defs> 
        <svg:path id="path1" 
          d="M 100 L 200 200" fill="none" stroke="red"/>
      </svg:defs>
      
      <svg:circle style="fill:white;stroke:red;" cx="150" cy="150"
r="100"/>

      <svg:text x="100" y="100" style="fill: black; text-anchor:
middle; font-size: 12pt;" >
          Test text
      </svg:text>  
      
  </svg:svg>   
  
  </p>  
  <p align="center">
	
  <svg:svg 
    width="300" height="300"
    xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    >
      <svg:defs> 
        <svg:path id="path1" 
          d="M 100 100 L 200 200" fill="none" stroke="red"/>
      </svg:defs>
      
      <svg:circle style="fill:white;stroke:red;" cx="150" cy="150"
r="100"/>

      <svg:text style="fill: black; text-anchor: middle; font-size:
12pt;">
        <svg:textPath xlink:href="#path1" startOffset="50%">
          Test
        </svg:textPath>
      </svg:text>    
      
  </svg:svg>   
  
  </p>
  </body>
</html>
</xsl:template>
 
 
</xsl:stylesheet>



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message