Export using XML + XSL

Tell us about your wildest feature dreams. Or just harmless suggestions for improvement.
Post Reply
Zearin
Contributor
Contributor
Posts: 9
Joined: Tue Aug 05, 2008 8:03 am

Export using XML + XSL

Post by Zearin »

Hello Bruji!

Love the Pedias.

I just wanted to request an option to export using XSL for templates. It would be nice to export as XML also—but I believe an export could handle the XML transparently and just let the user worry about XSL, if that is in any way preferable.

The reason I ask is that I'm becoming more and more fond of XSL, and being an open standard it would encourage a great deal of flexibility and reuse of any exports from the Pedias.

Also, I don't know Objective-C. I want to learn it some day, but in the meantime I've got my XML capabilities, and it so happens that XSL's template-driven nature is a perfect fit for this sort of thing.

Keep up the great work!
User avatar
Nora
Site Admin
Posts: 2155
Joined: Sun Jul 04, 2004 5:03 am
Contact:

Re: Export using XML + XSL

Post by Nora »

The Pedia databases used to be kept in XML format but we switched to SQL for speed reasons. The .pedia export option is XML though. The resulting export is a bundle but you can ctrl-click (right-click) the .pedia file to open the bundle and you'll see the XML and the cover images folder inside.
Zearin
Contributor
Contributor
Posts: 9
Joined: Tue Aug 05, 2008 8:03 am

Re: Export using XML + XSL

Post by Zearin »

Oh, cool! That's great.

Thanks for the extremely speedy reply!
Vinz
Contributor
Contributor
Posts: 5
Joined: Thu Jun 21, 2007 7:34 pm

Re: Export using XML + XSL

Post by Vinz »

i have a questin similar to this one.. Can you choose wich elements you export?

I want to make a flash application that reads the xml in. The .pedia file has way to much information.


In the future i also wonna create a PHP application that reads and displays the content of my library. So is there a way to export the data in .sql format? (INSERT INTO x Values ('X','X')) ...


tnx in advance
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Export using XML + XSL

Post by Conor »

There is no way to filter the XML creation to just a subset of fields. But XSL should allow you to build a script to pass the file through in order to filter some fields. Since our database can be read with sqlite3 you can dump the entire database to SQL using sqlite3 on the command line:

Code: Select all

 sqlite3 ~/Library/Application Support/DVDpedia/Database.pediadata .dump > ~/Desktop/RawPediaData.sql
You can also use "sqlite3 ~/Library/Application Support/DVDpedia/Database.pediadata" in the Terminal to open the database and run SQL commands in order to export only the data you want or manage it in someway. ZEntry is the table you want and the fields names can be guessed at but always prefix a "Z". Sqlite3 also has commands for showing the schema of the database in order to explore further. Of course make a backup copy of the Database.pediadata file before you run any SQL commands on it, even if they are just read only.
Post Reply