Page 1 of 1
saxon:call-template not supported in hotspots and invocation
Posted: Sat Jun 01, 2013 3:19 pm
by fxprunayre
Hi,
It looks like <saxon:call-template name="" ... is not supported in hotspots and invocation tree. Transformation is fine, data looks to be collected but nothing is displayed in those views after transformation. Could you confirm ?
Thanks.
Francois
Re: saxon:call-template not supported in hotspots and invoca
Posted: Tue Jun 04, 2013 12:47 pm
by adrian
Hello,
Please make sure you have enabled profiling ("Turn on profiling" button from the debugger toolbar) prior to starting the debugging session:
http://www.oxygenxml.com/doc/ug-editor/ ... rview.html
There's a short video demo here showing how this works:
http://www.oxygenxml.com/demo/XSLT_Profiling.html
Regards,
Adrian
Re: saxon:call-template not supported in hotspots and invoca
Posted: Wed Jun 05, 2013 1:10 pm
by fxprunayre
Hi,
It is turned on, and I have "collecting data" message. But at the end, no information is displayed. Is there any debug option that I could activated to get more details ? It works on some transformations but not all and I get no error message.
Thanks.
Francois
Re: saxon:call-template not supported in hotspots and invoca
Posted: Wed Jun 05, 2013 2:45 pm
by adrian
Hi,
Saxon performs some optimizations of the XSLT code that can alter the granularity of the debugging. To adjust this in the XSLT Debugger perspective, press the Advanced options toolbar button (cogwheel icon) next to the debugger engine selection combo. Set the Optimization level ("-opt"): to 0 and give it another try.
Regards,
Adrian
Re: saxon:call-template not supported in hotspots and invoca
Posted: Tue May 06, 2014 4:34 pm
by fxp
adrian wrote:Hi,
Saxon performs some optimizations of the XSLT code that can alter the granularity of the debugging. To adjust this in the XSLT Debugger perspective, press the Advanced options toolbar button (cogwheel icon) next to the debugger engine selection combo. Set the Optimization level ("-opt"): to 0 and give it another try.
Regards,
Adrian
Same with -opt=0.
Francois ... still investigating.
Re: saxon:call-template not supported in hotspots and invoca
Posted: Tue May 06, 2014 4:53 pm
by fxp
BTW saxon:call-template is supported in hotspots (at least in version 15.x). Testing the following works ok with hotspots view.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:saxon="http://saxon.sf.net/"
exclude-result-prefixes="xs"
extension-element-prefixes="saxon"
version="2.0">
<xsl:template match="/">
<xsl:apply-templates select="*"/>
<saxon:call-template name="{concat('test', '-default')}">
<xsl:with-param name="base" select="."/>
</saxon:call-template>
</xsl:template>
<xsl:template name="test-default">
<xsl:param name="base"></xsl:param>
<xsl:apply-templates select="$base/*"/>
</xsl:template>
<xsl:template match="*|@*">
<xsl:copy>
<xsl:apply-templates select="@*|*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
So what could explain that the hotspots view does not display or collect information during a transformation ?
Thanks for any suggestions.
Francois
Re: saxon:call-template not supported in hotspots and invoca
Posted: Tue May 06, 2014 5:21 pm
by fxp
Got it !
I tested most of the "specific features" I've in my XSLT and it looks to be fine with the hotspots view:
* saxon:call-template
* include via catalog
Code: Select all
<xsl:include href="blanks/metadata-schema03/test.xsl"/>
with
Code: Select all
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
<rewriteURI uriStartString="blanks/metadata-schema03" rewritePrefix="/home/francois/Workspace/github/core-geonetwork/web/src/main/webapp/WEB-INF/data/config/schema_plugins/iso19115-3" />
* call to Java function
BTW, if I turn off schema validation, hotspot view is fine.
Re: saxon:call-template not supported in hotspots and invoca
Posted: Thu May 08, 2014 6:16 pm
by adrian
Hi,
The
Hotspots and
Invocation tree views display the profiling results only after the debugging session has finished (the debugger status from the toolbar should state:
Debug execution finished).
So what could explain that the hotspots view does not display or collect information during a transformation ?
How are you running the transformation?
Are you using the
Run to End (Alt+F5) action in the debugger?
Does the debugging session finish successfully?
Note that for very fast code the Hotspots view will just show 0 Hotspots.
Regards,
Adrian