SGML Id Tool (was: suggest validator prefer URI to FPI)

> Patches gratefully accepted!

Though SP doesn't include external identifiers in its ESIS output, it
does provide access to them through its generic API, making it possible
to build a tool on top of it in C++ that outputs just the PubID and
SysID (if present) on two consecutive lines. And I've done just that.

All of the instructions and source are available at:

    http://inamidst.com/proj/sgmlid/

I suggest you grab sgmlid.tar.gz, unpack it, and then follow the
instructions in the README.txt file.

Here's an example of the kind of thing that it does:

[[[
$ ./sgmlid test.html 2> /dev/null
PUBLIC: -//W3C//DTD XHTML 1.0 Strict//EN
SYSTEM: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
]]]

Note that SP may raise various errors along the way that you have to
redirect off to /dev/null as shown.

I can release sgmlid under whichever open source license you require
should you want to incorporate it into the validator codebase. Even if,
as is most likely, you do not want to use the code, it at least
demonstrates that this problem is an extremely easy one to fix with
relatively little application.

Whatever the tool used, I suggest you simply peek at the PubId and
SysId, and if they don't match raise some kind of achingly obvious
"Fatal Warning" to users: I don't believe that defaulting to either ID
is acceptable given that inconsistency will never be intentional on the
behalf of the user or their authoring tool.

Thanks,

-- 
Sean B. Palmer, http://inamidst.com/

Received on Thursday, 5 August 2004 18:05:34 UTC