I'm trying to use sablotron and a xsl file to generate svg on the fly.
Creating the svg isn't a problem but getting it to display is. I'm sure it has something to do with the way I'm sending out the header. This is a shortened example of the code.
This is what gets displayed in the browser, simply as text:
Loughborough
And this is the source code of the page:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN" "http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="100" height="30">
<a xlink:href="http://allen.suppose.co.uk" xlink:type="simple">Loughborough</a>
</svg>
This is the relevant bits of the call page:
<?php
$xh = xslt_create();
header("Content-type: image/svg+xml");
print xslt_process($xh, 'projectsdb.xml', 'svg.xsl');
xslt_free($xh);
?>
Anyone done anything like that that can help.