- From: Eyrignoux Marc <eyrignou@yahoo.fr>
- Date: Fri, 23 Aug 2002 10:25:23 +0200 (CEST)
- To: www-xsl-fo@w3.org
Hello everybody,
I have an XML file, and I transform it using an XSL
stylesheet for producing PDF docs.
I would like to include SVG tags in my XML file, but
my XSL stylesheet tries to interpret them when
producing the FO stream.
In other words, is there a way to tell my XSLT
processor that I don't want it to interpret the SVG
tags ?
My XML looks like:
<?xml version="1.0"?>
<static>
<title>Crédit Lyonnais</title>
<paragraph>Page</paragraph>
<image>
<svg:svg> .... </svg:svg>
</image>
</static>
The problem of my XSL lies at the end of the file:
<xsl:template match="static/image" foa:name="image"
foa:class="image" foa:group="image">
<fo:instream-foreign-object foa:name="image"
foa:group="image" xsl:use-attribute-sets=" image">
<xsl:apply-templates/>
</fo:instream-foreign-object >
</xsl:template>
The "apply-templates" recursively tries to interpret
the svg tags instead of repeating what is within the
<image> tag => I get nothing in the FO stream.
My XSL looks like:
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:fox="http://xml.apache.org/fop/extensions"
xmlns:foa="http://fabio">
<xsl:import href="TablesAtts.xsl"></xsl:import>
<xsl:output method="xml" encoding="UTF-8"
indent="yes"></xsl:output>
<xsl:variable name="dots">l</xsl:variable>
<xsl:variable name="circles">m</xsl:variable>
<xsl:variable name="squares">n</xsl:variable>
<xsl:strip-space elements="row"></xsl:strip-space>
<xsl:template match="/">
<fo:root
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master margin-left="1cm"
page-width="210mm" margin-right="1cm"
margin-bottom="3cm" margin-top="2cm"
master-name="myPage" page-height="297mm">
<fo:region-body ></fo:region-body >
</fo:simple-page-master>
<fo:page-sequence-master master-name="mySeq">
<fo:repeatable-page-master-reference
master-reference="myPage"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="mySeq">
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates select="/static"/>
</fo:flow >
</fo:page-sequence >
</fo:root>
</xsl:template>
<xsl:template match="static/paragraph"
foa:name="test" foa:class="block"
foa:group="paragraph">
<fo:block foa:name="test" foa:group="paragraph"
xsl:use-attribute-sets=" Normal">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="static/image" foa:name="image"
foa:class="image" foa:group="image">
<fo:instream-foreign-object foa:name="image"
foa:group="image" xsl:use-attribute-sets=" image">
<xsl:apply-templates/>
</fo:instream-foreign-object >
</xsl:template>
</xsl:stylesheet>
=====
C'est au pied du mur qu'on voit le mieux le mur.
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
Received on Friday, 23 August 2002 04:25:24 UTC