NovaChan Posted December 9, 2008 Posted December 9, 2008 (edited) 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 December 10, 2008 by Guest
Osman Posted December 10, 2008 Posted December 10, 2008 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
NovaChan Posted December 10, 2008 Author Posted December 10, 2008 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.
comment Posted December 10, 2008 Posted December 10, 2008 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
NovaChan Posted December 10, 2008 Author Posted December 10, 2008 (edited) 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 December 10, 2008 by Guest
comment Posted December 10, 2008 Posted December 10, 2008 Quicker than Copy All Records? See also: http://fmforums.com/forum/showtopic.php?tid/197149/
NovaChan Posted December 10, 2008 Author Posted December 10, 2008 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).
Recommended Posts
This topic is 5825 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