polarpro Posted February 1, 2010 Posted February 1, 2010 Hey there, I am trying to import data from a German library format ("MABxml") via XML into my FileMaker solution. The original format uses fields and subfields, but it seems that this is a problem I've solved; the import works fine. However, the original format also uses the same field multiple times with different values. In the attached xml-file it is field #902 that appears twice in one of the records. I cannot find a way to solve this; ideally, the result would be that the import delivers field #902 with two values. Or do I need to merge this fields first, before importing? Any hint is appreciated. Mike DNB_Field_902_twice.xml.zip DNB_Field_902_twice.xsl.zip
comment Posted February 1, 2010 Posted February 1, 2010 (edited) ideally, the result would be that the import delivers field #902 with two values. Ideally, multiple values would be imported as individual records into a related table. But if you want to stick them into the same field, try: ... ... Edited February 1, 2010 by Guest
polarpro Posted February 2, 2010 Author Posted February 2, 2010 Thank you very much! Works very well. Ideally, multiple values would be imported as individual records into a related table. Not sure if this is necessary in this case. I have to merge certain fields anyway, as the structure of my Filemaker file is much simpler than the original format. The only annoying thing that is left at the moment is that the original format uses multiple attributes, e.g. saint dictionary So, I am running into the problem of not being able to tell Filemaker the difference. I tried simply ... ... ... ... ... but this seems to be not the way to do it. I'd be grateful for advice.
comment Posted February 2, 2010 Posted February 2, 2010 I am not sure what's necessary either - but I do know that ideally it's one fact per field. the original format uses multiple attributes Try: ... Note: In the METADATA section, you can name your fields whatever you like.
polarpro Posted February 2, 2010 Author Posted February 2, 2010 Hey comment, Thanks so much for this! Works exellently. Mike
polarpro Posted February 3, 2010 Author Posted February 3, 2010 ...one more thing to mention: In my first message I stated that the subfield issue seems to be solved with the way I wrote the XSLT: ... ... I found out that this is not quite true. In case an element and its subelements are completely missing the order of the following elements gets messed up. What works though is this way here: ... ... Attached are the two XSLTs, in case anybody wants to try... As I can only attach two files per message, here is the XML I tried the attached XSLTs with: <?xml version="1.0" ?> green yellow blue white Cat Rose Dog Lilly Sunflower (Background: The bibliographic records I got from a library have many empty fields. In case a field is empty, the record does not show the element at all.) Missing_Subfields_xslt_bad.xsl.zip Missing_Subfields_xslt_good.xsl.zip
Recommended Posts
This topic is 5748 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now