[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Escher could have drawn it (Re: XML Schema and Entities)
- From: Peter Flynn <peter@silmaril.ie>
- To: Alaric Snell <alaric@alaric-snell.com>
- Date: Fri, 22 Jun 2001 16:46:53 +0100
At Friday, 22 June 2001, Alaric Snell <alaric@alaric-snell.com> wrote:
>But... they're called Processing Instructions!
A historical curiosity. It refers to processing the document *after*
SGML
has finished with it (eg typesetting).
>My only example of their real-world use is in PHP:
>
><foo>
><?php
> ... executable code! ...
>?>
></foo>
>
>....but PHP just happens to use that syntax for compatability, you
can just as
>easily write:
>
><<?php echo $element_name?> foo="bar">
> Content!
></<?php echo $element_name?>>
But then you have invalid markup, which is both useless and pointless.
>because it finds the <?php with a state machine that traverses the
script.
No, because PHP neither knows nor cares about preserving
the non-PHP parts of the document.
>> For example you can encode a forced line-break in a title that
>> you know will be required when the document is typeset but which
>> you don't wish to hard-code wrt the document structure:
>>
>> <title>How I Made <?LaTeX \\?>A Million Dollars</title>
>
>Eeeeek.
If you are worried by this then I think you have missed the point.
><title>How I Made <typesetting-hints:linebreak />A Million Dollars</title>
>
>....suits me more :-)
That is perfectly possible, but it requires adding to the DTD or
Schema if
one is in use. The whole point about PIs is that they are NOT part
of the
structure of the document. In TEI I often use <LB> for linebreaks
because
it *IS* part of the document structure when you are encoding the
typographic
appearance of a historical document. When the linebreak is merely
incidental
to the appearance on a current occasion, a PI is more appropriate.
///Peter