marie k Posted June 21, 2009 Posted June 21, 2009 I am not so good in making XSLT files, maybe someone can help me to translate the file below to filemaker 9 or know where i can find information how to do this file. <?xml version="1.0" encoding="utf-8"?> Edinburgh University Press y.y x.x 20090618 eng T40 02 02 0748621237 03 9780748621231 15 9780748621231 BB Traditions in World Cinema 01 African Filmmaking North and South of the Sahara 1 A01 Armes, Roy Prof. Roy Armes Emeritus Professor of Film Middlesex University
comment Posted June 21, 2009 Posted June 21, 2009 You need to tell us which data you want to import, into which fields. BTW, your example is NOT a valid XML document: the "contributor" element is missing a closing tag.
marie k Posted June 21, 2009 Author Posted June 21, 2009 Hello, The file below should now be complete. 9780748621231 to field isbn13 in out filemaker program Traditions in World Cinema to field title Armes to field author The file containing more tags i origional but hopefuly i can do this by my own if You help me how to start the one´s above. Thank You for taking Your time! / marie <?xml version="1.0" encoding="utf-8"?> Edinburgh University Press Catriona Murray [email protected] 20090618 eng T40 02 02 0748621237 03 9780748621231 15 9780748621231 BB Traditions in World Cinema 01 African Filmmaking North and South of the Sahara 1 A01 Armes, Roy Prof. Roy Armes Emeritus Professor of Film Middlesex University Roy Armes is Emeritus Professor of Film at Middlesex University and author of numerous books on cinema including Arab and African Film Making (with Lizbeth Malkmus), Dictionary of North African Film Makers, and Postcolonial Images: Studies in North African Film. His work has been translated into 13 languages, including Japanese, Chinese and Arabic.
comment Posted June 21, 2009 Posted June 21, 2009 It would be better if you zipped and attached the entire document. Filemaker will not import your shortened version because it doesn't pass validation against the DTD specified in the DOCTYPE declaration. Another issue is the ISBN13. There are 3 'productidentifier' elements, and each has its own 'b244' tag. They are distinguished by the 'b221' tag, which I presume to be a type ID. AFAICT, both type "03" and "15" contain the ISBN13 code - so you'll need to specify which one to pick (in the attached stylesheet, I have picked type "15"). Hopefully the attached will work for you once you run it against the full XML source. Otherwise you'll have to remove the DOCTYPE declaration from the source. Import.xsl.zip
marie k Posted June 21, 2009 Author Posted June 21, 2009 Hello again. I have now added a zipfile with the whole original file. It´s ok to use 15 for isbn13. Thank´s again / marie edin180609.xml.zip
comment Posted June 21, 2009 Posted June 21, 2009 (edited) I am afraid that too doesn't pass validation against the DTD. I am not sure if the blame lies with the document or with the DTD - I rather suspect both. You should contact the source of the data and advise them of the problem. Meanwhile you can work around the issue by removing the DOCTYPE declaration from the source document, or by processing it with some external XSLT processor (you'd have to perform tests to find one that doesn't validate), then importing the result directly into Filemaker. --- P.S. Not that it matters much in the circumstances, but the source filename must have .xml extension! Edited June 21, 2009 by Guest
marie k Posted June 21, 2009 Author Posted June 21, 2009 Hello again, I don´t know what you mean with DOCTYPE. How do I remove the DOCTYPE declaration from the source document? /Marie
marie k Posted June 24, 2009 Author Posted June 24, 2009 Hello again, I have tried all the things you have suggested without success. What do you think about converting the XML-files to CSV-file and import this fiel into Filemaker? I have tried different transformer from XML to CSV but they split the information into different categories. I want all the information on one row. I hope you have time to help me. /Marie
comment Posted June 24, 2009 Posted June 24, 2009 I am not sure what you did. If I remove the DOCTYPE declaration from your previously posted source file, Filemaker imports it without a hitch using the stylesheet I have posted earlier (I am attaching both these files, so you can try it yourself). Simlarly, if I process your original source file using my stylesheet in an external XSLT processor, I can then import the result directly into Filemaker (since it is already transformed into Filemaker's FMPXMLRESULT grammar, no stylesheet is required for the import). Archive.zip
marie k Posted June 26, 2009 Author Posted June 26, 2009 Hello Again, Thank You for Your help, the file works fine now but may I have You help again We need to extract row j151 and the only unique row i have is row j152 wich always have value GBP in the file´s we will import. Can You Please help me? PROF 02 PROF 38.95 USD US 20090621 02 PROF 02 PROF 21.00 GBP GB Z 0 21.00 0 20090621 02 PROF 02 PROF 31.00 EUR GB 20090621 02 PROF 02 PROF 31.00 EUR GB 20090621
comment Posted June 26, 2009 Posted June 26, 2009 I am not sure what j152 has to do with this. Why can't you simply import j151? NOTE: Please do not post partial code. There's no way I could have seen from that snippet that the element is a child of , and that is a child of . These details are crucial, as you can see in the modified stylesheet. Stylesheet.xsl.zip
marie k Posted June 27, 2009 Author Posted June 27, 2009 Hello, Thank You for Your help again. The file works fine now. Do You have time to help me with another thing. I need to import 1 Gandhi, Monica and 3 Caughey, Aaron B to the same tag with ";"separation (Gandhi, Monica;Caughey, Aaron . The name of the tag will be "totauthor" 01 blueprints Clinical Cases in Medicine 1 A01 Gandhi, Monica Monica Gandhi 2 A01 Gandhi, Monica Oliver bacon 3 A01 Caughey, Aaron B Aaron B Caughey 01 eng
comment Posted June 27, 2009 Posted June 27, 2009 I have done this using the same "ModifiedSource.xml" document as the source. I don't know how well this will work with the document you're quoting, which is completely different. Did you miss this part in my previous message? Please do not post partial code. Stylesheet.xsl.zip
marie k Posted July 2, 2009 Author Posted July 2, 2009 Hello again, Tank You for Yor last file it works well. We import the value from b037 to author. I have enclosed a xsl file and also a xml file. Sometimes we miss a value in tag . Is it possible to import from tag to author when we do so? /Marie Stylesheet0702.zip xx.zip
marie k Posted July 3, 2009 Author Posted July 3, 2009 Hello again, Thank You for Your last file it works well as usual. I will import different files to my database and sometimes containing tag a "." . I will use this value in a calculation so I need to change to a "," . Some of the files have a "," in origional so I do not need to change the value. Do You have time to help me? / Marie
comment Posted July 3, 2009 Posted July 3, 2009 I am afraid I don't understand your question. Do you mean changing the decimal point to a comma?
marie k Posted July 4, 2009 Author Posted July 4, 2009 Hello again..... I need Your help again. Is it possible for the system to write "Definitivt slut" if = OI and "Tillgänglig" if = IP and "Slut" if = OP /Marie
marie k Posted July 4, 2009 Author Posted July 4, 2009 Hello again..... I need Your help again. Is it possible for the system to write "Definitivt slut" if = OI and "Tillgänglig" if = IP and "Slut" if = OP /Marie Stylesheet0702.zip
comment Posted July 4, 2009 Posted July 4, 2009 It's possible, and I think by now you should be able to do this yourself by using the element: http://www.w3schools.com/xsl/xsl_choose.asp
marie k Posted July 4, 2009 Author Posted July 4, 2009 Ok! Thank You for all help. I hope i can comeback if i do not solve it : Marie
comment Posted July 4, 2009 Posted July 4, 2009 I hope you will come back and report mission accomplished. :
marie k Posted July 5, 2009 Author Posted July 5, 2009 I am sorry but i have to report mission failed. I have tried with the following without success. Can You Please assist me? : / Marie
comment Posted July 5, 2009 Posted July 5, 2009 I see two problems here: 1. in the test, the text constant "eng" must be quoted; 2. The result needs to be the contents of the DATA element - not a new LanguageCode element: Engelska ... Or: ...
marie k Posted July 8, 2009 Author Posted July 8, 2009 Hello again, I have tried to make a new xslt file but the file do not work. Filemaker show´s that nothing is avaliable to import. Can You Please help me? test0708.zip stylesheet0708.xsl.zip
marie k Posted July 8, 2009 Author Posted July 8, 2009 Sorry, Find the right xml enclosed Marie test0708.zip
comment Posted July 8, 2009 Posted July 8, 2009 XML is case-sensitive: "ONIXmessage" is not the same as "ONIXMessage", and "product" is not the same as "Product".
marie k Posted July 8, 2009 Author Posted July 8, 2009 Hello again, I have tried with below but it still not working, Have You Please an idea? / Marie <?xml version="1.0" encoding="UTF-8"?> 0
comment Posted July 8, 2009 Posted July 8, 2009 I don't see closing tags for template and stylesheet.
marie k Posted July 8, 2009 Author Posted July 8, 2009 Hello again! Now the file works fine Thank´s Marie
marie k Posted March 19, 2010 Author Posted March 19, 2010 Will there be any way to exclude "" from the xml file. Now i have to load the xml file into a wordprogram and delete the row and after that import the file to filemaker <?xml version="1.0" encoding="utf-8"?> Edinburgh University Press y.y x.x 20090618 eng T40 02 02 0748621237 03 9780748621231 15 9780748621231 BB Traditions in World Cinema 01 African Filmmaking North and South of the Sahara 1 A01 Armes, Roy Prof. Roy Armes Emeritus Professor of Film Middlesex University
comment Posted March 19, 2010 Posted March 19, 2010 I believe this was discussed at the beginning of this thread, 9 months ago.
Recommended Posts
This topic is 2931 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