xsl-list
[Top] [All Lists]

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

2007-11-27 10:03:49
On 27/11/2007, Wendell Piez <wapiez(_at_)mulberrytech(_dot_)com> 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...

--~------------------------------------------------------------------
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>