Re: [xsl] problem with embedded svg in XML being parsed out by XSL

Subject: Re: [xsl] problem with embedded svg in XML being parsed out by XSL
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 08 May 2003 16:13:03 -0400

Two things. First, your template isn't matching since you don't have the namespaces lined up.

Try writing your template like so:

<xsl:template match='svg:svg' xmlns:svg="";>

(Even better would be to put that namespace declaration up at the top of the transform, with the others in the xsl:stylesheet start tag.)

This way, your template will actually match the element in your source.

Second: change your xsl:value-of (which says copy the string value of the node to output) to xsl:copy-of (not xsl:copy). xsl:copy-of makes a copy of the node (what's called a "deep copy", with all attributes, descendants etc. intact).

I hope that helps,

At 11:08 AM 5/8/2003, you wrote:
The XSL looks like:

<xsl:template match='svg'>
     <fo:block space-before.optimum="2pt" space-after.optimum="2pt">
               <xsl:value-of select="."/>
<!--<xsl:copy/>--><!--also tried this-->

Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.      
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
  Mulberry Technologies: A Consultancy Specializing in SGML and XML

XSL-List info and archive:

Current Thread