{"id":402,"date":"2007-10-30T21:54:05","date_gmt":"2007-10-31T03:54:05","guid":{"rendered":"http:\/\/blog.codedread.com\/archives\/2007\/10\/30\/fxpointer-link-exactly\/"},"modified":"2007-10-30T21:54:05","modified_gmt":"2007-10-31T03:54:05","slug":"fxpointer-link-exactly","status":"publish","type":"post","link":"https:\/\/www.codedread.com\/blog\/archives\/2007\/10\/30\/fxpointer-link-exactly\/","title":{"rendered":"FXPointer &#8211; Link Exactly"},"content":{"rendered":"<p>How many times have you told a friend or colleague \"Go to http:\/\/example.com\/some\/doc and search for XXXX\" ?  I do it a lot actually.  Ideally web pages should identify significant sections of a web page with identifiers (id=\"foo\") so that you can link to http:\/\/example.com\/some\/doc\/#foo, but the problem is that not everyone follows this practice.  In fact, there are a lot of big specification documents where you'd like to point someone to a specific paragraph to save someone time and encourage them to actually visit the link and read it.  This becomes increasingly important as the mobile web accelerates and small screens with harder-to-use keyboards become more prevalent.  I hope this Firefox extension will help.<!--more--><\/p>\n<p>Tonight I updated my Firefox extension, <a href=\"http:\/\/www.codedread.com\/fxpointer\">FXPointer<\/a>, so that you can right-click on some web page text and get the XPointer element link that will drive people directly to it.  This is the first time the extension comes close to being semi-usable, so I thought I should start to get the word out.  It's very similar to <a href=\"http:\/\/www.schepers.cc\/\">Doug's<\/a> excellent <a href=\"http:\/\/www.schepers.cc\/?p=39\">Idiri<\/a> extension, except that FXPointer tries to use the XPointer specification for HTML documents.  Thus, it will allow you to link directly to any element in a web page.<\/p>\n<p>Truth be told, Firefox already supports XPointer to some degree on true XML documents.  Tragically, it doesn't work with XHTML documents (see <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=235409\">Bug 235409<\/a>).  Worse yet, the amount of HTML on the web vastly outweighs the amount of XHTML, meaning that XPointer will never really reach critical mass without a boost in the HTML direction.<\/p>\n<p>For Opera users, please see <a href=\"http:\/\/student.kuleuven.be\/~s0159198\/xpointer\/\">Jeroen's web page<\/a> that gives you some User JavaScript to get things going.  This means that you can get some XPointer\/HTML functionality on two of the four big browsers out there.<\/p>\n<p>Anyway, I plan to start using these more-specific links going forward.  If you don't have XPointer support, you'll just get a less-specific link.  I'll try to make improvements that degrade even more gracefully in the future.<\/p>\n<p>Some future plans that may or may not transpire:<\/p>\n<ul>\n<li>Support for the <a href=\"http:\/\/www.w3.org\/TR\/xptr-xpointer\/\">xpointer scheme<\/a> so you can use XPath and search strings (probably less brittle)<\/li>\n<li>Support for SVG's XPointer-friendly scheme <a href=\"http:\/\/www.w3.org\/TR\/SVG11\/linking.html#SVGFragmentIdentifiers\">svgView<\/a><\/li>\n<li>Some configuration of the context menu<\/li>\n<\/ul>\n<p>If you want to submit patches, download the .xpi, unzip it and hack away.<\/p>\n<p>FXPointer does its best to use IDs where it can, so this is less brittle than it seems, but I still wouldn't recommend this for any dynamic web pages with wildly changing <span class=\"acronym\" title=\"Document Object Models\">DOMs<\/span>.  Of course the ultimate would be to support the <a href=\"http:\/\/www.w3.org\/TR\/xptr-xpointer\/\">xpointer<\/a> scheme in some way such that people can use XPath and string searches.<\/p>\n<p>If you think this extension is useful, please help lobby for native XPointer\/HTML support in browsers.<\/p>\n<div class=\"ads\"><object type=\"text\/html\" width=\"468\" height=\"60\" data=\"http:\/\/www.codedread.com\/gads.php\"><\/object><\/div>\n","protected":false},"excerpt":{"rendered":"<p>How many times have you told a friend or colleague &#8220;Go to http:\/\/example.com\/some\/doc and search for XXXX&#8221; ? I do it a lot actually. Ideally web pages should identify significant sections of a web page with identifiers (id=&#8221;foo&#8221;) so that you can link to http:\/\/example.com\/some\/doc\/#foo, but the problem is that not everyone follows this practice. [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,41,25,11,28,30],"tags":[87],"class_list":["post-402","post","type-post","status-publish","format-standard","hentry","category-firefox","category-opera","category-software","category-technology","category-web","category-xml","tag-fxpointer"],"_links":{"self":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/comments?post=402"}],"version-history":[{"count":0,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/402\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/media?parent=402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/categories?post=402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/tags?post=402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}