Re: [xsl] Obtaining Graphic File Widths

Subject: Re: [xsl] Obtaining Graphic File Widths
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 11 Jul 2006 14:55:05 +0100
> select="document('C:\My_SVG.svg')/

That should give an error about an unknown URI scheme C.
Like most external identifiers in XML/XSLT document() takes a URI not a
windows file path. The URI to a file on your local machine is something
like
file:///C:/My_SVG.svg
that is, using the file: URI schema (rather than http: etc) and using /
not \.

Unless you have a catalogue in place you probably don't want
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";>
at the top of your files, as this will entail the system fetching and
reading the dtd from the remote site each time which may (or may not,
depending on whether your system caches the file) take longer than the
actual transform stage.
David

Current Thread