Hi Christiaan,

 

Thanks for the example.  It was very clear and easy to follow.  I’ll be watching for the hierarchical example as our vocabularies are hierarchical.

 

Lynette

 


From: fez-users-bounces@lists.sourceforge.net [mailto:fez-users-bounces@lists.sourceforge.net] On Behalf Of Christiaan Kortekaas
Sent: Thursday, May 03, 2007 9:58 PM
To: fez-users@lists.sourceforge.net
Subject: Re: [Fez-users] example of import xml for controlled vocabulary

 

Hi Lynette

Firstly sorry about the slow reply on this one.

An example of a free one I can show you is the Australian Picture Thesaurus. It can be downloaded here: http://www.picturethesaurus.gov.au/apt.xml.zip
It is just a list of 16,000 terms so perhaps not the best one to demo (isn’t hierachical like the AAT or some other LOC one I’ve done but will check if that’s free and show that as an example later).

So this one has ID numbers for each record and a text ‘title’ kind of string that we want to extract.

The XPATH to each record (to tell the importer what to loop on in the file) is: /adlibXML/recordList/record
The XPATH to each record ID (from the source file/authority) is: /adlibXML/recordList/record/term.number
The XPATH to each record value (eg the title) is: /adlibXML/recordList/record/term

In this case because the xml controlled vocab file is not hierarchical there is no need to put an XPATH to the location of the parent ID. I’ll have to find another example to show that one off and put
some instructions on this to the wiki.

I hope that somewhat makes sense now. I tried to make it generic (so user enters the xpath) so that any xml controlled vocab file could but imported – at the cost
of the importer figuring out the XPATH (not always easy). If you want a application to help you figure out the xpath of things in an xml file I suggest Stylus Studio, but it isn’t free. When you go to ‘tree’ mode view you can right click on an element in a tree and it has an option to ‘copy xpath of this tree node to clipboard’. Know that it will point to the exact row (put in [1] eg for row 1) so need to take those out. Kinda cheating though as it shouldn’t be too hard to figure out most of the time.

Cheers,
Christiaan



On 20/4/07 1:07 PM, "Lynette Rayle" <elrayle@cs.cornell.edu> wrote:

Can anyone give me an example of an xml file that successfully imports controlled vocabulary into Fez?  I need one that does two levels of children.  It would also be helpful if you could include the xpaths for the first level and the second level children that are used to actually import.  I haven’t had much luck guessing at the correct format.
 
Thanks in advance for the help,
Lynette
 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


_______________________________________________
Fez-users mailing list
Fez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fez-users



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Christiaan Kortekaas
Senior Library Systems Programmer
Library Technology Service
The University of Queensland, Australia QLD 4072
Telephone : (+61) (7) 3346 4337
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~