xsl-list
[Top] [All Lists]

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

2014-08-02 17:49:59


On 2 Aug 2014, at 17:38, "L2L 2L emanuelallen(_at_)hotmail(_dot_)com" 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>