The README.txt is a joke. Describes basic usage and nothing more. The sample provided uses a DTD, when an XSD is provided. The sample is simplistic and does not adequately address term-term hierarchies. The taxonomy suggests using hierarchical, but no documentation is provided on how to actually accomplish this. Do I set the parent of the next term's id equal to the id of the previous term? Figuring the XSD would have answers, I looked... it doesn't look like any constraints or formal logic (other than the minOccurs 0) were actually baked in to the schema. All it has is a bunch of strings and a hierarchical relationship between vocabulary and terms. Awesome.

Consider updating the documentation to adequately address this issue, and updating the sample while providing more than 1. I'm working on a critical group project right now so I don't have the time to step through the code rigorously and determine how exactly to address this concern, but a few thoughts:

(1) Consider doing all the check existing vocabulary stuff in a separate function from the XML parse.
(2) LIKE queries are usually slow...is there a particular reason to match the vocabulary on LIKE instead of a straight select?

Comments

nicolash’s picture

Terribly sorry to inconvenience you so badly in your critical project. I took this module over and basically keep it alive since it's useful occasionally to be able to import/export taxonomies.

Consider any sample taxonomy that resembles what you would like to import on your site, then export it and look at the results. Now import it again...see if it works. If it does, that's the XML you need to produce. If not, post the XML here.

Consider also to write a patch for your suggestions if you're serious about actually improving the way the module works as opposed to dropping a few lines of generic SQL wisdom. However, I've successfully imported/exported hierarchical taxonomies with thousands of items, and that was enough for my use case. This is not something that is performance critical, since it's a one-off process. But by all means, supply a patch...

nicolash’s picture

Status: Active » Closed (fixed)

Ok, the whining maggot has crawled away...