> There's a tool from Andrew Welch called lexEv that reaches parts of the
> input document that aren't normally visible to applications - I'm not sure
> if that includes the DOCTYPE declaration.
Yes if you run the transform using Kernow with LexEx enabled (Kernow
Options -> LexEv -> tick the box), then pi's will appear in your input
with the information:
<?doctype-public -//getstart DTD v1.0//EN?><?doctype-system getstart.dtd?>
...which you can then access using....
the code you've already got :)