Jump to content

Transforming from XML to Filemaker


marie k

This topic is 2645 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by Guest
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 8 months later...

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

Link to comment
Share on other sites

This topic is 2645 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.