xsl-list
[Top] [All Lists]

Re: [xsl] Converting a string to Uppercase or Lowercase without using translate() ?

2007-11-27 09:59:09
Why bother? It already has angle-brackets everywhere.
I never could understand why all those detractors of lisp syntax (i.e.
DSSSL in particular) find SGML/XML syntax to be an improvement.

On 27/11/2007, Andrew Welch <andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com> 
wrote:
On 27/11/2007, G. Ken Holman <gkholman(_at_)cranesoftwrights(_dot_)com> 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>

:)

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>