Importing without known vid / tids?

JacobSingh - August 3, 2007 - 00:58
Project:Taxonomy import/export via XML
Version:5.x-1.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I'm working on a migration project, where I have an XML dump from the user of their taxonomy. What I want to do is take this XML dump and create terms from it. I can write the xslt of whatever to convert to your format, however your format assumes the XML file is aware of primary keys in drupal (like tid and vid) which makes the file non-portable really. Wouldn't it be better to not provide these since you are already matching for dupes it seems by the term name.

Would you open to consulting work to implement this and import a vocabulary?

Thanks,
Jacob

#1

NicolasH - August 3, 2007 - 10:15

Hi Jacob,

I know it looks like the IDs are predetermined, but they aren't really. I move vocabs between different Drupal installations all the time and tid/vids would definitely overlap and cause conflicts. However, if a term gets saved and its tid is already taken, it will receive a new tid and save successfully.

Please try to save your data in exactly the same format (make sure there are no line breaks) and simply generate random tids (although parent-child relationships obviously need to make sense). If that doesn't work for you, please attach a reasonably small example file and I will see what I can do.

Alternatively, you might want to make improvements yourself and submit a patch.

Cheers
Nic

#2

NicolasH - April 10, 2008 - 10:42
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.