This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XSLT, Namespaces & SVG
- To: xsl-list at mulberrytech dot com
- Subject: Re: XSLT, Namespaces & SVG
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Mon, 4 Dec 2000 15:51:13 GMT
- References: <99E837AD9DB8D311A97A00508B6F2ACC014DB515@flex1.sra.com>
- Reply-To: xsl-list at mulberrytech dot com
> The following is a representative example of the problem. I have a simple
> SVG document, and a stylesheet that adds some tags and removes some
> attributes from the existing document.
It worked for me (using saxon) I got the result at the end once I'd
corrected the typo in the example stylesheet having two /> for
xsl:output.
Note that the input document relies on the XML parser reading the
DTD and adding the xmlns attribute. The namespace REC explictly warns
against doing this as a non validating parser (as used by most XSL
systems) is not required to read the DTD. That is, even if the DTD
does default this attribute you are recommended to explictly specify it
in the document instance as well.
However most do read the DTD and as shown below, your file seems to work
OK with my copy of saxon.
> <svg xmlns="%SVGNamespace;">
this seems to imply that your parser did read the dTD but didn't
understand it, which isn't supposed to happen:-)
David
saxon svg1.xml svg1.xsl
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE svg
PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN" "http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd">
<svg xmlns="http://www.w3.org/2000/svg-20000303-stylable">
<g>
<addTag xmlns:svg="http://www.w3.org/2000/svg-20000303-stylable">
<path/>
</addTag>
</g>
<g>
<addTag xmlns:svg="http://www.w3.org/2000/svg-20000303-stylable">
<path/>
</addTag>
</g>
</svg>bash-2.01$
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list