{"issue":{"created_at":"2011-12-12T03:52:08Z","state":"open","updated_at":"2011-12-12T03:52:08Z","comments":0,"user":{"gravatar_id":"c683999da0b0c26c55570046732cdb54","id":294757,"url":"https://api.github.com/users/carlthewebmaster","avatar_url":"https://secure.gravatar.com/avatar/c683999da0b0c26c55570046732cdb54?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"carlthewebmaster"},"body":"The output XML is `(<xref ref-type=\"bibr\" rid=\"1\">1</xref>)` but the references are `<ref id=\"ref8\">`.\r\n\r\nXML validator complains that the rids don't match the ref ids.\r\n\r\nPossible fix:\r\n\r\nSee line 1699 in tinymce.php (`anno_xml_to_html_replace_references` function) and note how `#ref` is being inserted.\r\n\r\nThen see around line 75 in annoreferences.js:\r\n\r\n````\r\n    //TODO proper reference (text)\r\n    id = $(checkbox).attr('id').replace('reference-checkbox-', '');\r\n    text = $('label[for=\"reference-checkbox-' + id + '\"]').html();\r\n    id = parseInt(id) + 1;\r\n    xml += '<xref ref-type=\"bibr\" rid=\"' + id + '\">' + id + '</xref>';\r\n````\r\n\r\nPossibly insert string `ref` in last line above as the `rid` attribute of the `xref` element. \r\n\r\n> attribute can be text not number?","assignee":null,"id":2519221,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":27,"labels":[{"name":"verified","color":"02e10c","url":"https://api.github.com/repos/Annotum/Annotum/labels/verified"},{"name":"xml-import","color":"ededed","url":"https://api.github.com/repos/Annotum/Annotum/labels/xml-import"}],"title":"Invalid ref id in xml output","html_url":"https://github.com/Annotum/Annotum/issues/27","closed_at":null,"url":"https://api.github.com/repos/Annotum/Annotum/issues/27","milestone":null},"action":"opened"}