You have shown what you expect to appear in the XSL-FO document, but not what 
actually does appear there. Consequently, it's hard to say where you are going 
wrong. With what information you have supplied, the second construction (the 
one using "copy-of") appears to be the correct one.

Show what you actually get in the XSL-FO document at the point where you have 
<xsl:copy-of select="Report/TrackT1/[EMAIL PROTECTED]'Left Front']/[EMAIL 
PROTECTED]'1']/svg"/> in the stylesheet and perhaps we can help.

If that's where the problem is, you would be better off on the XSL list.
-- 
Charles Knell
[EMAIL PROTECTED] - email



-----Original Message-----
From:     Tracey Zellmann <[EMAIL PROTECTED]>
Sent:     Mon, 20 Feb 2006 08:32:18 -0500
To:       <fop-users@xmlgraphics.apache.org>
Subject:  putting an svg element into an fo document

My problem may overlap FOP, XSLT, SVG and XPATH, but I would like to start 
here, because I am basically having a problem creating a PDF using FOP. If 
anyone thinks I should better ask another forum, please point me in that 
direction.

I have an xml document that contains a number of svg elements. I am trying to 
use an XSLT stylesheet to put them into an fo document, which I then feed 
through FOP to create a PDF. I have control over the structure of everything.

The xml document is of this form
<Report>
    <TrackT1>
        <Position position="Left Front">
            <MCHistogram id="1">
                <svg...

                    many <g> elements

                </svg>

        and so forth...

As an example, I am trying to get the above svg element, in its entirety, with 
tags, into an fo document that looks like this:

    <fo:block>
        <fo:instream-foreign-object content-width="6in">
            <svg...

            </svg>
        </fo:instream-foreign-object>
    <fo:block>

If I manually paste the svg element in, the resulting PDF looks exactly how I 
want it to look.

I have been trying to do this programmatically with XSLT, without success, and 
I would appreciate any help or advice.

I have tried

    <xsl:value-of select="Report/TrackT1/[EMAIL PROTECTED]'Left Front']/[EMAIL 
PROTECTED]'1']/svg"/>

also

    <xsl:copy-of select="Report/TrackT1/[EMAIL PROTECTED]'Left Front']/[EMAIL 
PROTECTED]'1']/svg"/>

Neither approach is successful.

I have tried many other combinations and permutations, without any real 
success. What would be a proper way of getting such an svg element into my 
report?


ÿþ<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2900.2802" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>My problem may overlap FOP, XSLT, SVG and XPATH, but I would like to start here, because I am basically having a problem creating a PDF using FOP. If anyone thinks I should better ask another forum, please point me in that direction.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>I have an xml document that contains a number of svg elements. I am trying to use an XSLT stylesheet to put them into an fo document, which I then feed through FOP to create a PDF. I have control over the structure of everything.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>The xml document is of this form</FONT></DIV> <DIV><FONT face=Arial size=2>&lt;Report&gt;</FONT></DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &lt;TrackT1&gt;</FONT></DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;Position position="Left Front"&gt;</FONT></DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;MCHistogram id="1"&gt;</FONT></DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;svg...</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; many &lt;g&gt; elements</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/svg&gt;</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; and so forth...</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>As an example, I&nbsp;am trying&nbsp;to get the above svg element, in its entirety, with tags, into an fo document that looks like this:</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &lt;fo:block&gt;</FONT></DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;fo:instream-foreign-object content-width="6in"&gt;</FONT></DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;svg...</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/svg&gt;</FONT></DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/fo:instream-foreign-object&gt;</FONT></DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &lt;fo:block&gt;</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>If I manually paste the svg element in, the resulting PDF looks exactly how I want it to look.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>I have been trying to do this programmatically with XSLT, without success, and I would appreciate any help or advice.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>I have tried</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &lt;xsl:value-of select="<FONT face="Times New Roman" color=#000090 size=2>Report/TrackT1/[EMAIL PROTECTED]'Left Front']/[EMAIL PROTECTED]'1']/svg"/&gt;</FONT></FONT></DIV> <DIV><FONT color=#000090 size=2></FONT>&nbsp;</DIV> <DIV><FONT color=#000090 size=2>also</FONT></DIV> <DIV><FONT color=#000090 size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &lt;xsl:copy-of select="<FONT face="Times New Roman" color=#000090 size=2>Report/TrackT1/[EMAIL PROTECTED]'Left Front']/[EMAIL PROTECTED]'1']/svg"/&gt;</FONT></FONT></DIV> <DIV><FONT size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>Neither approach is successful.</FONT></DIV> <DIV><FONT size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>I have tried many other combinations and permutations, without any real success. What would be a proper way of getting such an svg element into my report?</FONT></DIV> <DIV><FONT size=2></FONT>&nbsp;</DIV></BODY></HTML>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to