[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Replacing = with == and ===

Subject: Re: [xsl] Replacing = with == and ===
From: "BR Chrisman brchrisman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 3 Aug 2014 07:12:55 -0000

... which brings up a point I've wondered about for quite a while.
XSLT allows me to transform XML, obviously including XSLT.
XPath is a big part of modifying/mutating XSLT because it allows me to
relatively easily address structures/constructs within my XSLT
But when it comes down to it, I'd also like an XPath-like-language
that implicitly lets me parse/address XPath within XSLT attributes
(like select=) in order to gain further insight into what a particular
template/routine/etc is doing (and whether I need to modify it via my
XSLT-transforming-XSLT program.

The immediate context here is that I wanted to respond to this poster
saying: "Just invent your own derivative of XSLT where you have your
own token preference..." and that would work except for some nastiness
which would come in when parsing the actual XPath expressions to
differentiate between something like: select="*[@foo='bar']" and:
select="'my string with equals = in it'" (or in this case, the wonky
derivative with '==' instead of '=', though I don't pretend to have a
valid case for it).

Anyways, I've had this problem before, where I wanted to modify
existing XSLT programs in a particular way, but would need to have
insight into the XPath expression that would be a whole lot of parsing
work.  Previously, I've resorted to dangerous hacks with regex or
tokenizing, but having some sort of xpathpath would be better... even
if it didn't include xpathpathpath and further recursions.

On Sat, Aug 2, 2014 at 5:34 PM, L2L 2L emanuelallen@xxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> Thanks for the link, and reply.
> E-S4L
>> On Aug 2, 2014, at 8:21 PM, "G. Ken Holman g.ken.holman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>> At 2014-08-02 15:22 +0000, L2L 2L emanuelallen@xxxxxxxxxxx wrote:
>>> .... Anyone know of any good books to read that concentrate mainly on teaching xml, xslt, schema, xQuery, and xPath?
>>> E-S4L
>> There are 5 hours of free video instruction found here:
>>  http://www.CraneSoftwrights.com/links/video.htm
>> Preview 5 through Preview 10 will give you an overview of how to think about these declarative languages.  These correspond to Module 2's introduction and lessons 1, 2 and 4, Module 3's introduction and Module 4's introduction.
>> The nature of your questions and suggestions to this list lead me to believe your background is in imperative languages.  Sticking to this perspective may hobble you in grasping how different XSLT is from such languages.
>> I have tried to mark enough of my video lessons as free that students can grasp all of the basic concepts of the way the language works without having to pay for the more detailed lessons.
>> I hope you find them helpful.
>> . . . . . . . Ken
>> --
>> Contact us for world-wide XML consulting and instructor-led training |
>> Free 5-hour lecture: http://www.CraneSoftwrights.com/links/video.htm |
>> Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/s/ |
>> G. Ken Holman                   mailto:gkholman@xxxxxxxxxxxxxxxxxxxx |
>> Google+ profile:      http://plus.google.com/+GKenHolman-Crane/about |
>> Legal business disclaimers:    http://www.CraneSoftwrights.com/legal |
>> ---
>> This email is free from viruses and malware because avast! Antivirus protection is active.
>> http://www.avast.com

Current Thread