{"action":"opened","number":2945,"pull_request":{"url":"https://api.github.com/repos/dita-ot/dita-ot/pulls/2945","id":185010533,"html_url":"https://github.com/dita-ot/dita-ot/pull/2945","diff_url":"https://github.com/dita-ot/dita-ot/pull/2945.diff","patch_url":"https://github.com/dita-ot/dita-ot/pull/2945.patch","issue_url":"https://api.github.com/repos/dita-ot/dita-ot/issues/2945","number":2945,"state":"open","locked":false,"title":"Remove obsolete code to fix fragref error","user":{"login":"robander","id":1649639,"avatar_url":"https://avatars2.githubusercontent.com/u/1649639?v=4","gravatar_id":"","url":"https://api.github.com/users/robander","html_url":"https://github.com/robander","followers_url":"https://api.github.com/users/robander/followers","following_url":"https://api.github.com/users/robander/following{/other_user}","gists_url":"https://api.github.com/users/robander/gists{/gist_id}","starred_url":"https://api.github.com/users/robander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robander/subscriptions","organizations_url":"https://api.github.com/users/robander/orgs","repos_url":"https://api.github.com/users/robander/repos","events_url":"https://api.github.com/users/robander/events{/privacy}","received_events_url":"https://api.github.com/users/robander/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Robert D Anderson <robander@us.ibm.com>\r\n\r\n## Description\r\n\r\nReplaces a lot of obsolete overrides for `<fragref>` with a much simpler override using the latest designs from the `topicpull` module. This resolves a processing error that appears today when using `<fragref>` to reference a syntax diagram fragment:\r\n\r\n```\r\n[topicpull] Failed to transform document: A value must be supplied for parameter\r\n $targetElement because the default value is not a valid instance of the required type\r\n```\r\n\r\n## Motivation and Context\r\n\r\nDITA-OT has had custom `topicpull` processing for the `<fragref>` element for as long as I can remember. The original purpose was to do two things:\r\n\r\n1. Prevent processing from generating `<desc>` into the cross reference, which would never make sense if `<fragref>` was used as designed. Although the `<fragref>` element is specialized from `<xref>`, it specifically excludes `<desc>` as a child, and having that show up caused problems with some tools designed with that restriction in mind.\r\n1. Avoid warning message for `<fragref>` elements without `@href`, as long as the element provided content.\r\n\r\nThe overall design for `topicpull` has been significantly improved since we created the override. The existing override for `fragref` uses over 100 lines to 1) override `fragref` matching to avoid the \"missing `@href`\" message, and 2) override `get-stuff` to avoid getting a description. The older code is still based on the original design, meaning that it passes parameters that do nothing and does not pass required parameters, resulting in the error above.\r\n\r\nReplacing all of those overrides with two simple match statements simplifies the code, fulfills the original requirements, and fixes the error.\r\n\r\n## How Has This Been Tested?\r\n\r\nPassed all automated tests; also tested with original documents that resulted in this error, and with following test case that also resulted in the error:\r\n```\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!DOCTYPE topic PUBLIC \"-//OASIS//DTD DITA Topic//EN\" \"topic.dtd\">\r\n<topic id=\"frag\" xml:lang=\"en-us\">\r\n <title>test fragref</title>\r\n <body>\r\n  <syntaxdiagram id=\"syntaxdiagram_w34_52d_rdb\">\r\n   <groupchoice><kwd>a</kwd>\r\n    <fragref href=\"#frag/bees\"/><fragref>B without href</fragref>\r\n   <kwd>c</kwd></groupchoice>\r\n   <fragment id=\"bees\">\r\n    <title>LOTS OF B OPTIONS</title>\r\n    <groupseq><kwd>B</kwd><kwd>b</kwd><kwd>BB</kwd><kwd>bb</kwd><kwd>Βeta</kwd><kwd>β</kwd></groupseq>\r\n   </fragment>\r\n  </syntaxdiagram>\r\n </body>\r\n</topic>\r\n```\r\n\r\n## Type of Changes\r\n\r\n- Bug fix _(non-breaking change which fixes an issue)_","created_at":"2018-04-30T17:04:42Z","updated_at":"2018-04-30T17:04:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"robander","id":1649639,"avatar_url":"https://avatars2.githubusercontent.com/u/1649639?v=4","gravatar_id":"","url":"https://api.github.com/users/robander","html_url":"https://github.com/robander","followers_url":"https://api.github.com/users/robander/followers","following_url":"https://api.github.com/users/robander/following{/other_user}","gists_url":"https://api.github.com/users/robander/gists{/gist_id}","starred_url":"https://api.github.com/users/robander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robander/subscriptions","organizations_url":"https://api.github.com/users/robander/orgs","repos_url":"https://api.github.com/users/robander/repos","events_url":"https://api.github.com/users/robander/events{/privacy}","received_events_url":"https://api.github.com/users/robander/received_events","type":"User","site_admin":false},"assignees":[{"login":"robander","id":1649639,"avatar_url":"https://avatars2.githubusercontent.com/u/1649639?v=4","gravatar_id":"","url":"https://api.github.com/users/robander","html_url":"https://github.com/robander","followers_url":"https://api.github.com/users/robander/followers","following_url":"https://api.github.com/users/robander/following{/other_user}","gists_url":"https://api.github.com/users/robander/gists{/gist_id}","starred_url":"https://api.github.com/users/robander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robander/subscriptions","organizations_url":"https://api.github.com/users/robander/orgs","repos_url":"https://api.github.com/users/robander/repos","events_url":"https://api.github.com/users/robander/events{/privacy}","received_events_url":"https://api.github.com/users/robander/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":4530312,"url":"https://api.github.com/repos/dita-ot/dita-ot/labels/preprocess","name":"preprocess","color":"84b6e8","default":false},{"id":559852514,"url":"https://api.github.com/repos/dita-ot/dita-ot/labels/preprocess2","name":"preprocess2","color":"84b6e8","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dita-ot/dita-ot/pulls/2945/commits","review_comments_url":"https://api.github.com/repos/dita-ot/dita-ot/pulls/2945/comments","review_comment_url":"https://api.github.com/repos/dita-ot/dita-ot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dita-ot/dita-ot/issues/2945/comments","statuses_url":"https://api.github.com/repos/dita-ot/dita-ot/statuses/35fb3a630136e71ddf6525574d7840e1cc8e837b","head":{"label":"robander:hotfix/fragref","ref":"hotfix/fragref","sha":"35fb3a630136e71ddf6525574d7840e1cc8e837b","user":{"login":"robander","id":1649639,"avatar_url":"https://avatars2.githubusercontent.com/u/1649639?v=4","gravatar_id":"","url":"https://api.github.com/users/robander","html_url":"https://github.com/robander","followers_url":"https://api.github.com/users/robander/followers","following_url":"https://api.github.com/users/robander/following{/other_user}","gists_url":"https://api.github.com/users/robander/gists{/gist_id}","starred_url":"https://api.github.com/users/robander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robander/subscriptions","organizations_url":"https://api.github.com/users/robander/orgs","repos_url":"https://api.github.com/users/robander/repos","events_url":"https://api.github.com/users/robander/events{/privacy}","received_events_url":"https://api.github.com/users/robander/received_events","type":"User","site_admin":false},"repo":{"id":5987098,"name":"dita-ot","full_name":"robander/dita-ot","owner":{"login":"robander","id":1649639,"avatar_url":"https://avatars2.githubusercontent.com/u/1649639?v=4","gravatar_id":"","url":"https://api.github.com/users/robander","html_url":"https://github.com/robander","followers_url":"https://api.github.com/users/robander/followers","following_url":"https://api.github.com/users/robander/following{/other_user}","gists_url":"https://api.github.com/users/robander/gists{/gist_id}","starred_url":"https://api.github.com/users/robander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robander/subscriptions","organizations_url":"https://api.github.com/users/robander/orgs","repos_url":"https://api.github.com/users/robander/repos","events_url":"https://api.github.com/users/robander/events{/privacy}","received_events_url":"https://api.github.com/users/robander/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robander/dita-ot","description":"The DITA Open Toolkit is an implementation of the OASIS DITA XML Specification.","fork":true,"url":"https://api.github.com/repos/robander/dita-ot","forks_url":"https://api.github.com/repos/robander/dita-ot/forks","keys_url":"https://api.github.com/repos/robander/dita-ot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robander/dita-ot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robander/dita-ot/teams","hooks_url":"https://api.github.com/repos/robander/dita-ot/hooks","issue_events_url":"https://api.github.com/repos/robander/dita-ot/issues/events{/number}","events_url":"https://api.github.com/repos/robander/dita-ot/events","assignees_url":"https://api.github.com/repos/robander/dita-ot/assignees{/user}","branches_url":"https://api.github.com/repos/robander/dita-ot/branches{/branch}","tags_url":"https://api.github.com/repos/robander/dita-ot/tags","blobs_url":"https://api.github.com/repos/robander/dita-ot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robander/dita-ot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robander/dita-ot/git/refs{/sha}","trees_url":"https://api.github.com/repos/robander/dita-ot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robander/dita-ot/statuses/{sha}","languages_url":"https://api.github.com/repos/robander/dita-ot/languages","stargazers_url":"https://api.github.com/repos/robander/dita-ot/stargazers","contributors_url":"https://api.github.com/repos/robander/dita-ot/contributors","subscribers_url":"https://api.github.com/repos/robander/dita-ot/subscribers","subscription_url":"https://api.github.com/repos/robander/dita-ot/subscription","commits_url":"https://api.github.com/repos/robander/dita-ot/commits{/sha}","git_commits_url":"https://api.github.com/repos/robander/dita-ot/git/commits{/sha}","comments_url":"https://api.github.com/repos/robander/dita-ot/comments{/number}","issue_comment_url":"https://api.github.com/repos/robander/dita-ot/issues/comments{/number}","contents_url":"https://api.github.com/repos/robander/dita-ot/contents/{+path}","compare_url":"https://api.github.com/repos/robander/dita-ot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robander/dita-ot/merges","archive_url":"https://api.github.com/repos/robander/dita-ot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robander/dita-ot/downloads","issues_url":"https://api.github.com/repos/robander/dita-ot/issues{/number}","pulls_url":"https://api.github.com/repos/robander/dita-ot/pulls{/number}","milestones_url":"https://api.github.com/repos/robander/dita-ot/milestones{/number}","notifications_url":"https://api.github.com/repos/robander/dita-ot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robander/dita-ot/labels{/name}","releases_url":"https://api.github.com/repos/robander/dita-ot/releases{/id}","deployments_url":"https://api.github.com/repos/robander/dita-ot/deployments","created_at":"2012-09-27T19:02:03Z","updated_at":"2017-02-03T19:54:27Z","pushed_at":"2018-04-30T16:42:16Z","git_url":"git://github.com/robander/dita-ot.git","ssh_url":"git@github.com:robander/dita-ot.git","clone_url":"https://github.com/robander/dita-ot.git","svn_url":"https://github.com/robander/dita-ot","homepage":"http://dita-ot.org","size":95724,"stargazers_count":0,"watchers_count":0,"language":"XSLT","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dita-ot:hotfix/3.0.4","ref":"hotfix/3.0.4","sha":"6d1c4a6e1fc7c26129a84d5eec255dd61382eae3","user":{"login":"dita-ot","id":1642274,"avatar_url":"https://avatars0.githubusercontent.com/u/1642274?v=4","gravatar_id":"","url":"https://api.github.com/users/dita-ot","html_url":"https://github.com/dita-ot","followers_url":"https://api.github.com/users/dita-ot/followers","following_url":"https://api.github.com/users/dita-ot/following{/other_user}","gists_url":"https://api.github.com/users/dita-ot/gists{/gist_id}","starred_url":"https://api.github.com/users/dita-ot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dita-ot/subscriptions","organizations_url":"https://api.github.com/users/dita-ot/orgs","repos_url":"https://api.github.com/users/dita-ot/repos","events_url":"https://api.github.com/users/dita-ot/events{/privacy}","received_events_url":"https://api.github.com/users/dita-ot/received_events","type":"Organization","site_admin":false},"repo":{"id":4022719,"name":"dita-ot","full_name":"dita-ot/dita-ot","owner":{"login":"dita-ot","id":1642274,"avatar_url":"https://avatars0.githubusercontent.com/u/1642274?v=4","gravatar_id":"","url":"https://api.github.com/users/dita-ot","html_url":"https://github.com/dita-ot","followers_url":"https://api.github.com/users/dita-ot/followers","following_url":"https://api.github.com/users/dita-ot/following{/other_user}","gists_url":"https://api.github.com/users/dita-ot/gists{/gist_id}","starred_url":"https://api.github.com/users/dita-ot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dita-ot/subscriptions","organizations_url":"https://api.github.com/users/dita-ot/orgs","repos_url":"https://api.github.com/users/dita-ot/repos","events_url":"https://api.github.com/users/dita-ot/events{/privacy}","received_events_url":"https://api.github.com/users/dita-ot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dita-ot/dita-ot","description":"The DITA Open Toolkit is an implementation of the OASIS DITA specification.","fork":false,"url":"https://api.github.com/repos/dita-ot/dita-ot","forks_url":"https://api.github.com/repos/dita-ot/dita-ot/forks","keys_url":"https://api.github.com/repos/dita-ot/dita-ot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dita-ot/dita-ot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dita-ot/dita-ot/teams","hooks_url":"https://api.github.com/repos/dita-ot/dita-ot/hooks","issue_events_url":"https://api.github.com/repos/dita-ot/dita-ot/issues/events{/number}","events_url":"https://api.github.com/repos/dita-ot/dita-ot/events","assignees_url":"https://api.github.com/repos/dita-ot/dita-ot/assignees{/user}","branches_url":"https://api.github.com/repos/dita-ot/dita-ot/branches{/branch}","tags_url":"https://api.github.com/repos/dita-ot/dita-ot/tags","blobs_url":"https://api.github.com/repos/dita-ot/dita-ot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dita-ot/dita-ot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dita-ot/dita-ot/git/refs{/sha}","trees_url":"https://api.github.com/repos/dita-ot/dita-ot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dita-ot/dita-ot/statuses/{sha}","languages_url":"https://api.github.com/repos/dita-ot/dita-ot/languages","stargazers_url":"https://api.github.com/repos/dita-ot/dita-ot/stargazers","contributors_url":"https://api.github.com/repos/dita-ot/dita-ot/contributors","subscribers_url":"https://api.github.com/repos/dita-ot/dita-ot/subscribers","subscription_url":"https://api.github.com/repos/dita-ot/dita-ot/subscription","commits_url":"https://api.github.com/repos/dita-ot/dita-ot/commits{/sha}","git_commits_url":"https://api.github.com/repos/dita-ot/dita-ot/git/commits{/sha}","comments_url":"https://api.github.com/repos/dita-ot/dita-ot/comments{/number}","issue_comment_url":"https://api.github.com/repos/dita-ot/dita-ot/issues/comments{/number}","contents_url":"https://api.github.com/repos/dita-ot/dita-ot/contents/{+path}","compare_url":"https://api.github.com/repos/dita-ot/dita-ot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dita-ot/dita-ot/merges","archive_url":"https://api.github.com/repos/dita-ot/dita-ot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dita-ot/dita-ot/downloads","issues_url":"https://api.github.com/repos/dita-ot/dita-ot/issues{/number}","pulls_url":"https://api.github.com/repos/dita-ot/dita-ot/pulls{/number}","milestones_url":"https://api.github.com/repos/dita-ot/dita-ot/milestones{/number}","notifications_url":"https://api.github.com/repos/dita-ot/dita-ot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dita-ot/dita-ot/labels{/name}","releases_url":"https://api.github.com/repos/dita-ot/dita-ot/releases{/id}","deployments_url":"https://api.github.com/repos/dita-ot/dita-ot/deployments","created_at":"2012-04-14T04:49:04Z","updated_at":"2018-04-27T14:50:08Z","pushed_at":"2018-04-23T16:57:39Z","git_url":"git://github.com/dita-ot/dita-ot.git","ssh_url":"git@github.com:dita-ot/dita-ot.git","clone_url":"https://github.com/dita-ot/dita-ot.git","svn_url":"https://github.com/dita-ot/dita-ot","homepage":"http://www.dita-ot.org/","size":96130,"stargazers_count":189,"watchers_count":189,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"archived":false,"open_issues_count":372,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":107,"open_issues":372,"watchers":189,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/dita-ot/dita-ot/pulls/2945"},"html":{"href":"https://github.com/dita-ot/dita-ot/pull/2945"},"issue":{"href":"https://api.github.com/repos/dita-ot/dita-ot/issues/2945"},"comments":{"href":"https://api.github.com/repos/dita-ot/dita-ot/issues/2945/comments"},"review_comments":{"href":"https://api.github.com/repos/dita-ot/dita-ot/pulls/2945/comments"},"review_comment":{"href":"https://api.github.com/repos/dita-ot/dita-ot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dita-ot/dita-ot/pulls/2945/commits"},"statuses":{"href":"https://api.github.com/repos/dita-ot/dita-ot/statuses/35fb3a630136e71ddf6525574d7840e1cc8e837b"}},"author_association":"OWNER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":9,"deletions":126,"changed_files":1}}
{"actor":{"display_login":"robander"}}