Subject:How to call template in imported xslt from the graphical view Author:David Karr Date:31 Oct 2005 05:35 PM
How do I insert a transform function that calls a template in an imported xslt? I'm trying to use the EXSLT, and this just requires importing a stylesheet and then calling a template. I can see how it's done in raw XSLT, but I don't see how to do this in the graphical view.
The "Call Template" option seems to only be for registered Java classes.
Subject:How to call template in imported xslt from the graphical view Author:David Karr Date:31 Oct 2005 05:50 PM
I misspoke on one point. I realized later that the "call-template" menu refers to templates defined inside the xsl, not Java functions. However, it doesn't provide access to templates defined in imported xslts, which is what I'm trying to do.
Subject:How to call template in imported xslt from the graphical view Author:David Karr Date:31 Oct 2005 06:10 PM
Hmm, well, I guess I failed to properly import the function library. I copied the top-level exslt xsl, but not the functions directory. Once I had all the referenced files, the templates from the imported xslt showed up fine. I wish there was some way to know that the import had not been fully resolved yet.
Subject:How to call template in imported xslt from the graphical view Author:Ivan Pedruzzi Date:31 Oct 2005 06:10 PM
It should, I am running 377o and works fine for me.
I just added <xsl:import href="mylib.xsl"/> in the code panel and I can see all named templates in the pop-up menu
Subject:How to call template in imported xslt from the graphical view Author:David Karr Date:31 Oct 2005 06:55 PM
Ok, now I can see the templates, but I'm having trouble calling them. When I run my transform in the debugger (which still doesn't stop at breakpoints), I get a weird exception:
-------
TransformerException: misplaced literal result in a func:function container.
URL: file:.../exslt/str/functions/tokenize/str.tokenize.function.xsl
Line: 40
Col: 17
-------
Line 40 is the end tag of the "func:function" element defining "str:tokenize".
Subject:How to call template in imported xslt from the graphical view Author:Ivan Pedruzzi Date:31 Oct 2005 11:29 PM
>Ok, now I can see the
>templates, but I'm having
>trouble calling them. When I
>run my transform in the
>debugger (which still doesn't
>stop at breakpoints),
Which JVM version are you running (Help -> About)?
> I get a weird exception:
>My xslt is just this:
>--------------------
><pre>
What is this <pre> ?
If the XML PI is present has to be at the beggging of the file
What are you trying to do with the above?
XPath expression are 1 base and the $token doesn't just get evaluate you need to use the appropriate XSLT instruction see the following