You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Magnus Pettersson <Ma...@trab.se> on 2000/06/28 15:04:56 UTC

SVG style-attribute not working

The style attribute is not working for me. The fo-file includes this:

	<svg:svg width="300pt" height="100pt">
		<svg:line style="stroke-width:6mm; stroke:blue" x1="150pt"
y1="14pt" x2="150pt" y2="74pt"/>
	</svg:svg>

But the result is only a thin black line as if the code would have been:
	
	<svg:svg width="300pt" height="100pt">
		<svg:line x1="150pt" y1="14pt" x2="150pt" y2="74pt"/>
	</svg:svg>

(The style-attribute is ignored)
This means that I can't use <svg:path> which needs an associated style.

I would like to render a red dot like this:

	<svg width="500" height="500">
		<path style="fill:#FF1900;"
d="M41.977,31.241c2.802-2.097,3.374-6.068,1.278-8.87c-2.097-2.802-6.068-3.37
5-8.87-1.278c-2.802,2.096-3.375,6.068-
1.278,8.87c2.097,2.802,6.068,3.374,8.871,1.278z"/>
	</svg>

I can also not write a circle like this:
	<svg:svg width="300pt" height="100pt">
		<svg:circle cx="160pt" cy="30pt" r="20pt"/>
	</svg:svg>

The only thing that works is: line, rectangle and text. (All only in black)

I'm using fop-0_13_0.
Any ideas??

The fo-file is included below.

Thanks
::magnus

PS: I solved the problem in my earlier question "Embedded FOP and SVG
question". The fo-file was automatically generated and the file was missing
namespace declaration for svg:
xmlns:svg="http://www.w3.org/2000/svg-20000303-stylable"
Sorry for asking that obvious error.

fo-file passed to the FOP-driver in a java servlet:
----------------------------------------------------------------------------
-------
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:svg="http://www.w3.org/2000/svg-20000303-stylable">
    <fo:layout-master-set>
        <fo:simple-page-master margin-right="2.5cm" margin-left="2.5cm"
margin-bottom="2cm" margin-top="1cm" width="21cm" height="29.7cm"
page-master-name="first">
            <fo:region-before extent="3cm"/>
            <fo:region-body margin-top="3cm"/>
            <fo:region-after extent="1.5cm"/>
        </fo:simple-page-master>
        <fo:simple-page-master margin-right="2.5cm" margin-left="2.5cm"
margin-bottom="2cm" margin-top="1cm" width="21cm" height="29.7cm"
page-master-name="rest">
            <fo:region-before extent="2.5cm"/>
            <fo:region-body margin-top="2.5cm"/>
            <fo:region-after extent="1.5cm"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence>
        <fo:sequence-specification>
            <fo:sequence-specifier-repeating page-master-repeating="rest"
page-master-first="first"/>
        </fo:sequence-specification>
        <fo:static-content flow-name="xsl-before">
            <fo:block line-height="14pt" font-family="serif"
font-size="10pt" text-align="end">2000#1 - p. <fo:page-number/>
            </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-body">

            <fo:block padding-top="3pt" text-align="centered" color="white"
background-color="blue" space-after.optimum="15pt" line-height="24pt"
font-family="sans-serif" font-size="18pt">
	   Newsletter: 2000#1</fo:block>
            <fo:block padding-top="3pt" text-align="start"
space-after.optimum="10pt" space-before.optimum="10pt" line-height="20pt"
font-family="sans-serif" font-size="16pt">Header</fo:block>
            <fo:block text-align="start" space-after.optimum="3pt"
line-height="15pt" font-family="sans-serif" font-size="12pt">Some text
...</fo:block>

<svg:svg width="300pt" height="100pt">
	<svg:line style="stroke-width:6mm; stroke:blue" x1="150pt" y1="14pt"
x2="150pt" y2="74pt"/>
</svg:svg>

		</fo:flow>
    </fo:page-sequence>
</fo:root>
----------------------------------------------------------------------------
-------

********************************************
Magnus Pettersson
Telia Prosoft
Phone: +46 60 144663
Mobile: +46 709 524 513
E-mail: magnus.xx.pettersson@trab.se
Address: Box 883, 851 24 Sundsvall, Sweden
********************************************


Re: SVG style-attribute not working

