Newbies tium Posted July 22, 2005 Newbies Posted July 22, 2005 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
Newbies tium Posted August 8, 2005 Author Newbies Posted August 8, 2005 Is there really no one that can help me ?
Fenton Posted August 8, 2005 Posted August 8, 2005 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.
Newbies tium Posted August 9, 2005 Author Newbies Posted August 9, 2005 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 ----
Fenton Posted August 9, 2005 Posted August 9, 2005 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
Recommended Posts
This topic is 7046 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