Winter illnesses (me, the wife, the kids), real work, other commitments (I do the layout for the parish magazine once a month) and house redecoration has prevented any development on my book cataloguing/indexing project for the last few weeks. However I made some progress over this weekend.
Having decided that the XML describing a book was very simple:
It seems obvious that title, contributor, etc would be tables in the database each having a column linking back to a row in the book table. The book table has a single column holding a unique book id - its purpose is to link the other tables together.
So I've got a big file of input XML - parse it with SAX because I don't need to know anything complicated and won't suffer from "two stops before I do.." problems - write the rows to the database with DBI.
All worked fine - once I remembered to turn off AutoCommit and I've now got a populated database.
Next steps - write some stuff to query it and get the results back as XML - use Sablotron (or similar) to apply XSLT and churn out HTML, TeX, plain text as required.
It's been really good to fasten SAX and DBI to some simple code of my own and produce something useful - and hopefully the query/output stages will be equally rewarding.
But first I have to get the magazine finished.......