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

Re: Converting a string to Uppercase or Lowercase with

Subject: Re: Converting a string to Uppercase or Lowercase without using translate() ?
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Tue, 27 Nov 2007 16:22:46 +0000
Re:  Converting a string to Uppercase or Lowercase with
On 27/11/2007, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote:
> At 2007-11-27 15:14 +0000, Andrew Welch wrote:
> >or perhaps "manage" your namespaces:
> >
> ><!ENTITY xslt-ns 'http://www.w3.org/1999/XSL/Transform'>
> >
> ><xsl:stylesheet xmlns="&xslt-ns;" version="2.0">
> >
> >I know I'm being silly now...
>
> Not really ... I've used entities for namespace URI strings when a
> vocabulary changes its URI but the transformation of the elements is
> unchanged:  keep a master copy of the stylesheet in a source code
> control system, deploy copies to two directories, use parameter
> entities to define general entities with the namespace URI string,
> and then each stylesheet supports a different version of the URI string.

Or just transform the original once per namespace update (or just do
it manually - you'd have to hand edit each copy to insert the entity
refs anyway).

It probably wasn't the worst example I could've come up with.

Maybe we should have a go at obfuscating XSLT through over zealous use
of entities... like turning the identity template into the &ident;
entity ref:

<!DOCTYPE xsl:stylesheet [
<!ENTITY xslt-ns 'http://www.w3.org/1999/XSL/Transform'>
<!ENTITY opt '<xsl:output indent="yes"/>'>
<!ENTITY ident '<xsl:template
match="@*|node()"><xsl:copy><xsl:apply-templates
select="@*|node()"/></xsl:copy></xsl:template>'>
]>
<xsl:stylesheet xmlns:xsl="&xslt-ns;"
    version="2.0">
    &opt;
    &ident;
</xsl:stylesheet>

:)

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.