[xslt] Possible namespace-related bug in xsltproc

[[ Moderator -- I posted this last night but it got queued. I've
joined the list, so I'm reposting myself rather than waiting for
it to go through your queue. I hope that is OK. ]]

I've been tinkering with using xsltproc to apply XSL templates
to modify SVG images produced by Sodipodi.

I've been battling with behavior that I thought was due to
mistakes made by me. Since that didn't lead to resolution,
I entertained the possibility that xsltproc could have a

I've found that for an SVG document with a default namespace
declaration in the root <svg> element, I have to run in --novalid
mode, and I have to remove the xmlns="..." attribute from the
root <svg> element to get even a simple XSL stylesheet to
apply the way I think it should.

I've distilled this down to a simple example, which I'll attach here.
The tarball below contains a Makefile and a README that
shows the output I get when running the Makefile. Also included
is a simple SVG file with (bad.svg) and without (better.svg) the
problem xmlns attribute. The same example.xsl file is used for
all four tests (with and without --novalid for bad.svg and better.svg).
Note that the example.xsl file contains xmlns attributes in its root
element, as I've heard is required for proper execution of XSLT
against XML with namespaces.

Can any of you shed some light on this one for me? Does this
fail with your setup, too? Have I committed any misdemeanors
in the XSLT? Or, is there a namespace-related bug in xsltproc
to which I'm falling victim?



-- Gregor Purdy


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]