Jump to content
Server Maintenance This Week. ×

XML import problem (xslt looks fine)


domb

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

Recommended Posts

Hello,

I would like to import a XML file in Filemaker. So I created with the help of this link and this wonderfull template: http://edoshin.skeletonkey.com/2005/10/use_modular_xsl.html a xslt file to convert to FMXMLRESULT syntax.

It seems to work as I don't have any error messages but the import still doesn't work (0 record imported) for an unknown reason.

Attached to this message is a zip with the 4 necessary files:

- Medindex.fp7 --> the filemaker database in which I wish to import the XML data

- Medindex_Product.xslt and FileMaker.xslt --> files needed for the conversion to FMXMLRESULT syntax

- DownloadMedindexProduct.out.xml --> an extract of the xml file I wish to import

Can someone with knowledge in xml import and xslt help ?

Thanks

import_XML.zip

Edited by Guest
Link to comment
Share on other sites

Hi and thank you very much for your help. It works well now !

I still have a question: in the XML file, there are some tags that appears many times for the same base tag. Example: in my XML file, tag "PRDNO" is the unique ID number for a product. A product can have many "composition items" represented by the "PRDCOMP" tag.

Of course, so that I can reproduce the link between a Product table and a Product_Composition table in Filemaker, I have to import the content of tag "PRDCOMP" in another table which I am now able to do.

BUT how do I import also the PRDNO in this table so that I can link these to my products ?

I tried to modify the xslt code but it doesn't work (see attached file)

Product_Composition.xsl.zip

Edited by Guest
Link to comment
Share on other sites

Hello again,

With you help I was able to import most of my XML files into Filemaker and everything is working smoothly.

I still have one problem with one XML file whose syntax is quite different than the others.

I don't understand its structure very well (specially the at the end).

It is supposed to be text describing products. The product is linked to the text by the MONID number.

- each "KMP" element has its unique identifier MONID

- each "KMP" element has a type of documentation MONTYPE

- each "KMP" element has its language identifier LANG

- each "KMP" element contains text subdivised by sections (header, paragraph, footer)

With my xslt creation tentative I am able to import parts of the XML file but not all of it (not all paragraphs and not the MONTYPE, LANG items for instance).

In the attached file, I have put also the xsd file for the xml file to help the understanding of the structure.

Can you help me again ?

Edited by Guest
Link to comment
Share on other sites

Neither the modid or version is inside a p, so that is not needed. To copy all the paragraphs, you could use this:

But it is a large block of text, with some returns, with some repetition. Perhaps could be done with more organization.

Link to comment
Share on other sites

Hi,

This works but as you said it imports all the text into one field in a rather "brute" formatting.

I have noticed that each paragraph has got a name and id number. Is it possible to go after each paragraph number to put each one of them into another field ?

That would clean a little bit the text and be fine for me

Something like:

….

Link to comment
Share on other sites

This topic is 5213 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.