Re: XSLT, Namespaces & SVG

Subject: Re: XSLT, Namespaces & SVG
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 4 Dec 2000 15:51:13 GMT
> 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

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:-)


saxon svg1.xml svg1.xsl
<?xml version="1.0" encoding="utf-8" ?>

  PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN" "";>
<svg xmlns="";>
      <addTag xmlns:svg="";>
      <addTag xmlns:svg="";>


This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit

 XSL-List info and archive:

Current Thread