Bug 17491 - ER: Implement XPointer Support
Summary: ER: Implement XPointer Support
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P4 Enhancement
Assignee: Nobody
URL: http://www.w3.org/TR/xptr-framework/
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-22 12:40 PST by Jeff Schiller
Modified: 2023-05-27 06:05 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Schiller 2008-02-22 12:40:32 PST
I would love to be able to use XPointer in my URLs.  Ideally it would also be made to work in text/html documents too.

Please see http://www.w3.org/TR/xptr-framework/
Comment 1 Robert Blaut 2008-03-02 03:40:16 PST
Confirmed as an enhancement request.
Comment 2 Ojan Vafai 2009-06-01 01:41:38 PDT
Chromium team was recently asked for this feature in the form of enabling scrolling cross-domain iframed content into view.

See the whatwg thread starting here: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-April/019145.html

My summary of that thread: Gecko added support for XPointer on XML documents in 2003 and removed it due to lack of adoption from web developers. It's unclear why web developers didn't use XPointer in Firefox, but it's at least partially because it was never implemented for HTML/XHTML pages. XPointer is XPath based, but it's conceivable that once we have XPath support, we could reasonably add other schemes like "css" if we wanted selector-based matching.

There was some concern that this somehow increases the ability to do clickjacking, but I really don't buy the argument that this makes clickjacking attacks more effective.
Comment 3 Boyd Waters 2010-08-25 01:43:31 PDT
Here is a simple use-case that I wanted to use this evening: linking to the 24th paragraph tag of the 23rd blockquote tag of an HTML document on the Web:

http://garote.bdmonkeys.net/commandline/index.html#xpointer(/blockquote[23]/p[24])

I wasn't interested in using this from JavaScript, I was quoting a particular passage of an essay and wanted to link to it. Since the author of the original HTML did not include ID attributes on the p tags, I don't have any way to link to the passage with traditional the HTML URL fragment identifier. I wish I could add some simple XPath/XPointer to URLs on (well-formed) HTML documents.
Comment 4 Anne van Kesteren 2023-05-27 06:05:57 PDT
WebKit has an implementation of https://wicg.github.io/scroll-to-text-fragment/ for this purpose.