Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
Here's the template I came up with to translate the first character of a string to upper case and subsequent underscores to spaces:
<xsl:template name="proper-case-name">
<xsl:param name="expr"/>
<xsl:variable name="uc"
select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
<xsl:variable name="lc"
select="'abcdefghijklmnopqrstuvwxyz'"/>
<xsl:value-of
select="concat(
translate(substring($expr,1,1),$lc,$uc),
translate(substring($expr, 2), '_', ' ')
)"/>
</xsl:template>
Yuck. Can't even get it Unicode aware (this is processed both client and server side).
XSLT fall out of my head.. (Score:1)
Since then I've not had to do any XML that XML::Simple couldn't handle.
A week or so ago I needed to munge some OPML in a way that suited itself to an XSLT solution. Wrote failing test then switched to my code window to discover that.... XSLT had completely fallen out of my head. Seriously. I had to go dig out my Peacock O'Reilly befo
It's possible but even uglier... (Score:1)
Extension Functions (Score:2)
Re:Extension Functions (Score:2)
I would like to do that but I've set it up to have the browser to handle the XSLT and falling back to server side processing if the browser cannot process XSLT. If I keep running to stuff like this, perhaps I'll rethink it.
Re: (Score:1)
The devious hack to leave this on the server would be to use XPath’s
document()function to call back to the server. Stick the string in a query paramater and…