From: Roan H. <ro...@ho...> - 2006-07-10 15:18:52
|
Hi Victor -- thanks for your comments, sorry I think my terminology caused much of the confusion--I'll try to explain better below. Victor Stone wrote: > actualy I think the majority of php4 installations has an xml reader, > in fact we rely on it to read sample pool feeds (see > cclib/cc-feedreader.php) > What I am thinking of is a tool generates a tree structure (or some other structure) from a "well formed" xml document, provides functions to easily extract and add information into the tree structure, and then regenerate xml from the tree structure (or part of it). Here are some links to pages which illustrate this: http://www.phppal.com/xml/doc.php http://us2.php.net/xml (look at examples in the comments section at the bottom of the page > - the issue is that it does not fvalidate > against schemas. > Yes validation of schemas/dtd's seems to be the biggest problem in all programming languages and isn't handled by the above examples. I think it all comes down to "how valid does the document need to be?" For getID3 handling svg, at least for now, I say as long as the file has a root svg tag then it is valid, and we return what information we can find (width, height, Creative Commons info, etc). A way to point a parser at a DTD/schema and ask if the document is valid would be great, but for now a parser that parses any xml file into a standard structure, with functions to provide easy access to that structure, will make writing the validation code for a particular schema easier. >> >> 2) I see the Creative Commons information falling into the category of >> tags. In keeping with the modular style of getID3, I think the Creative >> Commons rdf handling should be in its own tags module. To keep with the >> getID3 naming scheme, I'm calling this file: module.tags.cc.php (perhaps >> it should be module.tags.creative_commons.php) > > sorry, I don't understand this -- I think the term 'tags' may be too > overloaded. Are we talking about license information? > So many tags so little time :) Yes I meant the license information. Tags in this sense means metadata added to a file format. With getID3 you have id3v1, id3v2, and ape "tags", etc. which can be incorporated into some of the various file formats. A separate set of code to validate and generate the various official CC license information--so that any xml based document handled by getID3 could call it without needing to load the svg code. > >> 4) It looks like some modification to the getid3.php and getid3.lib.php >> will also be needed to include svg support. > > This is a little scary because (so far) we have not had to hack getid3 > and if we do then we have to distribute the whole library as part of > ccHost. > Okay, I looked again, and I don't think we have to modify either file to have svg work. There are some functions in the getid3.lib.php to deal with image types and image mime-types that I thought may need modified, but on closer inspection I don't think it is required. Also the getid3.php file has settings to turn on and off the use of the various id3v1, 1d3v2, ape tags features. A similar feature for the CC info might be nice but not necessary. --Roan |