OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: Simplicity of XPath

[ Lists Home | Date Index | Thread Index ]
  • From: Derek Denny-Brown <derekdb@microsoft.com>
  • To: "'Bullard, Claude L (Len)'" <clbullar@ingr.com>,Matt Sergeant <matt@sergeant.org>, xml-dev@lists.xml.org
  • Date: Fri, 10 Nov 2000 16:26:56 -0800

I actually think that people have problems with XPath for 2 reasons.
Obviously, these are not the only reasons, but these are the primary
difficulties I have percieved in working with people using MSXML.

1) The only way to use it is in XSLT.  
-The reason I say this is because a have encountered *many* developers who
depend heavily on MSXML's selectSingleNode() and selectNodes() calls, often
using those as an alternative to pure DOM calls.  I very rarely see
complaints of confusion from these users, while I regularly see people
struggling with XPath in the context of XSLT.  The developers using
selectSingleNode() and selectNodes() found that this was easier to code, and
produced less fragile code, than just DOM core.  These are mostly people who
are passing data around, typically as a way to 'easily' exchange data
between orgs within large companies, or between companies.  I say 'easily',
because actually getting organizations to agree to this faces many of the
same political/practical/security issues as any RPC mechanism, but because
of it's simplicity and platform independent nature, people tend to be much
more agreeable to use it than CORBA/DCOM/DCE RPC/etc.. 

2) XPath is set-based, but has a syntax which resembles common path
navagation syntaxes which are not (file paths/URLs)
-I have encountered confusion over the fact that "a/b" matches a set of <b>s
which may themselves be inside different <a> elements.  People usually can
keep track of the set semantics for the outer-most level ("/b" in the above
case), but forget that it applies to the entire path.

Derek Denny-Brown

-----Original Message-----
From: Bullard, Claude L (Len) [mailto:clbullar@ingr.com]
Sent: Friday, November 10, 2000 7:26 AM
To: Matt Sergeant; xml-dev@lists.xml.org
Subject: RE: Simplicity of XPath

IME, it tends to divide along backgrounds.  
Not everyone coming to the party was 
formerly a DesPH.   On a scale of things, 
I don't think it is THAT hard but I've 
spent a lot of time on the phone lately 
with power C++ toTheMetal programmers 
who can't get it without a lot of time 
in.  I can't tell if it is resistance 
to techniques they label as "stupid" 
(really, they do), or because the 
combinations of bracket types plus 
abbreviations plus getting it clear 
which context is in effect at any 
given time plus what functions do 
what is more than they can bear at 
this late date in their careers.  

Consensus be hanged.  Men at work. ;-)


Ekam sat.h, Vipraah bahudhaa vadanti.
Daamyata. Datta. Dayadhvam.h

-----Original Message-----
From: Matt Sergeant [mailto:matt@sergeant.org]

"Bullard, Claude L (Len)" wrote:
> Being able to reapply XPath has advantages
> on the learning curve although the syntax of XPath isn't
> all that easy to learn.

I always thought it was one of the easier aspects to pick up. Is there a
general consensus on this matter?

Or is it that the simple (abbreviated) parts of XPath are easy, but the
non-abbreviated parts are hard?


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS