d'Artagnan Posted December 5, 2010 Posted December 5, 2010 Hey Guys, after trying to search some information about my problem, I give up and post this. The search-algorithm wants at least 4 characters in EVERY word you are searching for ... so I can't search for 'xsl', '2.0', etc. ... so I have to open the new topic, hopefully I'm not spamming ... I'm trying to import XML-Data into FileMaker 11 with an 'xsl' or 'xslt'. Of course that works. But when I use xsl 2.0-functions, I only get an error-message from FM. :-/ I did not yet tried to export with an 'xsl', because first I need to get the data in. I didn't found anything useful with the help of google. So my question: Is FileMaker not supporting xsl 2.0 (http://www.w3.org/TR/xslt20/) ? Hopefully you can answer me (with a 'yes, it is supporting it' I hope). Thank you very much! Ciao! d'Artagnan BTW: the button 'Preview Post' is just linking to the mainpage of the forum ... !?!
comment Posted December 5, 2010 Posted December 5, 2010 Hopefully you can answer me (with a 'yes, it is supporting it' I hope). Unfortunately, the answer is "no".
d'Artagnan Posted December 5, 2010 Author Posted December 5, 2010 Unfortunately, the answer is "no". Hey! Thank you for the fast answer ... 'no' ... but that is not possible! How that? (OK, this wasn't a qualified question). Do you know, if there is a workaround, something like that? It would be a hugh disadvantage for FM! Is there a possibility to change the engine, which is interpreting the code? Thank you very much. D'Artagnan
comment Posted December 5, 2010 Posted December 5, 2010 Is there a possibility to change the engine I don't think so - the engine (Xalan-C) is inside the application bundle. It would be a hugh disadvantage for FM! It is. If you need this badly, you could do your own processing using AppleScript (Mac OS X only) or a plugin such as ScriptMaster from 360Works.
d'Artagnan Posted December 6, 2010 Author Posted December 6, 2010 Hey! OK, thank you very much for the quick answers. So I will see, how to manage this problem. Ciao! D'Artagnan
comment Posted December 6, 2010 Posted December 6, 2010 What exactly are you trying to do? There are not many things that cannot be accomplished in XSL 1.0, albeit with more coding.
d'Artagnan Posted December 6, 2010 Author Posted December 6, 2010 What exactly are you trying to do? There are not many things that cannot be accomplished in XSL 1.0, albeit with more coding. I'd like to use 'tokenize()' ... I know, perhaps it could be accomplished in XSL 1.0 ... that's one of the things, I am checking right now ... the problem is, I need it for 3 different strings and I have the impression, that it would mess up the code terribly ... ;-) So the other thing to check is, if there is a way to transform a lot of XMLs in a folder using a xsl 2.0-transformation ... right now I am checking this. I found the 'XSL transformation 1.0' for the automator, but it also does not support the xsl 2.0 ... Perhaps I find something else ... it would be a workaround, I could live with for that (one) export ... Greetings d'Artagnan
comment Posted December 6, 2010 Posted December 6, 2010 I'd like to use 'tokenize()' ... I know, perhaps it could be accomplished in XSL 1.0 It can - see, for example: http://stackoverflow.com/questions/1018974/tokenizing-and-sorting-with-xslt-1-0 the problem is, I need it for 3 different strings and I have the impression, that it would mess up the code terribly Not necessarily. You write it once as a template, then call it with different parameters - very similar to using a function.
d'Artagnan Posted December 6, 2010 Author Posted December 6, 2010 It can - see, for example: http://stackoverflow.com/questions/1018974/tokenizing-and-sorting-with-xslt-1-0 Yeah, I've already found that, but when I tried it (copy & paste the code), the output is this: <token>strawberry</token> <token>blueberry</token> ... But I'm not such a good in xsl ... so I haven't found a way to access the tokens directly ... for example only the entry '5' ... Not necessarily. You write it once as a template, then call it with different parameters - very similar to using a function. I know, but I wanted to explain, that I need a way to get the entries one by one ... and not (like I found often) something like a loop-template, which goes through the string, separates every token and do something with every token separately, etc. ... simple syntax: for i from 1 to 1000{ string1[ i ] string2[ i ] string3[ i ] } actually I have the string separated by ';' and I need to access it - in xsl 2.0 it looks like that: <xsl:value-of select="tokenize('one;two;three;four;five', ';')[3]"/> output: three Perhaps you can help me adapt the xsl-1.0-script, Thanks! d'Artagnan
d'Artagnan Posted December 6, 2010 Author Posted December 6, 2010 You know what? I guess, there is no way to do the direct access ... I thought, the <token>-tag is a special (reserved) xsl-tag, the script could easier work with ... but now I think, I have just to adapt the template to take a third variable and print out only the asked entry ... I will do that, it is not so complicated ... I just thought, there is a way to work with it without changing the template ... Thank you. d'Artagnan
comment Posted December 6, 2010 Posted December 6, 2010 I haven't found a way to access the tokens directly To address tokens this way, you must turn them into a node set. This can be done by using the Xalan extension function nodeset() or (FMP v.11 only) the EXSLT function node-set(). Another option is to write a template to get the specified token directly, something like: <xsl:template name="GetNthToken"> <xsl:param name="text"/> <xsl:param name="delim"/> <xsl:param name="n"/> ... This would then call itself recursively until reaching the n-th iteration.
Recommended Posts
This topic is 5100 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