Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

xml/xslt import problem

Featured Replies

  • Newbies

Hi all,

I'm developping xslt filters to import file from the ganttproject application (http://ganttproject.sf.net). But when I try to import a ganttproject file (which is actually an xml file) I got an error message claiming that xml/xslt data are insuffisant.

Here is my filter (shorted);)


<?xml version="1.0" encoding="ISO-8859-1"?>







xmlns:xsl="http://www.w3.org/1999/XSL/Transform">







	



		



			0



			



			



			



			



		



	







	



		



			



			



			



			



		



	







	



		



		



			



			



			



			



			



			



			



			



		



		



	



	



	



If someone can help me to detect what's wrong ...

Regards

  • 3 weeks later...
  • Author
  • Newbies

Is there really no one that can help me ?

There may or may not be problems with your xsl file. It validates fine however. But to test with FileMaker we would also need an example of the xml file. Do you have one you can post? I could create it from scratch, looking at the xsl, but that wouldn't be a very good test.

  • Author
  • Newbies

thanks for your help, here come an example file:

-------------

<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet type="text/xsl" href="gan2.xsl"?>

Test

----

A couple of things. Subtle. Your "called" templates don't need a match. Because they are just matching the root. Because all 3 templates are matching the root, and because of the "all-at-once" way that templates operate (as opposed to the "one-at-a-time" way of "for-each")* they are effectively overwriting each other. All you end up with is the last one, the RESULTSET and its data. No DATABASE, no METADATA. That would OK if all you were doing was getting the data out as text, but not for importing into FileMaker.

Another little glitch is that the FileMaker "namespace" doesn't get associated with each of the elements if you just put it in the RESULTSET element. So I put it up into the stylesheet namespaces. The result seems to look the same to me, but FileMaker complained when I tried to import it otherwise (could be my mistake).

One last thing, which really doesn't matter to FileMaker, as it Imports fine anyway, but seems to matter to stylesheet writers, is things like Records count, ModID and RecordID, etc., which everyone wants to count. I find that you can just leave this stuff blank, 'cause FileMaker seems to ignore it. But, if it's there it should not the be "@id" attribute of your xml file, I wouldn't think. I uses blank for the ModID and "position()" for the RecordID (number).

*This is my own rather pathetic attempt to point out the difference between the 2 basic methods.

The xsl:

<?xml version="1.0" encoding="ISO-8859-1"?>

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns="http://www.filemaker.com/fmpxmlresult">

0

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.