[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Problem with extracting text from svg file

Subject: Re: Problem with extracting text from svg file
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Wed, 10 Oct 2012 08:15:00 +0100
Re:  Problem with extracting text from svg file
On 10/10/2012 00:54, G. Ken Holman wrote:
At 2012-10-09 18:30 -0500, Russell Urquhart wrote:
Looking in the source svg file i DID find the following:

<DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">

As I expected (except for the need for "!" after "<").


Am i going to have to strip out these lines from the source svg files, or is there some way to get the xslt to disregard them?

You can leave the files untouched and get Saxon to disregard the W3C web site by supplying Saxon with an XML catalogue that redirects the W3 URI with a URI pointing to a copy of the DTD in your local system.



Actually, it shouldn't even be necessary to use catalogs. Saxon 9.4 has built in copies of commonly-used W3C DTDs including this one, and if you use default parsing options for your source file then Saxon should automatically direct the XML parser to these local copies.


If you are using 9.4 and this isn't happening, it would be useful to know exactly how you invoke the transformation.

The error message

java.net.UnknownHostException:www.w3.org

suggests to me a slightly different problem. That's not the normal failure you get when trying to retrieve DTDs from the W3C web site (the most common symptom is a long delay followed possibly by an HTTP timeout).

If you're running from the command line, try the -t option which may give more clues as to what's going on.



Michael Kay
Saxonica

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.