July 22, 200520 yr 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
August 8, 200520 yr 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.
August 9, 200520 yr 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 ----
August 9, 200520 yr 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