12 Replies Latest reply on Sep 12, 2013 6:43 PM by Malcolm

    Calculated XSL file path produces a SAXParseException

    Malcolm

      Summary

      Calculated XSL file path produces a SAXParseException

      Product

      FileMaker Pro

      Version

      11.0.3

      Operating system version

      Mac OS X 10.6.8

      Description of the issue

      We cannot write portable code for sharing XSL export rules.

      Steps to reproduce the problem

      I have a file stored in a folder within extensions that contains XSL code. When I hardcode the path to this file using the "File" option the SAX parser is happy. The file path is displayed in the file path dialog box.

      If I try to create a calculated version of this path the SAX parser throws an error.

      This occurs even when the calculation I use is the exact text string used in the "file" option is copied from the file path dialog box.

      Expected result

      The SAX parser should accept the calculated file path

      Actual result

      The SAX parser throws an error whenever a calculated result is used.

      Exact text of any error message(s) that appear

      SAXParseException: unable to determine file base pathname (Occurred in an unknown entity, at line 0, column 0.)

        • 1. Re: Calculated XSL file path produces a SAXParseException
          JohnDCCIU

               Same thing is still happening in FileMaker 12.0v4, now running on OS X 10.8.3.

               Bugfix please?

          • 2. Re: Calculated XSL file path produces a SAXParseException
            philmodjunk

                 When a report is more than a year old like this, it, unfortunately, no longer pops up in Recent Items and since no TS person is subscribed to this thread, they are likely not to see any additional comments posted to it. I suggest starting a new thread and including a link to this one in your post so that it has more visibility.

            • 3. Re: Calculated XSL file path produces a SAXParseException
              TSGal

                   Malcolm Fitzgerald and JohnDCCIU:

                   Thank you for your posts.

                   First, a long overdue apology to Malcolm Fitzgerald as his original post went unnoticed.

                   This issue has not been reported, so I have sent this information to our Development and Testing departments for review.  I am now subscribed to this post, and as information becomes available to me, I will post here.

                   TSGal
                   FileMaker, Inc.

              • 4. Re: Calculated XSL file path produces a SAXParseException
                TSGal

                     Malcolm Fitzgerald and John DCCIU:

                     The initial report is that this should work.  Make sure you have the correct path set up for Mac and Windows.

                     For Mac OS: /Volumes/VolumeName/directoryName/fileName

                     For Windows: driveletter:/directoryName/fileName

                     What is the calculation formula being referenced in the file path?

                     TSGal
                     FileMaker, Inc.

                      

                • 5. Re: Calculated XSL file path produces a SAXParseException
                  JohnDCCIU

                       Thanks for the reply, TSGal!

                       For my original tests, I used the documented (in the Specify Output File dialog itself) format (i.e. "filemac:/volumeName/directoryName/fileName" or "filewin:/driveletter:/directoryName/fileName"), stored in a local script variable, with the script variable entered in the Specify Output File dialog.  When doing it that way, the SAX parser throws the error:

                  SAXParseException: unable to determine file base pathname (Occurred in an unknown entity, at line 0, column 0.)

                       I tried the path format that you mentioned on Mac OS X, using a variety of paths:

                       /Volumes/Macintosh HD/Users/johnd/Desktop/testFile.txt

                       /Volumes/Macintosh%20HD/Users/johnd/Desktop/testFile.txt

                       /testFile.txt

                       /Users/johnd/Desktop/testFile.txt

                       ~/testFile.txt

                       For any of those new test paths on OS X, I get a new error:  

                  "testFile.txt" could not be created on this disk.  Use a different name, make more room on the disk, unlock it or use a different disk.

                       Just to see if using a script variable to hold the path was the issue, I then tried entering the path statically in the Specify Output File dialog.  It always prepended "file:" before the static path, but it also threw the same error.  I then tried statically entering some "filemac:" paths, but they all did the same thing.

                       The only commonality with all this is that all these same scenarios work perfectly with the XSL Style Sheet is specified using the "File" option (with a phsyical file on disk that contains the XSL).  When the XSL Style Sheet is specified using the "HTTP request" or "Calculation"  options, it throws this error.

                       Thanks,
                       John

                  • 6. Re: Calculated XSL file path produces a SAXParseException
                    Malcolm

                         I'll have to find the database and materials I was using to follow this up.

                    • 7. Re: Calculated XSL file path produces a SAXParseException
                      TSGal

                           JohnDCCIU:

                           Thanks for the information.

                           For clarification, you need to use the full filepathin the calculation.  That would be:

                           /Volume/VolumeName/directory/fileName

                           If the file is located in the directory path:   /Level1/Level2/testfile.txt, located on the Sub2 volume of the mounted server Master, the full path would be:

                           /Master/Sub2/Level1/Level2/testfile.txt

                           If you are on a local drive, then it would be:

                           /Hard drive/folder1/folder2/.../fileName

                           Looking at your examples above, it would be:

                           /Macintosh HD/Users/johnd/Desktop/testfile.txt

                           I'm not familiar enough with PHP, so the space in "Macintosh HD" may need %20.

                           Please continue to keep me updated.

                           TSGal
                           FileMaker, Inc.

                      • 8. Re: Calculated XSL file path produces a SAXParseException
                        JohnDCCIU

                             TSGal,

                             Thanks for the continuing followup.

                             I tried using:

                             /Macintosh HD/Users/johnd/Desktop/testfile.txt

                                and

                             /Macintosh%20HD/Users/johnd/Desktop/testfile.txt

                             Using either of those paths resulted in the original error dialog:

                                  SAXParseException: unable to determine file base pathname (Occurred in an unknown entity, at line 0, column 0.)

                             Just to reiterate my take on this:  it doesn't have much to do with the file paths.  These same failing file paths work perfectly....when the XSL is provided in a physical file specified using the "File:" option in the XSL Option.  The problem occurs when the XSL Style Sheet is specified using the "HTTP request" or "Calculation"  options....with exactly the same file path specified.

                             IMO, the error dialogs are the result of a bug wherein the calculated XSL is unable to get the filepath properly for whatever reason.  If the XSL is provided in a static file, then the problem doesn't occur.

                             Thanks,

                             John

                        • 9. Re: Calculated XSL file path produces a SAXParseException
                          Malcolm

                               Yes, I want to re-affirm this point.

                               If you look at "Steps to Reproduce the Problem" in my original post you'll see

                               

                                    I have a file stored in a folder within extensions that contains XSL code. When I hardcode the path to this file using the "File" option the SAX parser is happy. The file path is displayed in the file path dialog box.

                                    If I try to create a calculated version of this path the SAX parser throws an error.

                                    This occurs even when the calculation I use is the exact text string used in the "file" option is copied from the file path dialog box.

                                

                          • 10. Re: Calculated XSL file path produces a SAXParseException
                            TSGal

                                 Malcolm Fitzgerald and JohnDCCIU:

                                 Sorry for the late reply.  Although I can use the XML calculation, I am also encountering the same issue with calculating the XSL location.  I have forwarded your posts along with my findings to our Development and Testing departments for review.  I'll keep you posted.

                                 TSGal
                                 FileMaker, Inc.

                            • 11. Re: Calculated XSL file path produces a SAXParseException
                              TSGal

                                   Malcolm Fitzgerald and JohnDCCIU:

                                   I was able to get this to work with the following:

                                   I created a global field,  g_Path, to store the entire path.  In my instance, I entered into g_Path:

                                   Volumes/Macintosh HD/Users/TSGal/form.xsl

                                   In my Export (XML) script step, I used an XSL style sheet, and set the Calculation to reference g_Path.  This works.

                                   I then put the path into a variable, and this works referencing the variable.

                                   The key here is to not have a slash preceding "Voumes".

                                   TSGal
                                   FileMaker, Inc.

                              • 12. Re: Calculated XSL file path produces a SAXParseException
                                Malcolm

                                     Is it correct to say that you are able to pass a path via a calculation. That the path may be stored in a field or it may be stored in a variable. The path must be the full path name, describing all folders from the root directory. However, the path must not include the leading slash.

                                     Is it possible to use a string in the calculation engine?

                                     Being forced to strip the leading slash is counter intuitive. The result is a relative reference. Will this be regarded as a bug? If not, please raise a bug for the help/documentation as this unusual usage needs to be documented.