Simon K Posted November 22, 2007 Posted November 22, 2007 Hi everyone, I have a very short xml file see below - it seems a really good one to start with - I know I have to have an xslt file to work with this to convert it to fmpxmlresult grammar. Are there any guides on how to write the xslt? Many thanks XML example as follows: − −
Fenton Posted November 22, 2007 Posted November 22, 2007 That one is pretty simple. They've put the data into "attributes" (name="value") in the Item "element." <?xml version="1.0" encoding="utf-8"?> 0 0
Fenton Posted November 22, 2007 Posted November 22, 2007 (edited) P.S. You don't really need the "count()" stuff, for the number of records. Nor do you need the fancy MODID or RECORDID attribute counts. FileMaker is happy to import them if they're blank, or whatever number, as long as the attribute is there. So, a simpler alternative xsl for the same thing, Oh, one thing. The <?xml version="1.0"?> element, with the optional encoding attribute, must be absolutely the 1st thing in the file, no spaces before it or nothin'. <?xml version="1.0" encoding="utf-8"?> 0 Edited November 22, 2007 by Guest
Simon K Posted November 22, 2007 Author Posted November 22, 2007 Hi Fenton, Thank you for the quick response. I am very grateful. Do I need to just copy and paste your code into a "notepad" file and save with an xsl extension? (Sorry to be so dense) Simon
Fenton Posted November 22, 2007 Posted November 22, 2007 No, I'll attach a file. If you look carefully at the example code I pasted into the post, you will see that the PHP engine of the forum has screwed it up. If I enclose it with a "code" tag (1st post), then it drops the "?>" end of the xml declaration. If I don't enclose it with a a "code" tag, it translates the ">" at the end of the "for-each" line into "&g t;". Either of these would stop it from validating or working as an xsl file. That is why I suggested attaching your xml file. Except for the simplest xml, it is impossible to post it directly without it getting subtly screwed up. Which doesn't help a beginner much. Download the attached file instead. PCML_2.xsl.zip
Simon K Posted November 22, 2007 Author Posted November 22, 2007 Hi Fenton, Have been having a go with this - doing pretty well (up to a point!) Did actually make a manual import work - ie up to the point where you had to match the XML fields up to target fields so fantastic. BUT absolutely no luck in a script with an import message is as follows: "XML Parsing error An exception occured Type: NetAccessorException Message: Could not open file {0} Line no 0 columnn no 0" And this was after it had worked on a manual import? Any clues? Cheers Simon
Simon K Posted November 22, 2007 Author Posted November 22, 2007 Fenton, Sorry I hadn't seen your last post - will have a go with your downloaded file first Many thanks
Simon K Posted November 22, 2007 Author Posted November 22, 2007 Hi Still no luck - its like filemaker can't read the path (in a code sense) Simon
Simon K Posted November 22, 2007 Author Posted November 22, 2007 Hi guys Fenton, thank you for all your help earlier. No matter what I try to do to solve the probem (including stopping and restarting server, closing databases etc) ...When I try and do a direct import or a scripted import all I get is the error message: "XML Parsing error An exception occured Type: NetAccessorException Message: Could not open file {0} Line no 0 columnn no 0" Do you or anybody else have any clue what to do about this - I am sure that the everything else would work - if it could only deal with this error Many thanks Simon
Recommended Posts
This topic is 6209 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