Re: [xsl] Pattern Matching in XSl - find groups defined in one Xml in another Xml.

Subject: Re: [xsl] Pattern Matching in XSl - find groups defined in one Xml in another Xml.
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 22 Aug 2012 17:17:09 -0400
Hi again,

Just to clarify,

On 8/22/2012 1:29 PM, G. Ken Holman wrote:
I just can't figure out where function flexibility is needed ... I
cannot see what needs to be tweaked that isn't simply in the groups.xml
file.

The function served nothing more than a pedagogical use in my solution (which was only a modification of Ken's first solution, thus not a solution at all). It wasn't necessary at all, except for the purposes of (a) showing how a function works, and (b) showing how a function, in a case like this, can expose the logic in a way that makes it a bit easier to read and interpret, as well as to modify in view of new, or changing, or newly understood requirements.


In this it's not much different from

<xsl:variable name="complicated-xpath"
  select="complicated/xpath[if exists(name)
                            then 'easier to understand']"/>
<xsl:apply-templates select="$complicated-xpath"/>

Of course I know it's only easier to read and interpret a function if one knows or can guess how functions work. (In this, a function is like a key.) But that isn't so hard, and learning how to read and interpret XSLT is part of the reason we're here.

Cheers,
Wendell

======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

Current Thread