saxon:call-template not supported in hotspots and invocation

Having trouble installing Oxygen? Got a bug to report? Post it all here.
fxprunayre
Posts: 3
Joined: Sat Jun 01, 2013 3:15 pm

saxon:call-template not supported in hotspots and invocation

Post 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
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: saxon:call-template not supported in hotspots and invoca

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
fxprunayre
Posts: 3
Joined: Sat Jun 01, 2013 3:15 pm

Re: saxon:call-template not supported in hotspots and invoca

Post 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
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: saxon:call-template not supported in hotspots and invoca

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
fxp
Posts: 3
Joined: Tue May 06, 2014 4:30 pm

Re: saxon:call-template not supported in hotspots and invoca

Post 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.
fxp
Posts: 3
Joined: Tue May 06, 2014 4:30 pm

Re: saxon:call-template not supported in hotspots and invoca

Post 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
fxp
Posts: 3
Joined: Tue May 06, 2014 4:30 pm

Re: saxon:call-template not supported in hotspots and invoca

Post 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.
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: saxon:call-template not supported in hotspots and invoca

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply