W3C home > Mailing lists > Public > www-svg@w3.org > June 2002

SVG --> HTML/TXT for searching and accessibility

From: Dean Jackson <dean@w3.org>
Date: Wed, 12 Jun 2002 14:42:27 +1000
To: www-svg@w3.org
Message-ID: <20020612044227.GC6142@grorg.org>

I'm pleased to announce an online service to extract the
text and metadata from SVG files and output the results
as either text or HTML.

http://www.w3.org/2002/05/svg2stuff.html

I was truely amazed at how easy this was - it seriously
took about an hour (and that was mostly playing with the CSS
stylesheet).

I've use XSLT, but the really cool thing is that if you
just ignore all markup in the SVG file, you get 99% of what
you want as text. In fact, running the empty XSLT stylesheet
(which just prints all the text nodes) is good enough in
most cases. Alternatively, you could write a program that
ignores everything within angle brackets (bonus points to
anyone who can do this in a program of 25 characters or
less!)

If you have suggestions for improvement or if you do actually
write a program to do the same thing, let me know and I'll
link it from the page. I'll also include the smallest perl/python/ruby/etc
script anyone comes up with to extract text from an SVG 
file.

Feel free to use this as ammunition when asking search engines
to natively search SVG files :)

Dean
Received on Wednesday, 12 June 2002 00:40:26 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:22 GMT