Last Comment Bug 396966 - Xpath 2.0
: Xpath 2.0
Status: UNCONFIRMED
:
Product: Core
Classification: Components
Component: XSLT (show other bugs)
: unspecified
: All All
: -- enhancement with 18 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on: 309720
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-20 14:17 PDT by Carl Fürstenberg
Modified: 2016-03-16 01:18 PDT (History)
20 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Carl Fürstenberg 2007-09-20 14:17:38 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070723 Iceweasel/2.0.0.6 (Debian-2.0.0.6-1)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070723 Iceweasel/2.0.0.6 (Debian-2.0.0.6-1)

As Xpath 2.0 and Xslt 2.0 is a w3c recommendation, it would be a good idea to implement it into the engine.


http://www.w3.org/TR/xpath20/
http://www.w3.org/TR/xslt20/


Reproducible: Always
Comment 1 Peter Van der Beken [:peterv] 2007-09-20 15:07:09 PDT
(In reply to comment #0)
> As Xpath 2.0 and Xslt 2.0 is a w3c recommendation, it would be a good idea to
> implement it into the engine.

One doesn't follow from the other, and it is very unlikely that we will implement XSLT 2.0 or even XPath 2.0. Are there any specific features you are looking for?
Comment 2 Carl Fürstenberg 2007-09-21 11:46:15 PDT
(In reply to comment #1)
> (In reply to comment #0)
> > As Xpath 2.0 and Xslt 2.0 is a w3c recommendation, it would be a good idea to
> > implement it into the engine.
> 
> One doesn't follow from the other, and it is very unlikely that we will
> implement XSLT 2.0 or even XPath 2.0. Are there any specific features you are
> looking for?
> 

Mainly the paty of the specification for strings, as xpath 1.0 doesn't handle escaping characters (" and ')
Comment 3 Carl Fürstenberg 2007-10-11 08:06:44 PDT
would it be possible to enable xpath to escape quotes?
Comment 4 Laurent Jouanneau 2009-07-15 04:14:47 PDT
implementing xpath2 functions ( http://www.w3.org/TR/xpath-functions/ ) could be very useful for XUL templates based on an XML datasource, since these kind of templates use XPath to get nodes.
Comment 5 Xudong Yang 2009-07-27 08:33:54 PDT
I agree with #4, xsl:function extends the functionality of xslt very well.

Also it's a W3C standard, there's no harm to implement it anyway (no compatibility issues if the version attribute of xsl:stylesheet is correctly assigned).
Comment 6 Cefn Hoile 2010-10-25 04:23:38 PDT
XPath is an important declarative language to implement Node selection in the DOM. 

Its use of implicit iteration, predicate filtering and document axes makes it much less verbose and complex than Javascript, whilst making it substantially richer than CSS as a selector language. 

Building on the existing support for Xpath, tools such as XPather permit rich exploration and selection of DOM content without coding endless iteration and expansion routines. 

However, XPath 1.0 has a number of limitations experienced by adopters which were addressed by additional constructs in XPath 2.0. 

This means that certain sets of nodes and transformations of node content are simply not achievable in XPath 1.0 and todays Firefox without migrating to XPath 2.0.
Comment 7 jm 2011-10-12 11:14:26 PDT
XSLT 2.0 is much more powerful than XSLT 1.0.

There are several major improvements to the language, this is not just some tiny features, yet they blend in so naturally that you wonder why they are not in 1.0 to begin with.

- Remove RTF results in favor of plain node-sets (this one feels almost like a bug fix).
- User defined functions as mentioned in #4.
- Multiple document outputs.
- Regular expressions and parsing functions (how are you supposed to manipulate text nodes without these?)

Some of this features are more or less supported on EXSLT. I don't understand why it's ok to give support to an extension but not to a standard that removes the need for the extension itself.
Even more so if you consider the extension implementation is incomplete.

Note You need to log in before you can comment on or make changes to this bug.