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

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

Subject: Re: [xsl] Replacing = with == and ===
From: "John Lumley john.lumley@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 2 Aug 2014 22:49:49 -0000

> On 2 Aug 2014, at 17:38, "L2L 2L emanuelallen@xxxxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> we should use == and === for comparison. Since in so many language the equal
sign(including xml with attribute and namespace) is use to assign value.

If it helps you (and this is a very long shot indeed, with frankly little
chance of success) just consider that the '=' in 'attr="value"' could equally
be replaced by any other symbol, perhaps ':', or '->' or ' is ', but in the
grammar of XML it uses the symbol '='.

It has NO MEANING as an assignment or an equality declaration. It simple means
that the value of the property 'attr' attached to that XML element is just
'value', which is usually interpreted as a string.

Unfortunately you've latched on to a 'meaning' for the 'select' attribute of
xsl:apply-templates that has nothing to do with equality, it's all to do with
selection of nodes to be processed (in push mode), hence the use of the
attribute name 'select'. The meaning in XSLT is that the value of the 'select'
property on the XML (instruction) element whose name is 'xsl:apply-templates'
is taken to be an XPath expression that when evaluated on the current context
will yield the nodes to be so processed.

I would also re-iterate that you need to read one of the XSLT primers first
before you have any idea of what the language is really about. You've had
plenty of suggestions from people who really do know what XSLT is - you cannot
get any better.

John Lumley

Current Thread