Background : working with MediaWiki 1.19.1, Graphviz 2.28.0, extension: GraphViz 0.9 on the WAMP stack (Server 2008, Apache 2.4.2, MySQL 5.5.27, PHP 5.4.5), Everything works fine and, as expected, for the basic functions of rendering a clickable image from a Graphviz chart using the GraphViz extension in MediaWiki.
Problem . Image map links are not added to the pagelinks MediaWiki table. I understand why they are not added, but it becomes a problem if it is not possible to follow links with the functionality of "What links are here."
Desired solution . While processing the chart in the GraphViz extension, I would like to use the generated .map file to then create a list of wikilinks to add to the page to get lifted by MediaWiki and added to the pagelinks table.
Read more : This GraphViz extension code:
<graphviz border='frame' format='png'>
digraph example1 {
nodeHello [
label="I say Hello",
URL="Hello"
]
nodeWorld [
label="You say World!",
URL="World"
]
nodeHello -> nodeWorld!
}
</graphviz>
Creates this image:

And this image card code in the corresponding .map file on the server:
<map id="example1" name="example1">
<area shape="poly" id="node1" href="Hello" title="I say Hello" alt="" coords="164,29,161,22,151,15,137,10,118,7,97,5,77,7,58,10,43,15,34,22,31,29,34,37,43,43,58,49,77,52,97,53,118,52,137,49,151,43,161,37"/>
<area shape="poly" id="node2" href="World" title="You say World!" alt="" coords="190,125,186,118,172,111,152,106,126,103,97,101,69,103,43,106,22,111,9,118,5,125,9,133,22,139,43,145,69,148,97,149,126,148,152,145,172,139,186,133"/>
</map>
From this image map file, I would like to be able to extract href and title to create wikilinks as follows:
[[Hello|I say Hello]]
[[World|You say World!]]
, , .map XML, XPATH , . PHP , , XML/XPATH, , .
/ wikilinks .map, , GraphViz.php, , pagelinks.
. , . , , , XPATH, , . , , , .
$xml = new SimpleXMLElement( $map );
foreach($xml->area as $item) {
$links .= "[[" . $item->attributes()->href . "|" . $item->attributes()->title . "]]";
}
. . .
, . , .