{"action":"closed","number":2412,"pull_request":{"url":"https://api.github.com/repos/jgm/pandoc/pulls/2412","id":45835996,"html_url":"https://github.com/jgm/pandoc/pull/2412","diff_url":"https://github.com/jgm/pandoc/pull/2412.diff","patch_url":"https://github.com/jgm/pandoc/pull/2412.patch","issue_url":"https://api.github.com/repos/jgm/pandoc/issues/2412","number":2412,"state":"closed","locked":false,"title":"Added support for <xref> tag in DocBook reader","user":{"login":"frerich","id":533425,"avatar_url":"https://avatars.githubusercontent.com/u/533425?v=3","gravatar_id":"","url":"https://api.github.com/users/frerich","html_url":"https://github.com/frerich","followers_url":"https://api.github.com/users/frerich/followers","following_url":"https://api.github.com/users/frerich/following{/other_user}","gists_url":"https://api.github.com/users/frerich/gists{/gist_id}","starred_url":"https://api.github.com/users/frerich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frerich/subscriptions","organizations_url":"https://api.github.com/users/frerich/orgs","repos_url":"https://api.github.com/users/frerich/repos","events_url":"https://api.github.com/users/frerich/events{/privacy}","received_events_url":"https://api.github.com/users/frerich/received_events","type":"User","site_admin":false},"body":"This patch adds proper support for the DocBook <xref> element which is used to create cross references to other parts of the document - see http://www.docbook.org/tdg/en/html/xref.html.\r\n\r\nI didn't see an existing infrastructure to lookup elements by their ID attribute so I introduced a `dbContent` field to the state which can be used to access the DocBook file being read. As it is, the tree is searched for some element matching a given `id` every time an `<xref>` element is found. If this turns out to be too much of a slowdown for documents which make use of a lot of cross references, some simple cache (`M.Map String Element` or so) might help.\r\n\r\nThe same logic for referencing other elements would probably be useful for similiar elements, e.g. `<link>`.","created_at":"2015-09-23T21:47:27Z","updated_at":"2015-10-10T21:18:28Z","closed_at":"2015-10-10T21:18:28Z","merged_at":"2015-10-10T21:18:28Z","merge_commit_sha":"f74493e1b47f8dfa06d4c4eac14ac67128706ca5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jgm/pandoc/pulls/2412/commits","review_comments_url":"https://api.github.com/repos/jgm/pandoc/pulls/2412/comments","review_comment_url":"https://api.github.com/repos/jgm/pandoc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jgm/pandoc/issues/2412/comments","statuses_url":"https://api.github.com/repos/jgm/pandoc/statuses/eee992520cfe3d0d37185f998339690aae39f2c8","head":{"label":"frerich:reader/docbook/xref_support","ref":"reader/docbook/xref_support","sha":"eee992520cfe3d0d37185f998339690aae39f2c8","user":{"login":"frerich","id":533425,"avatar_url":"https://avatars.githubusercontent.com/u/533425?v=3","gravatar_id":"","url":"https://api.github.com/users/frerich","html_url":"https://github.com/frerich","followers_url":"https://api.github.com/users/frerich/followers","following_url":"https://api.github.com/users/frerich/following{/other_user}","gists_url":"https://api.github.com/users/frerich/gists{/gist_id}","starred_url":"https://api.github.com/users/frerich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frerich/subscriptions","organizations_url":"https://api.github.com/users/frerich/orgs","repos_url":"https://api.github.com/users/frerich/repos","events_url":"https://api.github.com/users/frerich/events{/privacy}","received_events_url":"https://api.github.com/users/frerich/received_events","type":"User","site_admin":false},"repo":{"id":42998683,"name":"pandoc","full_name":"frerich/pandoc","owner":{"login":"frerich","id":533425,"avatar_url":"https://avatars.githubusercontent.com/u/533425?v=3","gravatar_id":"","url":"https://api.github.com/users/frerich","html_url":"https://github.com/frerich","followers_url":"https://api.github.com/users/frerich/followers","following_url":"https://api.github.com/users/frerich/following{/other_user}","gists_url":"https://api.github.com/users/frerich/gists{/gist_id}","starred_url":"https://api.github.com/users/frerich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frerich/subscriptions","organizations_url":"https://api.github.com/users/frerich/orgs","repos_url":"https://api.github.com/users/frerich/repos","events_url":"https://api.github.com/users/frerich/events{/privacy}","received_events_url":"https://api.github.com/users/frerich/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/frerich/pandoc","description":"Universal markup converter","fork":true,"url":"https://api.github.com/repos/frerich/pandoc","forks_url":"https://api.github.com/repos/frerich/pandoc/forks","keys_url":"https://api.github.com/repos/frerich/pandoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/frerich/pandoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/frerich/pandoc/teams","hooks_url":"https://api.github.com/repos/frerich/pandoc/hooks","issue_events_url":"https://api.github.com/repos/frerich/pandoc/issues/events{/number}","events_url":"https://api.github.com/repos/frerich/pandoc/events","assignees_url":"https://api.github.com/repos/frerich/pandoc/assignees{/user}","branches_url":"https://api.github.com/repos/frerich/pandoc/branches{/branch}","tags_url":"https://api.github.com/repos/frerich/pandoc/tags","blobs_url":"https://api.github.com/repos/frerich/pandoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/frerich/pandoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/frerich/pandoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/frerich/pandoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/frerich/pandoc/statuses/{sha}","languages_url":"https://api.github.com/repos/frerich/pandoc/languages","stargazers_url":"https://api.github.com/repos/frerich/pandoc/stargazers","contributors_url":"https://api.github.com/repos/frerich/pandoc/contributors","subscribers_url":"https://api.github.com/repos/frerich/pandoc/subscribers","subscription_url":"https://api.github.com/repos/frerich/pandoc/subscription","commits_url":"https://api.github.com/repos/frerich/pandoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/frerich/pandoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/frerich/pandoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/frerich/pandoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/frerich/pandoc/contents/{+path}","compare_url":"https://api.github.com/repos/frerich/pandoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/frerich/pandoc/merges","archive_url":"https://api.github.com/repos/frerich/pandoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/frerich/pandoc/downloads","issues_url":"https://api.github.com/repos/frerich/pandoc/issues{/number}","pulls_url":"https://api.github.com/repos/frerich/pandoc/pulls{/number}","milestones_url":"https://api.github.com/repos/frerich/pandoc/milestones{/number}","notifications_url":"https://api.github.com/repos/frerich/pandoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/frerich/pandoc/labels{/name}","releases_url":"https://api.github.com/repos/frerich/pandoc/releases{/id}","created_at":"2015-09-23T12:11:34Z","updated_at":"2015-09-23T12:11:39Z","pushed_at":"2015-09-24T16:29:41Z","git_url":"git://github.com/frerich/pandoc.git","ssh_url":"git@github.com:frerich/pandoc.git","clone_url":"https://github.com/frerich/pandoc.git","svn_url":"https://github.com/frerich/pandoc","homepage":"http://johnmacfarlane.net/pandoc","size":24957,"stargazers_count":0,"watchers_count":0,"language":"Haskell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jgm:master","ref":"master","sha":"0c7d6fbabad02c1d630b70c40a5b5f43988445b7","user":{"login":"jgm","id":3044,"avatar_url":"https://avatars.githubusercontent.com/u/3044?v=3","gravatar_id":"","url":"https://api.github.com/users/jgm","html_url":"https://github.com/jgm","followers_url":"https://api.github.com/users/jgm/followers","following_url":"https://api.github.com/users/jgm/following{/other_user}","gists_url":"https://api.github.com/users/jgm/gists{/gist_id}","starred_url":"https://api.github.com/users/jgm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgm/subscriptions","organizations_url":"https://api.github.com/users/jgm/orgs","repos_url":"https://api.github.com/users/jgm/repos","events_url":"https://api.github.com/users/jgm/events{/privacy}","received_events_url":"https://api.github.com/users/jgm/received_events","type":"User","site_admin":false},"repo":{"id":571770,"name":"pandoc","full_name":"jgm/pandoc","owner":{"login":"jgm","id":3044,"avatar_url":"https://avatars.githubusercontent.com/u/3044?v=3","gravatar_id":"","url":"https://api.github.com/users/jgm","html_url":"https://github.com/jgm","followers_url":"https://api.github.com/users/jgm/followers","following_url":"https://api.github.com/users/jgm/following{/other_user}","gists_url":"https://api.github.com/users/jgm/gists{/gist_id}","starred_url":"https://api.github.com/users/jgm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgm/subscriptions","organizations_url":"https://api.github.com/users/jgm/orgs","repos_url":"https://api.github.com/users/jgm/repos","events_url":"https://api.github.com/users/jgm/events{/privacy}","received_events_url":"https://api.github.com/users/jgm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jgm/pandoc","description":"Universal markup converter","fork":false,"url":"https://api.github.com/repos/jgm/pandoc","forks_url":"https://api.github.com/repos/jgm/pandoc/forks","keys_url":"https://api.github.com/repos/jgm/pandoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jgm/pandoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jgm/pandoc/teams","hooks_url":"https://api.github.com/repos/jgm/pandoc/hooks","issue_events_url":"https://api.github.com/repos/jgm/pandoc/issues/events{/number}","events_url":"https://api.github.com/repos/jgm/pandoc/events","assignees_url":"https://api.github.com/repos/jgm/pandoc/assignees{/user}","branches_url":"https://api.github.com/repos/jgm/pandoc/branches{/branch}","tags_url":"https://api.github.com/repos/jgm/pandoc/tags","blobs_url":"https://api.github.com/repos/jgm/pandoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jgm/pandoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jgm/pandoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/jgm/pandoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jgm/pandoc/statuses/{sha}","languages_url":"https://api.github.com/repos/jgm/pandoc/languages","stargazers_url":"https://api.github.com/repos/jgm/pandoc/stargazers","contributors_url":"https://api.github.com/repos/jgm/pandoc/contributors","subscribers_url":"https://api.github.com/repos/jgm/pandoc/subscribers","subscription_url":"https://api.github.com/repos/jgm/pandoc/subscription","commits_url":"https://api.github.com/repos/jgm/pandoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/jgm/pandoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/jgm/pandoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/jgm/pandoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/jgm/pandoc/contents/{+path}","compare_url":"https://api.github.com/repos/jgm/pandoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jgm/pandoc/merges","archive_url":"https://api.github.com/repos/jgm/pandoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jgm/pandoc/downloads","issues_url":"https://api.github.com/repos/jgm/pandoc/issues{/number}","pulls_url":"https://api.github.com/repos/jgm/pandoc/pulls{/number}","milestones_url":"https://api.github.com/repos/jgm/pandoc/milestones{/number}","notifications_url":"https://api.github.com/repos/jgm/pandoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jgm/pandoc/labels{/name}","releases_url":"https://api.github.com/repos/jgm/pandoc/releases{/id}","created_at":"2010-03-20T20:34:23Z","updated_at":"2015-10-10T17:00:17Z","pushed_at":"2015-10-10T21:18:28Z","git_url":"git://github.com/jgm/pandoc.git","ssh_url":"git@github.com:jgm/pandoc.git","clone_url":"https://github.com/jgm/pandoc.git","svn_url":"https://github.com/jgm/pandoc","homepage":"http://johnmacfarlane.net/pandoc","size":36983,"stargazers_count":4825,"watchers_count":4825,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":646,"mirror_url":null,"open_issues_count":372,"forks":646,"open_issues":372,"watchers":4825,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jgm/pandoc/pulls/2412"},"html":{"href":"https://github.com/jgm/pandoc/pull/2412"},"issue":{"href":"https://api.github.com/repos/jgm/pandoc/issues/2412"},"comments":{"href":"https://api.github.com/repos/jgm/pandoc/issues/2412/comments"},"review_comments":{"href":"https://api.github.com/repos/jgm/pandoc/pulls/2412/comments"},"review_comment":{"href":"https://api.github.com/repos/jgm/pandoc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jgm/pandoc/pulls/2412/commits"},"statuses":{"href":"https://api.github.com/repos/jgm/pandoc/statuses/eee992520cfe3d0d37185f998339690aae39f2c8"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"jgm","id":3044,"avatar_url":"https://avatars.githubusercontent.com/u/3044?v=3","gravatar_id":"","url":"https://api.github.com/users/jgm","html_url":"https://github.com/jgm","followers_url":"https://api.github.com/users/jgm/followers","following_url":"https://api.github.com/users/jgm/following{/other_user}","gists_url":"https://api.github.com/users/jgm/gists{/gist_id}","starred_url":"https://api.github.com/users/jgm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgm/subscriptions","organizations_url":"https://api.github.com/users/jgm/orgs","repos_url":"https://api.github.com/users/jgm/repos","events_url":"https://api.github.com/users/jgm/events{/privacy}","received_events_url":"https://api.github.com/users/jgm/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":4,"additions":139,"deletions":5,"changed_files":5}}