[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Any students looking for an interesting project?

Subject: Re: Any students looking for an interesting project?
From: Вячеслав Седов <schematronic@xxxxxxxxx>
Date: Sun, 6 Oct 2013 13:42:48 +0400
Re:  Any students looking for an interesting project?
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
    xmlns:schtrnc="http://schematronic.ru"
    exclude-result-prefixes="xs xd"
    version="2.0">
    <xd:doc scope="stylesheet">
        <xd:desc>
            <xd:p><xd:b>Created on:</xd:b> Oct 5, 2013</xd:p>
            <xd:p><xd:b>Author:</xd:b> schematronic</xd:p>
            <xd:p></xd:p>
        </xd:desc>
    </xd:doc>
    <xsl:param name="xsl-id" select="'test'"/>
    <xsl:namespace-alias stylesheet-prefix="axsl" result-prefix="xsl"/>
    <xsl:template match="*">
        <xsl:copy>
            <xsl:copy-of select="@*"/>
            <xsl:apply-templates/>
        </xsl:copy>
    </xsl:template>
    <xsl:template match="xsl:template|xsl:if|xsl:when|xsl:otherwise">
        <xsl:copy>
            <xsl:copy-of select="@*, xsl:param"/>
            <xsl:variable name="id" select="generate-id()"/>
            <axsl:variable name="schmtrnc:test"
xmlns:schtrnc="http://schematronic.ru"
select="doc('http://localhost:8080/exist/rest/db/test/flag.xquery?file={$xsl-id}&amp;id={$id}')"/>
            <axsl:if test="$schmtrnc:test"><axsl:message>
                <xsl:attribute name="select" select="concat('&quot;',
$xsl-id, ' - ', $id, '&quot;')"/>
            </axsl:message></axsl:if>
            <xsl:apply-templates select="node() except xsl:param"/>
        </xsl:copy>
    </xsl:template>
</xsl:stylesheet>

2013/10/4 Michael Sokolov <msokolov@xxxxxxxxxxxxxxxxxxxxx>:
> On 10/3/13 9:06 AM, Michael Kay wrote:
>>
>> On 3 Oct 2013, at 12:30, Michael Sokolov wrote:
>>
>>> One of my colleagues has written a code coverage plugin for Saxon; he
>>> calls it "tectura."  It counts up the number of times different lines of an
>>> XSLT file are executed. I think this empirical approach could get you a
>>> quick answer to the problem without the need for deep analysis.  He has been
>>> planning to release the package as open source, but I don't think he has
>>> done that yet -- still I'm sure you could whip something up, and I bet your
>>> users would appreciate it, too.
>>>
>> The -TP option on the transform command line gives you this, but at the
>> granularity of templates/functions, not individual lines of code. It gives
>> the timings as well as the counts.
>>
> Oh, that's very helpful - I wasn't aware.  I kept trying to promote the idea
> of counting by logical unit, which seems more natural, but the line-oriented
> counting fits nicely with the Java code coverage tool we use (cobertura) and
> allows us to combine statistics from Java and XSLT.
>
> -Mike

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.