Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Import XML error: Empty expression! Remaining tokens: ()


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

Recommended Posts

Posted

I've built a XSLT stylesheet (GMintoFMP.xlst.txt, FileMaker.xlst.txt) that works fine when using an java XML processor. The resultant XML file (GMintoFMP.xml.txt) can be imported into FMP via the IMPORT script. But, the same stylesheets don't work within FMP. Instead, I get a dialog box that says:

Empty expression! Remaining tokens: ()

I can get the same message just when clicking on the "Specify import order" button on the Import Records script step.

Any ideas on what is triggering this? How to debug this?

Thanks for your interest and help.

C

GMintoFMP.xslt.txt

FileMaker.xslt.txt

Posted (edited)

To expand upon my initial statement...

After running the java XML processor, using these same stylesheets, the resultant XML file (GMintoFMP.xml.txt) CAN be imported properly.

The data input file is GMoutput.xml.txt

To summarize:

using java XML processor

inputDataFile: GMoutput.xml.txt

xlst: GMintoFMP.xslt.txt (including FileMaker.xlst.txt)

generatedOutput; GMintoFMP.xml.txt

using FMP8,

importDataFile: GMintoFMP.xml.txt

works fine.

using FMP8,

inputDataFile: GMoutput.xml.txt

xlst: GMintoFMP.xslt.txt (including FileMaker.xlst.txt)

Generates error.

I guess I should have zipped these files together then uploaded.

I'm confused.

Again, your help is appreciated.

GMintoFMP.xml.txt

GMintoFMP.xml.txt

GMoutput.xml.txt

Edited by Guest
Posted

Well, the beauty of somewhat complex but modular approaches when they work is that they can be reused easily. This one is using modular code to build the "FileMaker" parts of the xsl. But if they don't work, they're difficult to fix. I get an unsolvable (by me) error at this line:

The error is: XSL-element 'template' cannot contain element 'with-param' at this point

This is using the Sablotron processor, the TestXSLT application.

Basically, since you're only dealing with a few fields here, it would be easier to just build the xsl using a more basic method. Or contact the author of this stylesheet and see it he/she knows what's wrong.

Posted

Thank you very much for replying.

I did start with a simple XSLT stylesheet and digressed to the more complex thing that you've seen. The simple approach proved the template matching process that was used. Then I adapted it to the more complex split files here. The really aggrevating thing is that this convoluted thing was working. Then a few cosmetic changes were made which crashed FMP8Adv. Upon app restart, no more app crashes, but the error message is next to useless.

Is it your experience that there is no means to extract additional debug data from FMP?

You have encouraged me to try yet another XLST processor to try to see if I can step on the error.

Posted

I use the TestXSLT application for quick transformations, which is free, from http://www.entropy.ch/software/macosx/

It has some small bugs however. One of which is that the error messages popup only briefly. I like it because it integrates well with BBEdit (or TextWrangler). It can also show you html results as a web page. I sometimes use a dedicated Java XML/XSL app also. But I'm not crazy about Java interfaces and navigation.

It's hard for to me to tell just what to do with that error message, because I don't use that kind of modular abstract template parameter method. I'm sure it's useful, Mikhail Edoshin uses similar.

http://edoshin.skeletonkey.com/xmlxslt/index.html

Posted

Again, Thank you very much for your reply. I greatly appreciate your time.

Based on your previous experience I did grab another couple of XSLT processors, including the TestXSLT that you mentioned. I also noticed that OSX comes with /usr/bin/xsltproc

This application offers a debug option that details what the heck it's doing. - Just what I needed.

Within the Terminal.app, I ran the following...

[color:blue]xsltproc -v -debug -o GMout.xml.txt input.xslt inputdata.xml

It reported compilation errors at specfic lines, which I was able to address.

The bottom line is [color:red]the parameters listed below MUST be non-NULL

After making these changes, clicking on the Specify button of the script step Import Records, apparently executes the FMP XSLT processor. So one gets immediate feedback without actually having to rerun the entire script. Useful.

Originally, I did have those parameters defined. Then I reread the FMP Help section entitled "XML FMPXMLRESULT grammar" and it specifically lists these params as UNused during XML import. So, based on that I tried to get rid of them in an effort to clean up this messy stuff. So, the HELP section is wrong. & I lost track of my changes.

But you took the time to check out my error and reencourage me to take a different path. So THANKS!

I learned about the builtin xsltproc in OSX and several other XSLT processors. I also learned not to believe every Help message that I read. And, lastly, I need to keep better track of my code changes.

[color:orange]Again, Thanks a boat load.

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