{"action":"created","issue":{"url":"https://api.github.com/repos/ellson/graphviz/issues/41","labels_url":"https://api.github.com/repos/ellson/graphviz/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/ellson/graphviz/issues/41/comments","events_url":"https://api.github.com/repos/ellson/graphviz/issues/41/events","html_url":"https://github.com/ellson/graphviz/issues/41","id":58369090,"number":41,"title":"[SVG] tooltip dot attribute's append a useless subnode","user":{"login":"bioinfornatics","id":491720,"avatar_url":"https://avatars.githubusercontent.com/u/491720?v=3","gravatar_id":"","url":"https://api.github.com/users/bioinfornatics","html_url":"https://github.com/bioinfornatics","followers_url":"https://api.github.com/users/bioinfornatics/followers","following_url":"https://api.github.com/users/bioinfornatics/following{/other_user}","gists_url":"https://api.github.com/users/bioinfornatics/gists{/gist_id}","starred_url":"https://api.github.com/users/bioinfornatics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bioinfornatics/subscriptions","organizations_url":"https://api.github.com/users/bioinfornatics/orgs","repos_url":"https://api.github.com/users/bioinfornatics/repos","events_url":"https://api.github.com/users/bioinfornatics/events{/privacy}","received_events_url":"https://api.github.com/users/bioinfornatics/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-20T15:39:05Z","updated_at":"2015-02-20T16:32:47Z","closed_at":null,"body":"Dear,\r\n\r\nwhen using:\r\n\r\n```dot\r\ndigraph G {\r\n    A[ label=\"test\", id=\"test\", tooltip=\"<b>I test</b> cool\"];\r\n}\r\n```\r\n\r\nthat generate:\r\n\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n -->\r\n<!-- Title: G Pages: 1 -->\r\n<svg width=\"62pt\" height=\"44pt\"\r\n viewBox=\"0.00 0.00 62.00 44.00\"\r\n    xmlns=\"http://www.w3.org/2000/svg\"\r\n    xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n    <g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 40)\">\r\n        <title>G</title>\r\n        <polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-40 58,-40 58,4 -4,4\"/>\r\n        <!-- A -->\r\n        <g id=\"test\" class=\"node\">\r\n            <title>A</title>\r\n            <g id=\"a_test\">\r\n                <a xlink:title=\"&lt;b&gt;I test &lt;/b&gt; cool\">\r\n                    <ellipse fill=\"none\" stroke=\"black\" cx=\"27\" cy=\"-18\" rx=\"27\" ry=\"18\"/>\r\n                    <text text-anchor=\"middle\" x=\"27\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">test</text>\r\n                </a>\r\n            </g>\r\n        </g>\r\n    </g>\r\n```\r\n\r\nextra `<g>` is uselless in more that generate a new id which not ease javascript usage on it.\r\n\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n -->\r\n<!-- Title: G Pages: 1 -->\r\n<svg width=\"62pt\" height=\"44pt\"\r\n viewBox=\"0.00 0.00 62.00 44.00\"\r\n    xmlns=\"http://www.w3.org/2000/svg\"\r\n    xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n    <g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 40)\">\r\n        <title>G</title>\r\n        <polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-40 58,-40 58,4 -4,4\"/>\r\n        <!-- A -->\r\n        <g id=\"test\" class=\"node\" title=\"&lt;b&gt;I test &lt;/b&gt; cool\">\r\n            <title>A</title>\r\n            <ellipse fill=\"none\" stroke=\"black\" cx=\"27\" cy=\"-18\" rx=\"27\" ry=\"18\"/>\r\n            <text text-anchor=\"middle\" x=\"27\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">test</text>\r\n        </g>\r\n    </g>\r\n</svg>\r\n```"},"comment":{"url":"https://api.github.com/repos/ellson/graphviz/issues/comments/75267984","html_url":"https://github.com/ellson/graphviz/issues/41#issuecomment-75267984","issue_url":"https://api.github.com/repos/ellson/graphviz/issues/41","id":75267984,"user":{"login":"magneticnorth","id":2840271,"avatar_url":"https://avatars.githubusercontent.com/u/2840271?v=3","gravatar_id":"","url":"https://api.github.com/users/magneticnorth","html_url":"https://github.com/magneticnorth","followers_url":"https://api.github.com/users/magneticnorth/followers","following_url":"https://api.github.com/users/magneticnorth/following{/other_user}","gists_url":"https://api.github.com/users/magneticnorth/gists{/gist_id}","starred_url":"https://api.github.com/users/magneticnorth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magneticnorth/subscriptions","organizations_url":"https://api.github.com/users/magneticnorth/orgs","repos_url":"https://api.github.com/users/magneticnorth/repos","events_url":"https://api.github.com/users/magneticnorth/events{/privacy}","received_events_url":"https://api.github.com/users/magneticnorth/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T16:32:47Z","updated_at":"2015-02-20T16:32:47Z","body":"Sure. The main point is that a given subgraph, node or edge could potentially have more than one associated text label (or one label with several styles) so it is not surprising that the code generator creates a <g> context whenever it may be needed to save/restore the current state. Therefore asking to get rid of <g> nodes in the generated code is probably not the right idea. If you need to bind an event to a particular <g> node, it might be better to figure out how to identify that node unambiguously,. "}}