DRINKME The point of this exercise is to turn a FilemakerPro (FMP) xml-export file into a plain text file that is formatted like a Toolbox dictionary file, with the Toolbox (TB) tiers in the correct order for each entry. It consists of the following files: 1. original data as exported by FMP (seven entries from the sje-wordlist concerning milk): cow.xml 2. xsl-file to transform FMP-export into an indented version for the human eye, to better be able to write the final xsl-file: dairy.xsl 3. indented data - essentially the same as cow.xml: milk.xml 4. xsl-file to transform FMP-export into a plain text file formatted like a TB dictionary file: mixer.xsl 5. result of xsl transformation, in TB dictionary format: milkshake.txt 6. example of an actual (shortened) TB dictionary file: ToolboxDicExample.txt 7. this DRINKME file 8./9. two more files for an added intermediary step trying to order elements by attribute, and for added confusion: chocolateMilk.xml spoon.xsl +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++ DISCUSSION +++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2011.11.11 - 00:26 Josh (happy 111111 corduroy day! see: http://corduroyclub.com/) es funktioniert ziemlich gut soweit, nur gibt es leider ein wesentliches Problem: die Reihenfolge der Tiers in der TB-Dict-Datei ist sehr sehr wichtig! jeder Eintrag muss mit dem TB-tag "\lx" anfangen, dann \grad, dann \u, usw. (siehe ToolboxDicExample.txt); Leere tags sind ok, und es ist auch ok, wenn ein ganzer tag fehlt. aber \u muss z.B. nach \lx kommen, und nicht davor! Also muss die Reihenfolge eingehalten werden. Jetzt die Frage: wie kann man mit xslt die Reihenfolge ändern? es gibt xsl:sort, aber das sortiert nur alphabetisch oder numerisch - und aber auch nach "qname", aber ich verstehe nicht, was "qname" (qualified names) ist. also habe ich jetzt verschiedene Transformatoren - ziemlich verwirrend!!!!, und noch hat es nicht funktioniert. Die ganze Pipeline sieht so aus, from beginning to end: cow.xml * dairy.xsl -> milk.xml (reorganizes original to be consumable) milk.xml * spoon.xsl -> chocolateMilk.xml (reorganizes and adds attribute 'TB_sortOrder' to element 'data' for sorting) chocolateMilk.xml * mixer.xsl -> milkshake.txt (the final TB dictionary result) ***Idealerweise läuft das alles mit nur einer .xsl - aber das ist vielleicht die nächste Übung*** Vielleicht funktioniert es gar nicht, da im .txt-Output gar keine Attribute vorhanden sind! Also nichts zum Sortieren! 2011.11.11 - 00:44 Josh new idea for a possible solution occurred to me while brushing my teeth: transform original xml to xml with elements named after TB tiers, then transform that into TB dictionary file. Then determining output order is easy. something like this: all kinds of stuff from FMP náhppe milking bowl ... 2011.11.11 - 14:30 Josh implemented the above idea, seems to work! now streamline everything.