Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XSL Mysteriously Crashing FMP

Featured Replies

I am trying to concatenate large sets of ID's into one return-delimited value. To do this, I'm exporting the records in XML format and then using a stylesheet to collapse all the rows into one record upon import.

The transformation works fine using my trial copy of oXygen XML Editor, but FileMaker is crashing every time I try importing through the stylesheet. oXygen will give me the transformation results and that XML imports into FMP without a problem. I have oXygen using the Xalan processor, which is what I understand FMP is using.

Can anyone shed some light on this? I am stumped. I've included samples of the exported data, the stylesheet, and the transformation results from oXygen. Thanks in advance.

PS - Here's a copy of the xsl in case you want a peek before downloading the file:

< ?xml version="1.0" encoding="UTF-8"? >



	version="1.0"

	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

	xmlns:fmp="http://www.filemaker.com/fmpxmlresult"

	exclude-result-prefixes="fmp">

	

	

	

	

		

	

	_km_APUIDs

	

	

	

	



	

	

	

	

		

			0

			

			

			

				

					

						

					

				

			

			

					

						

							

								

							

						

					

			

		

	

	

	

	

		

			

			

		

	

XSL_Code_and_Data.zip

Edited by Guest

As I understand you want to import "data transformed in oXygen" file into filemaker using "concatenate.xslt" stylesheet.

I tried and it gives error first. Then I delete spaces from variable definition part as below. It import record without problem.

	

	_km_APUIDs

	

	

	

---

F. Osman Cabi

  • Author

Actually, I am exporting data.xml and then trying to import it using concatenate.xsl. The other file, "data transformed in oXygen.xml" shows what I expect the stylesheet output to be (what FileMaker will ultimately be importing).

I actually didn't have any trouble importing the "data transformed file", but I'll take a look at the spaces like you mentioned.

I'm still at a loss on how to get concatenate.xsl to work on data.xml during import.

It crashed here too. Then I noticed that the stylesheet file is encoded in UTF-16. After I changed it to UTF-8 (as it declares itself to be), I was able to use it in importing the exported data.

Off topic, but this seems like a REALLY roundabout way of going about it.

concatenate.xslt.zip

  • Author

Thanks comment! I was storing the text as a layout object and FMP is exporting it as UTF-16. Good to know. I just made the stylesheet declare itself to be UTF-16 and now it's working.

This isn't the first time someone's questioned my rationale for this method. The simple reason is that it's lightning quick. This report could be used for as many as 1000 records. Other methods that I tested, such as a looping script or recursive/non-recursive custom function were just too slow across that large of a foundset.

Edited by Guest

Quicker than Copy All Records?

See also:

http://fmforums.com/forum/showtopic.php?tid/197149/

  • Author

I hadn't seriously considered Copy All Records because this script will be pulling ID's from multiple sources. I didn't want to create a new layout for each new table occurrence it pulls from. I suppose I could create a sort of master layout for copying records from, but that would probably require another table occurrence group and some alternating keys.

Thanks for mentioning Agnes' approach. That is wild. I'll have to play with that some more to see how practical it is for my situation. It's certainly an interesting puzzle to deconstruct sometime.

Thanks again for your suggestions. Further comment is always welcome (no pun intended).

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.