History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SRC-420
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Michael Collas
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Selenium Remote Control

iedoc2ruby.xml transform can be simpler

Created: 04/Feb/08 05:45 AM   Updated: 12/Aug/08 05:35 PM
Component/s: Client Driver - Ruby, Build Scripts/Tooling
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. File patch_iedoc2ruby (9 kb)



 Description  « Hide
The 'underscorify' template is unnecessarily long. It can be reduced to something relatively simple.

<xsl:template name="underscorify">
    <xsl:param name="input" />
    <xsl:if test="$input">
        <xsl:variable name="first-char" select="substring($input, 1, 1)"/>
        <xsl:variable name="lower-first-char" select="translate($first-char, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/>
        <xsl:if test="$first-char != $lower-first-char">
            <xsl:text>_</xsl:text>
        </xsl:if>
        <xsl:value-of select="$lower-first-char"/>
        <xsl:call-template name="underscorify">
            <xsl:with-param name="input" select="substring($input, 2)"/>
        </xsl:call-template>
    </xsl:if>
</xsl:template>

 All   Comments   Work Log   Change History      Sort Order:
Michael Collas - 04/Feb/08 05:49 AM
Patch to simplify iedoc2ruby.xml. Produces identical selenium.rb