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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Is Anyone Interested In XPath 2.0 Use Cases or Requirement

[ Lists Home | Date Index | Thread Index ]

> I recently wrote an article for the MSDN Extreme XML column entitled "Things to Know and Avoid When Querying XML Documents with XPath" located at
>  
>    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexxml/html/xml06172002.asp
>  
> which is a collection of XPath annoyances, quirks and idiosyncracies that have tripped up myself and a number of other people both within and outside Microsoft. The issues I picked on are probably the usual suspects to people familiar to XPath such as 
>  
> 1.) Why //*[1] and (//*)[1] return radically different results

This is good to get into FAQ sorts of things, but I think it makes perfect sense within the model of XPath path expressions, and just has to be one of those shibboleths which every language has.  I'm not sure there's an entirely sane and consistent way to "fix" it.


> 2.) Lack of set specific operators besides union

Very true, and cause of much cascaded problems.  Of course, EXSLT fills this gap, as it does many other important ones.  Ane even though Microsoft has not made any move that I can discern to support EXSLT (hint: it would be a huge win for everyone if they did), luckily, folks have worked to make EXSLT easy enough to install on top of MSXML, so I think this problem is mostly solved.


> 3.) Lack of identity operators

Well, it's in XSLT, not XPath, but I'd suspect even most pure XPath systems would support generate-id().  Isn't that plus equality operators good enough?


> 4.) Lack of value comparators for nodesets 

I'm not clear on what you mean here, and a brief read of your full article didn't help me.  Can you clarify?  An example, perhaps?


> 5.) Why A != B is different from not(A = B) for nodesets

This just comes down to (2) again.  With set membership checks, one would never need to use equality operators on node sets except when one is sure he is checking for a string value.  EXSLT to the rescue.


> and a few others. Conspicously absent is a lack of critique for the lack of type based querying facilities in XPath. Not that I think this isn't an issue especially since I constantly see people ask for the ability to do operations on dates and schema types but I left it out because these issues seemed less a failing of XPath both more a sign of the evolution of XML applications. 


Besides dates, which are provided for in EXSLT, can you say whet sorts of practical problems you've had people report that caused them to think they needed operations on other schema types?  Or do they just think that because their schema has types, that XPath ought to be able to do funky things with those types?


> However what I've found interesting is that most people have showed little interest in XPath 2.0 as can be seen by the relatively scanty number of posts in the public-qt-comments archive at 
>  
>     http://lists.w3.org/Archives/Public/public-qt-comments/
>  
> which has only broken the 10 email-per-month threshold during the month of May during a particularly raucous cross-posting thread spawned on XML-DEV complaining about PSVI support in XPath 2.0. 
>  
> I'm rather curious as to what this means. Is no one interested in any revisions to XPath?

There are lots of little things that are fixed in XPath 2.0 and XSLT 2.0.  I personally like sequences, and the list-comprehension-like operators that have been added.  I like the abolishing of RTF and many other things.  But until they come up with a very well defined conformance level that has nothing whatsoever to do with type-augmented infosets, I'll have nothing to do with either spec.  I have heard this same sentiment from others, which is perhaps indicative of the reasons why there would be less exceitemtn and activity around these 2.0 iterations.

And FWIW, I was among the earliest implementors of XPath and XSLT.  I thought, and still think that they were remarkably well-conceived languages.  XPath and XSLT 2.0 are ruined by excess, and I'd be surprised if they supplant the 1.0 versions any time soon, as they are.


-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Track chair, XML/Web Services One Boston: http://www.xmlconference.com/
The many heads of XML modeling - http://adtmag.com/article.asp?id=6393
Will XML live up to its promise? - http://www-106.ibm.com/developerworks/xml/library/x-think11.html






 

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

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