Hi there,
I'm currently trying to extend the SVG DTD to allow me to have a new element in the <line> element like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY % SVG.line.extra.content "| hit">
<!ELEMENT hit (queryId, queryString) >
<!ELEMENT queryId (#PCDATA)>
<!ELEMENT queryString (#PCDATA)> ]>
<svg xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
style="fill-opacity:1; color-rendering:auto; color-interpolation:auto; stroke:black; text-rendering:auto; stroke-linecap:square; stroke-miterlimit:10; stroke-opacity:1; shape-rendering:auto; fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:'Dialog'; font-style:normal; stroke-linejoin:miter; font-size:12; stroke-dashoffset:0; image-rendering:auto;"
xsi:schemaLocation="http://www.w3.org/1999/xlink "
width="200"
height="100">
<text x="5" y="15" style="font-size:10; font-family:serif; stroke:none;" xml:space="preserve">Test matrix</text>
<rect x="0" y="30" width="10000" height="70" fill="black" stroke="black" stroke-width="1"/>
<g stroke="white">
<line y2="50" style="fill:none;" x1="100" x2="400" y1="50">
<hit>
<queryId>123123131232132</queryId>
<queryString>AAAATGACGAGAGAGAGAGAGAGAG"></queryString>
</hit>
</line>
</g>
</svg>
but it's failing to accept the XML as a valid SVG when using Batik's Java JSVGCanvas object. However, Mozilla firefox can view the image fine.
Can someone let me know what I'm doing wrong? I've looked at the W3C site which explains extensibility and I can't get their example version working either.
Many thanks,
Ben