Re: Alternative syntaxes for the prolog

On Tue, 2024-03-05 at 14:59 +0000, Steven Pemberton wrote:
> 
> You can always supply metadata in comments.

There are certainly systems that work that way. An example is
PostScript, where metadata to mark page boundaries and to identify the
language as Postscript and the language version and the intended page
size were added after the interpreter had shipped, so they were put
into comments to avoid breakage.

They had, however, reserved comments with a particular prefix, so they
were able to do this safely:

%!PS-Adobe-3.0 EPSF-3.0
%%Creator: cairo 1.10.2 (http://cairographics.org)
%%CreationDate: Mon Feb 20 17:29:11 2012
%%Pages: 1
%%BoundingBox: 0 -1 249 170
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%EndComments
%%BeginProlog

and so on. PostScript is not line-based, but comments are.

The trouble with this approach is there’s no introspection possible.
You can’t write a PostScript program that knows the size of the
bounding box or the language level or the creation date. In practice
that’s usually OK, as it’s the interpreter that may need to know, and
modern PostScript interpreters can read the comments if they want.

So there’s maybe a reason for iXML to use comments for metadata, as
long as it’s marked unambiguously - it won’t affect existing iXML
implementations.

liam

-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org

Received on Tuesday, 5 March 2024 19:44:12 UTC