[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: "bryan rasmussen" <rasmussen.bryan@xxxxxxxxx>
Date: Tue, 27 Nov 2007 18:44:12 +0100
Re:  Converting a string to Uppercase or Lowercase with
Well actually there have been times that I have seen a small benefit
to using entities for definition of XPaths that would be reused in
places where variables could not be used. As for entities as aliases
for NCRs I would prefer just to use the NCR and use a table to look it
up if I don't know it. I find this is helpful with maintainability. I
remember I had a system of transforms with quite a lot of entities and
when I had to hand it over to an understudy he said "is this what they
call a dtd"?

This caused a momentary reflection that most of these entities could
just as well have been parameters.

Cheers,
Bryan Rasmussen

On Nov 27, 2007 6:03 PM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
> On 27/11/2007, Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> wrote:
> > Since entities resolve recursively, this cries out for more:
>
> ahh great... in which case further refactoring to:
>
> > <!DOCTYPE xsl:stylesheet [
> > <!ENTITY xslt-ns 'http://www.w3.org/1999/XSL/Transform'>
> > <!ENTITY all '@*|node()'>
> > <!ENTITY opt '<xsl:output indent="yes"/>'>
> > <!ENTITY copy '<xsl:copy><xsl:apply-templates
> > select="&all"/></xsl:copy>'>
> > <!ENTITY ident '<xsl:template
> > match="&all;">&copy;</xsl:template>'>
> > ]>
> > <xsl:stylesheet xmlns:xsl="&xslt-ns;"
> >      version="2.0">
> >      &opt;
> >      &ident;
> > </xsl:stylesheet>
>
> gives:
>
> <!DOCTYPE xsl:stylesheet [
> <!ENTITY xslt-ns 'http://www.w3.org/1999/XSL/Transform'>
> <!ENTITY all '@*|node()'>
> <!ENTITY opt '<xsl:output indent="yes"/>'>
> <!ENTITY apt '<xsl:apply-templates select="&all;"/>'>
> <!ENTITY copy '<xsl:copy>&apt;</xsl:copy>'>
> <!ENTITY ident '<xsl:template match="&all;">&copy;</xsl:template>'>
> ]>
> <xsl:stylesheet xmlns:xsl="&xslt-ns;"
>     version="2.0">
>     &opt;
>     &ident;
> </xsl:stylesheet>
>
> This is looking really bad now...

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.