Ofcourse – and yipee it now works  - just with that 3 minute delay.

 


From: Josep A. Frau [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 31, 2005 11:18 PM
To: [email protected]
Subject: Re: SVG > SVG via xslt

 

I forget svg:g.
 
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:svg="http://www.w3.org/2000/svg">
 
       <xsl:template match="//svg:g[EMAIL PROTECTED]'myRect']">
              <xsl:copy>
                      <xsl:apply-templates select="@*|node()"/>
                      <svg:rect  x="100" y="100" width="165" height="126" 
fill="blue"/>
              </xsl:copy>
       </xsl:template>


The element g without namespace isn't in the source document

The g element in the source element is g in the "http://www.w3.org/2000/svg" namespace and you try math the element g without namespace.

In your XSLT the template match
"//[EMAIL PROTECTED]'myRect']" don't match any element.


En/na Lincoln Mitchell ha escrit:

Nothing seemed to change – no 2nd rect appears. Do you infer that this will work after the catalog is implemented (as suggested by Jason Johnston).

 

Linc

 


From: Josep A. Frau [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 31, 2005 10:24 PM
To: [email protected]
Subject: Re: SVG > SVG via xslt

 

You must generate <rect> in the svg namespace.
Try:


<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:svg="http://www.w3.org/2000/svg">
 
       <xsl:template match="//[EMAIL PROTECTED]'myRect']">
              <xsl:copy>
                      <xsl:apply-templates select="@*|node()"/>
                       <svg:rect  x="100" y="100" width="165" height="126" 
fill="blue"/>
              </xsl:copy>
       </xsl:template>
-- 
Josep A. Frau 
Centre de Tecnologies de la Informació
Universitat de les Illes Balears

Reply via email to