Posted by Peter Murray-Rust <Pe...@nottingham.ac.uk>.
I hesitate to be definitive because it is possible that I have not built a 
correct version. [I downloaded Keiron's src, compiled it (after editing the 
SVGNumerImpl() bug I mentioned) and added it to my classpath.] It seems to 
work except for the transform attribute. I attach the small amount of 
FO/*.svg (actually part of a stylesheet for demonstration)

At 08:42 28/06/00 -0500, Mike Crowe wrote:
>The Keiron Liddle SVG patch was applied last night.  I updated my code and
>compiled it with only minor problems (needed to use "cvs update -d").
>
>PeterMurray-Rust wrote
> >It looks like a splendid piece of work - I managed to run it and get most
> >things working except for 'transform' attributes which appeared to parse
> >their arguments but not to transform anything. However I cannot be sure I
> >implemented the distribution correctly.

I agree with Dave Pawson about the value of having an easy robust download. 
If newcomers have to use CVS, javac, etc. they will ask the naive questions 
that I have. And I think any compilation in the wrong hands runs the risk of
getting spurious errors reported to the list. I agree that it's a lot of 
work to produce good downloads, but it's worth it in the end, so my 
encouragement and thanks to those who are providing us with them.


> >It appears to use the later SVG namespace (I had to grep the source for
> >this :-):
> >xmlns:svg="http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303- 
> stylable.dtd"
>
>I applied this new xmlns and it helped things, but still wasn't able to get an
>output.  I am doing an xsl transform.  Peter, is this where you are having
>trouble?

Name collision!!! "transform" is the svg:transform attribute, not the act 
of running XSLT. XSL makes no difference to what I am doing. The following 
is (part of) the FO [created after an XSL transform].


>  Each svg object encoundered throws a warning message and is not
>processed.  The end result is no svg image is rendered.

What's the message. If it is a "someNamespaceURI^line" not found or 
something like that, e the URI is not the one in the example or you have 
the wrong version.

>Does anyone have an xslt example using the new SVG material to help me through
>my ignorance of xml-svg-xslt-fo-pdf?  What really scares me is that I know 
>what
>all these acronyms mean :)

Here is my example. Sorry to clutter the list, but I hope it is short 
enough and useful enough. The first part shows the circle, rect, lines, 
path and some fill/stroke-width. The second half is a molecule but unless 
the transform() works, most of it is off the edge!

Note that the transform="scale()" does nothing. If you put numbers in there 
the picture fails to display at all. If anyone can use the transform() 
attribute I'd be delighted.

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" 
xmlns:svg="http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-sty 
lable.dtd"><fo:layout-master-set><fo:simple-page-master 
page-master-name="first" height="29.7pt" width="21pt" margin-top="1pt" 
margin-bottom="2pt" margin-left="2.5pt" 
margin-right="2.5pt"><fo:region-before extent="3pt"/><fo:region-body 
margin-top="3pt"/><fo:region-after 
extent="1.5pt"/></fo:simple-page-master><fo:simple-page-master 
page-master-name="rest" height="29.7pt" width="21pt" margin-top="1pt" 
margin-bottom="2pt" margin-left="2.5pt" 
margin-right="2.5pt"><fo:region-before extent="2.5pt"/><fo:region-body 
margin-top="2.5pt"/><fo:region-after 
extent="1.5pt"/></fo:simple-page-master></fo:layout-master-set><fo:page-sequ 
ence><fo:sequence-specification><fo:sequence-specifier-repeating 
page-master-first="first" 
page-master-repeating="rest"/></fo:sequence-specification><fo:static-content 
  flow-name="xsl-before"><fo:block text-align="end" font-size="10pt" 
font-family="serif" line-height="14pt">Test Results - p. 
<fo:page-number/></fo:block></fo:static-content><fo:flow 
flow-name="xsl-body"><fo:block>

<fo:block break-before="page" font-size="24pt" line-height="28pt" 
space-before.optimum="12pt" space-after.optimum="12pt">Embedded 
SVG</fo:block><svg:svg width="400pt" height="200pt"><svg:g 
transform="scale()"><svg:rect x="20pt" y="20pt" width="100pt" 
height="100pt"/><svg:line x1="20pt" y1="20pt" x2="120pt" 
y2="120pt"/><svg:line x1="120pt" y1="20pt" x2="20pt" 
y2="120pt"/><svg:circle cx="70pt" cy="70pt" r="50pt" style="fill:blue; 
stroke:red; stroke-width: 3" transform="translate(10 0)"/><svg:path d="m 
100 50 l 40 50 -30 20 z" style="stroke: green; stroke-width: 5"/><svg:text 
x="20pt" y="150pt">Hello SVG!</svg:text></svg:g></svg:svg><fo:block>The 
above is an example of an SVG graphic</fo:block><fo:block>. 
</fo:block><fo:block>. </fo:block><fo:block>. </fo:block><fo:block>. 
</fo:block><fo:block>. </fo:block><fo:block>. </fo:block><fo:block>. 
</fo:block><fo:block>. </fo:block><fo:block>. </fo:block><fo:block 
start-indent="100pt"><svg:svg width="300pt" height="300"><svg:line 
x1="2.5354700cm" y1="0.1193636cm" x2="1.4331060cm" 
y2="0.5915131cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="3.2414132cm" y1="-0.9916716cm" x2="2.5354700cm" 
y2="0.1193636cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="2.8827426cm" y1="-1.5486901cm" x2="3.2414132cm" 
y2="-0.9916716cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="2.0212900cm" y1="-2.9782032cm" x2="2.2255300cm" 
y2="-2.6159172cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="1.0768171cm" y1="-2.3059047cm" x2="2.0212900cm" 
y2="-2.9782032cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-1.4887895cm" y1="0.3573212cm" x2="-0.6915053cm" 
y2="-0.5951540cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-3.3512152cm" y1="2.8265076cm" x2="-3.2567669cm" 
y2="2.6759454cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-2.4728939cm" y1="2.0987512cm" x2="-3.3512152cm" 
y2="2.8265076cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-1.4770549cm" y1="1.3047090cm" x2="-2.4728939cm" 
y2="2.0987512cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="0.9686765cm" y1="-0.0350586cm" x2="1.4331060cm" 
y2="0.5915131cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="1.7723030cm" y1="-1.0778668cm" x2="2.8827426cm" 
y2="-1.5486901cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="1.7723030cm" y1="-1.0778668cm" x2="0.9686765cm" 
y2="-0.0350586cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="1.4913299cm" y1="-1.5717302cm" x2="2.2255300cm" 
y2="-2.6159172cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="1.4913299cm" y1="-1.5717302cm" x2="1.7723030cm" 
y2="-1.0778668cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="0.4902425cm" y1="-0.9128550cm" x2="1.4913299cm" 
y2="-1.5717302cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="0.3002717cm" y1="-1.2784456cm" x2="1.0768171cm" 
y2="-2.3059047cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="0.3002717cm" y1="-1.2784456cm" x2="-0.6915053cm" 
y2="-0.5951540cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="0.3002717cm" y1="-1.2784456cm" x2="0.4902425cm" 
y2="-0.9128550cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-0.3627427cm" y1="0.0773395cm" x2="0.4902425cm" 
y2="-0.9128550cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-1.3806443cm" y1="0.6989197cm" x2="-1.4887895cm" 
y2="0.3573212cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-1.3806443cm" y1="0.6989197cm" x2="-2.2508585cm" 
y2="1.6143180cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-1.3806443cm" y1="0.6989197cm" x2="-0.3627427cm" 
y2="0.0773395cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-2.2540112cm" y1="1.8497993cm" x2="-2.2508585cm" 
y2="1.6143180cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-2.2540112cm" y1="1.8497993cm" x2="-3.2567669cm" 
y2="2.6759454cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-1.2765471cm" y1="1.2003010cm" x2="-1.4770549cm" 
y2="1.3047090cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-1.2765471cm" y1="1.2003010cm" x2="-2.2540112cm" 
y2="1.8497993cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-0.2303385cm" y1="0.4198839cm" x2="0.9686765cm" 
y2="-0.0350586cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-0.2303385cm" y1="0.4198839cm" x2="-0.3627427cm" 
y2="0.0773395cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-0.2303385cm" y1="0.4198839cm" x2="-1.2765471cm" 
y2="1.2003010cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="0.9413937cm" y1="1.4944229cm" x2="1.4331060cm" 
y2="0.5915131cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="2.8624408cm" y1="0.6235524cm" x2="2.5354700cm" 
y2="0.1193636cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="4.1008862cm" y1="-1.3820401cm" x2="3.2414132cm" 
y2="-0.9916716cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="3.4976545cm" y1="-2.3471875cm" x2="2.8827426cm" 
y2="-1.5486901cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="2.9775068cm" y1="-3.1539264cm" x2="2.2255300cm" 
y2="-2.6159172cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="2.6102544cm" y1="-3.7835390cm" x2="2.0212900cm" 
y2="-2.9782032cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="0.9192373cm" y1="-2.5776523cm" x2="1.0768171cm" 
y2="-2.3059047cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-0.7967302cm" y1="-0.8687944cm" x2="-0.6915053cm" 
y2="-0.5951540cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-2.2482110cm" y1="0.8655833cm" x2="-1.4887895cm" 
y2="0.3573212cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-2.9921992cm" y1="2.1136419cm" x2="-2.2508585cm" 
y2="1.6143180cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-3.9695317cm" y1="3.1648210cm" x2="-3.2567669cm" 
y2="2.6759454cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-4.1231291cm" y1="3.4610411cm" x2="-3.3512152cm" 
y2="2.8265076cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-2.5996453cm" y1="2.1420992cm" x2="-2.4728939cm" 
y2="2.0987512cm"/><svg:line style="fill:#0d0; stroke-width:0.1cm" 
x1="-0.8730528cm" y1="0.7022906cm" x2="-1.4770549cm" 
y2="1.3047090cm"/><svg:text style="fill:red; stroke: red; stroke-width: 
0.01cm; font-size:0.7" y="0.5915131cm" 
x="1.4331060cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="0.1193636cm" 
x="2.5354700cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="-0.9916716cm" 
x="3.2414132cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="-1.5486901cm" 
x="2.8827426cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="-2.6159172cm" 
x="2.2255300cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="-2.9782032cm" 
x="2.0212900cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="-2.3059047cm" 
x="1.0768171cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="-0.5951540cm" 
x="-0.6915053cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="0.3573212cm" 
x="-1.4887895cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="1.6143180cm" 
x="-2.2508585cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="2.6759454cm" 
x="-3.2567669cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="2.8265076cm" 
x="-3.3512152cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="2.0987512cm" 
x="-2.4728939cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="1.3047090cm" 
x="-1.4770549cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="-0.0350586cm" 
x="0.9686765cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="-1.0778668cm" 
x="1.7723030cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="-1.5717302cm" 
x="1.4913299cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="-0.9128550cm" 
x="0.4902425cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="-1.2784456cm" 
x="0.3002717cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="0.0773395cm" 
x="-0.3627427cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="0.6989197cm" 
x="-1.3806443cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="1.8497993cm" 
x="-2.2540112cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="1.2003010cm" 
x="-1.2765471cm">C</svg:text><svg:text style="fill:red; stroke: red; 
stroke-width: 0.01cm; font-size:0.7" y="0.4198839cm" 
x="-0.2303385cm">C</svg:text></svg:svg></fo:block>


</fo:block></fo:flow></fo:page-sequence></fo:root>



Peter Murray-Rust, Director Virtual School of Molecular Sciences
Pharmaceutical Sciences, University of Nottingham, NG7 2RD, UK
Tel: +44-(0)-115-951-5087 Fax: +44-(0)-115-951-5110
http://www.vsms.nottingham.ac.uk 


Re: SVG style-attribute not working

Posted by Mike Crowe <cr...@psilongbeach.com>.
The Keiron Liddle SVG patch was applied last night.  I updated my code and
compiled it with only minor problems (needed to use "cvs update -d").

PeterMurray-Rust wrote
>It looks like a splendid piece of work - I managed to run it and get most
>things working except for 'transform' attributes which appeared to parse
>their arguments but not to transform anything. However I cannot be sure I
>implemented the distribution correctly.

>It appears to use the later SVG namespace (I had to grep the source for
>this :-):
>xmlns:svg="http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd"

I applied this new xmlns and it helped things, but still wasn't able to get an
output.  I am doing an xsl transform.  Peter, is this where you are having
trouble?  Each svg object encoundered throws a warning message and is not
processed.  The end result is no svg image is rendered.

Does anyone have an xslt example using the new SVG material to help me through
my ignorance of xml-svg-xslt-fo-pdf?  What really scares me is that I know what
all these acronyms mean :)

Magnus Pettersson wrote:

> The style attribute is not working for me. The fo-file includes this:
>
>         <svg:svg width="300pt" height="100pt">
>                 <svg:line style="stroke-width:6mm; stroke:blue" x1="150pt"
> y1="14pt" x2="150pt" y2="74pt"/>
>         </svg:svg>
>
> But the result is only a thin black line as if the code would have been:
>
>         <svg:svg width="300pt" height="100pt">
>                 <svg:line x1="150pt" y1="14pt" x2="150pt" y2="74pt"/>
>         </svg:svg>
>
> (The style-attribute is ignored)
> This means that I can't use <svg:path> which needs an associated style.
>
> I would like to render a red dot like this:
>
>         <svg width="500" height="500">
>                 <path style="fill:#FF1900;"
> d="M41.977,31.241c2.802-2.097,3.374-6.068,1.278-8.87c-2.097-2.802-6.068-3.37
> 5-8.87-1.278c-2.802,2.096-3.375,6.068-
> 1.278,8.87c2.097,2.802,6.068,3.374,8.871,1.278z"/>
>         </svg>
>
> I can also not write a circle like this:
>         <svg:svg width="300pt" height="100pt">
>                 <svg:circle cx="160pt" cy="30pt" r="20pt"/>
>         </svg:svg>
>
> The only thing that works is: line, rectangle and text. (All only in black)
>
> I'm using fop-0_13_0.
> Any ideas??
>
> The fo-file is included below.
>
> Thanks
> ::magnus
>
> PS: I solved the problem in my earlier question "Embedded FOP and SVG
> question". The fo-file was automatically generated and the file was missing
> namespace declaration for svg:
> xmlns:svg="http://www.w3.org/2000/svg-20000303-stylable"
> Sorry for asking that obvious error.
>
> fo-file passed to the FOP-driver in a java servlet:
> ----------------------------------------------------------------------------
> -------
> <?xml version="1.0" encoding="UTF-8"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
> xmlns:svg="http://www.w3.org/2000/svg-20000303-stylable">
>     <fo:layout-master-set>
>         <fo:simple-page-master margin-right="2.5cm" margin-left="2.5cm"
> margin-bottom="2cm" margin-top="1cm" width="21cm" height="29.7cm"
> page-master-name="first">
>             <fo:region-before extent="3cm"/>
>             <fo:region-body margin-top="3cm"/>
>             <fo:region-after extent="1.5cm"/>
>         </fo:simple-page-master>
>         <fo:simple-page-master margin-right="2.5cm" margin-left="2.5cm"
> margin-bottom="2cm" margin-top="1cm" width="21cm" height="29.7cm"
> page-master-name="rest">
>             <fo:region-before extent="2.5cm"/>
>             <fo:region-body margin-top="2.5cm"/>
>             <fo:region-after extent="1.5cm"/>
>         </fo:simple-page-master>
>     </fo:layout-master-set>
>     <fo:page-sequence>
>         <fo:sequence-specification>
>             <fo:sequence-specifier-repeating page-master-repeating="rest"
> page-master-first="first"/>
>         </fo:sequence-specification>
>         <fo:static-content flow-name="xsl-before">
>             <fo:block line-height="14pt" font-family="serif"
> font-size="10pt" text-align="end">2000#1 - p. <fo:page-number/>
>             </fo:block>
>         </fo:static-content>
>         <fo:flow flow-name="xsl-body">
>
>             <fo:block padding-top="3pt" text-align="centered" color="white"
> background-color="blue" space-after.optimum="15pt" line-height="24pt"
> font-family="sans-serif" font-size="18pt">
>            Newsletter: 2000#1</fo:block>
>             <fo:block padding-top="3pt" text-align="start"
> space-after.optimum="10pt" space-before.optimum="10pt" line-height="20pt"
> font-family="sans-serif" font-size="16pt">Header</fo:block>
>             <fo:block text-align="start" space-after.optimum="3pt"
> line-height="15pt" font-family="sans-serif" font-size="12pt">Some text
> ...</fo:block>
>
> <svg:svg width="300pt" height="100pt">
>         <svg:line style="stroke-width:6mm; stroke:blue" x1="150pt" y1="14pt"
> x2="150pt" y2="74pt"/>
> </svg:svg>
>
>                 </fo:flow>
>     </fo:page-sequence>
> </fo:root>
> ----------------------------------------------------------------------------
> -------
>
> ********************************************
> Magnus Pettersson
> Telia Prosoft
> Phone: +46 60 144663
> Mobile: +46 709 524 513
> E-mail: magnus.xx.pettersson@trab.se
> Address: Box 883, 851 24 Sundsvall, Sweden
> ********************************************