RE: [xsl] When are <!DOCTYPE> and svg namespace references material?

Subject: RE: [xsl] When are <!DOCTYPE> and svg namespace references material?
From: "Ylvisaker, Steve" <steve.j.ylvisaker@xxxxxxxxxxxxx>
Date: Wed, 3 Feb 2010 12:37:15 -0600
Martin - thanks.

I guess, based on your answers, the question would be with regard to my XSLT
transformations using Saxon. We perform transformations to do language
localization on labels in our SVG graphics. Apparently it is this process that
is in question - and perhaps of interest to the list.

I use Saxon for my transformations but we are not asking it to validate
against the DTD, however, I'm wondering if it is trying because of the
<!DOCTYPE> declaration. If I remove the <!DOCTYPE> declaration or point it to
an invalid URL Saxon doesn't seem to mind. What I don't know is if the parser
is "trying" to find the DTD, failing and then driving on.

Perhaps my question is Saxon specific and I should post to the Saxon list.

Thanks for the info - Steve

-----Original Message-----
From: Martin Honnen [mailto:Martin.Honnen@xxxxxx]
Sent: Wednesday, February 03, 2010 12:05 PM
To: Ylvisaker, Steve
Subject: Re: [xsl] When are <!DOCTYPE> and svg namespace references material?

Note that your question does not relate to XSLT so I reply off list.

Ylvisaker, Steve wrote:
> There is a concern that our SVG graphics implementation may be introducing
external reference dependencies outside our local network. An example graphic
is:
>
> <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE svg PUBLIC
> "-//W3C//DTD SVG 1.1//EN"
> "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
> <svg version="1.1" xmlns="http://www.w3.org/2000/svg";
> xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px"
> width="357.553px" height="216.893px" viewBox="0 0 357.553 216.893"
> enable-background="new 0 0 357.553 216.893" xml:space="preserve">
>
> Our graphics are, for the most part, generated by Adobe Illustrator
> CS3 but we are running xslt transformations against them with Saxon
> and viewing the graphics with a variety of tools: Firefox, InkScape,
> Ai CS3, Antenna House formatter and Saxon-PE 9.2.0.2
>
> I have isolated my work station (no corporate network or internet) and all
of these applications work fine. But I don't know if they are trying to make
an external reference, failing and driving on, or if the <!DOCTYPE> and W3
name space references are little more than documentation. Three of the
applications, Firefox, InkScape and Adobe CS3 care about the name of the xmlns
URL. Something other than www.w3.org trips them up. Antenna House and Saxon
don't seem to care. With the <!DOCTYPE> declaration I can reference www.w3.org
as above, or reference an internal network URL or drop the declaration all
together and none of the applications perform differently. All of this is, of
course, anecdotal data at best. It would be great to know for sure what is
going on.
>
> My question: Is there ever an attempt to make an external reference to
www.w3.org from either the <!DOCTYPE> declaration or the xmlns reference?

An XML parser could try to read the DTD referenced in the DOCTYPE, in
particular if it wants to validate the XML document.

As for the namespaces like
   xmlns="http://www.w3.org/2000/svg";
xmlns:xlink="http://www.w3.org/1999/xlink";
no, these do not result in any network access but they matter to any tool you
want to render the SVG with as the renderer knows how to render e.g. a
'circle' element in the SVG namespace 'http://www.w3.org/2000/svg' but does
not know how to render a 'circle'
element in no namespace or a different namespace.

--

	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/


[CONFIDENTIALITY AND PRIVACY NOTICE]

Information transmitted by this email is
proprietary to Medtronic and is intended for use only by the individual or
entity to which it is addressed, and may contain information that is private,
privileged, confidential or exempt from disclosure under applicable law. If
you are not the intended recipient or it appears that this mail has been
forwarded to you without proper authority, you are notified that any use or
dissemination of this information in any manner is strictly prohibited. In
such cases, please delete this mail from your records.
 
To view this notice
in other languages you can either select the following link or manually copy
and paste the link into the address bar of a web browser:
http://emaildisclaimer.medtronic.com

Current Thread