[Clipart] getid3 svg metadata update
jon at rejon.org
Sun Oct 15 20:30:13 PDT 2006
On Sun, 2006-10-15 at 12:28 -0400, Roan Horning wrote:
> Just wanted to let people know I have been working on svg support in getid3.
> It will now return information from all <metadata> tags found in an svg
> file. It needs some tweaking to make sure I am getting all the attribute
> information from the metadata tag itself. The information is returned in
> a muti-dimensional array using parts of the XPath as the array keys:
> XPath = /svg/metadata/title
> Array = $meta['svg'][metadata['']['title']
> For a demo of the new info. returned see
> I have placed the documentation for the XPath library being used at
This is major good news!
> I have also changed the way that the module will check to see if it is
> an svg file. It no longer requires the first line to have an XML
> declaration like "<?xml version="1.0" encoding="UTF-8"
> standalone="no"?>". I let the XPath library check that it is a
> well-formed xml file, and then check to make that the root tag is and
> <svg> tag to determine if the file is an svg file. It's a little bit of
> a speed hit this way, but we get better error messages returned by the
> XPath library. See the test-with-xml-error.svg file.
Right, this really makes sense and sense its not something done on
navigation, is fine IMO.
> The XML declaration is a "should" recommendation of the xml specs. I
> plan to add and XMLdeclaration variable to the data returned by the
> getid3 svg module. This will have a TRUE/FALSE value. We can then decide
> if we want to "fix" this problem when the file is uploaded.
> I also plan to add a similar value for document type declaration which
> is required if we are trying for a valid xml file: see
Yep, this is a great idea.
> We have had write capabilities since the inclusion of the XPath
> library. I have started learning how to use it and figuring out some if
> its quirks. I'll try to get some demo pages up within the next day or so.
Yes, this would be great to get into getid3...we could also start to
test the code on cchost if you feel it is ready :)
This is really great Roan! Can we all help you?
San Francisco, CA
USA PH 510.499.0894
jon at rejon.org
MSN, AIM, Yahoo Chat: kidproto
Jabber Chat: rejon at gristle.org
IRC: rejon at irc.freenode.net
More information about the clipart