You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Mariella Di Giacomo <ma...@lanl.gov> on 2002/11/27 01:49:36 UTC

which is the best way to debug an XSLT file ?

Hello,

I would like to ask a question, even though I do not know if this is the 
correct mailing list.

Which is the best way to debug an XSLT file, especially when I would like 
to know
the time spent for a loop, an extension function, if statement, etc.


Thanks a lot in advance for your help,

Mariella


Re: which is the best way to debug an XSLT file ?

Posted by Simon Kitching <si...@ecnetwork.co.nz>.
Hi Mariella,

I think the English word you are looking for is "profiling" (or "to
profile" in the infinitive) rather than debugging.

Debugging --> finding errors in an application

Profiling --> figuring out what the performance of different parts of an
application are.

I don't personally know of any good way to profile an xslt file is, but
would be very interested myself.

I had a quick search via google on "xslt profile" and found:
http://www.xslprofiler.org/overview.html
http://www.biglist.com/lists/xsl-list/archives/200103/msg01351.html

NB: Unfortunately, the word "profile" has several other meanings in
English. It can mean "a collection or summary of information about a
person or thing"; examples common in the google results are "company
profile", "user profile", "client profile", "product profile".

Regards,

Simon

On Wed, 2002-11-27 at 13:49, Mariella Di Giacomo wrote:
> Hello,
> 
> I would like to ask a question, even though I do not know if this is the 
> correct mailing list.
> 
> Which is the best way to debug an XSLT file, especially when I would like 
> to know
> the time spent for a loop, an extension function, if statement, etc.
> 
> 
> Thanks a lot in advance for your help,
> 
> Mariella
-- 
Simon Kitching <si...@ecnetwork.co.nz>


RE: which is the best way to debug an XSLT file ?

Posted by Al Byers <by...@automationgroups.com>.
I added some XSLT editing and debugging capability to the Pollo (pollo.sourceforge.net)
XML editor. It is at ag101.sourceforge.net. I have not had any feedback
on it, but I use it regularly to place break points in XSL scripts and inspect
values. It does not currently do profiling, but the source is there and
it would not be difficult to add some timing features.

Al

>-- Original Message --
>Reply-To: xalan-dev@xml.apache.org
>Date: Wed, 27 Nov 2002 08:59:43 -0700
>To: xalan-dev@xml.apache.org
>From: Mariella Di Giacomo <ma...@lanl.gov>
>Subject: RE: which is the best way to debug an XSLT file ?
>
>
>Thanks a lot.
>
>At 05:11 PM 11/26/02 -0800, you wrote:
>>Hi,
>>
>>How about something like:
>>
>><xsl:param name="debug"/>
>>
>><xsl:template match="random-template">
>>   <xsl:choose>
>>     <xsl:when test="not(boolean($debug))">
>>       <div class="{@some-attribute}">
>>         <xsl:apply-templates/>
>>       </div>
>>     <xsl:when>
>>     <xsl:otherwise>
>>       <xsl:text>---oO Debugging random-template match Oo---
>>div/@class = </xsl:text>
>>       <xsl:value-of select="@some-attribute"/>
>>     </xsl:otherwise>
>>   </xsl:choose>
>></xsl:template>
>>
>>make sense?
>>
>>best,
>>-Rob
>>
>>
>>
>> > -----Original Message-----
>> > From: Mariella Di Giacomo [mailto:mariella@lanl.gov]
>> > Sent: Tuesday, November 26, 2002 4:50 PM
>> > To: xalan-dev@xml.apache.org
>> > Subject: which is the best way to debug an XSLT file ?
>> >
>> >
>> > Hello,
>> >
>> > I would like to ask a question, even though I do not know if this is
>the
>> > correct mailing list.
>> >
>> > Which is the best way to debug an XSLT file, especially when I would
>like
>> > to know
>> > the time spent for a loop, an extension function, if statement, etc.
>> >
>> >
>> > Thanks a lot in advance for your help,
>> >
>> > Mariella
>> >
>


Al Byers
Wasatch Automation Group, LLC
P.O. Box 1672
Orem, UT 84059
801.400.5111

byersa@automationgroups.com
http://automationgroups.com/na/wasatch


RE: which is the best way to debug an XSLT file ?

Posted by Bernhard Zwischenbrugger <bz...@datenkueche.com>.
libxslt (http://xmlsoft.org) has
a profile function.

commandline utility syntax:

"xsltproc --profile test.xslt test.xml"

Bernhard
http://datenkueche.com


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/


RE: which is the best way to debug an XSLT file ?

Posted by Joseph Kesselman <ke...@us.ibm.com>.
IBM's DeveloperWorks recently published an article with some good 
suggestions on using xsl:message to display stylesheet activity on the 
console. It should be available at
        http://www.ibm.com/developerworks/xml/library/x-debugxs.html

Xalan also has some tracing APIs, which tools can use to watch a 
stylesheet execute. I know some of the Websphere developers were looking 
at using those to develop an "XSLT Editor", but I don't know the current 
status of that tool, and there may be competing tools I'm not aware of.

______________________________________
Joe Kesselman  / IBM Research

RE: which is the best way to debug an XSLT file ?

Posted by Mariella Di Giacomo <ma...@lanl.gov>.
Thanks a lot.

At 05:11 PM 11/26/02 -0800, you wrote:
>Hi,
>
>How about something like:
>
><xsl:param name="debug"/>
>
><xsl:template match="random-template">
>   <xsl:choose>
>     <xsl:when test="not(boolean($debug))">
>       <div class="{@some-attribute}">
>         <xsl:apply-templates/>
>       </div>
>     <xsl:when>
>     <xsl:otherwise>
>       <xsl:text>---oO Debugging random-template match Oo---
>div/@class = </xsl:text>
>       <xsl:value-of select="@some-attribute"/>
>     </xsl:otherwise>
>   </xsl:choose>
></xsl:template>
>
>make sense?
>
>best,
>-Rob
>
>
>
> > -----Original Message-----
> > From: Mariella Di Giacomo [mailto:mariella@lanl.gov]
> > Sent: Tuesday, November 26, 2002 4:50 PM
> > To: xalan-dev@xml.apache.org
> > Subject: which is the best way to debug an XSLT file ?
> >
> >
> > Hello,
> >
> > I would like to ask a question, even though I do not know if this is the
> > correct mailing list.
> >
> > Which is the best way to debug an XSLT file, especially when I would like
> > to know
> > the time spent for a loop, an extension function, if statement, etc.
> >
> >
> > Thanks a lot in advance for your help,
> >
> > Mariella
> >


RE: which is the best way to debug an XSLT file ?

Posted by Robert Koberg <ro...@koberg.com>.
Hi,

How about something like:

<xsl:param name="debug"/>

<xsl:template match="random-template">
  <xsl:choose>
    <xsl:when test="not(boolean($debug))">
      <div class="{@some-attribute}">
        <xsl:apply-templates/>
      </div>
    <xsl:when>
    <xsl:otherwise>
      <xsl:text>---oO Debugging random-template match Oo---
div/@class = </xsl:text>
      <xsl:value-of select="@some-attribute"/>     
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

make sense?

best,
-Rob



> -----Original Message-----
> From: Mariella Di Giacomo [mailto:mariella@lanl.gov]
> Sent: Tuesday, November 26, 2002 4:50 PM
> To: xalan-dev@xml.apache.org
> Subject: which is the best way to debug an XSLT file ?
> 
> 
> Hello,
> 
> I would like to ask a question, even though I do not know if this is the 
> correct mailing list.
> 
> Which is the best way to debug an XSLT file, especially when I would like 
> to know
> the time spent for a loop, an extension function, if statement, etc.
> 
> 
> Thanks a lot in advance for your help,
> 
> Mariella
>