On Mon, Aug 06, 2001 at 03:27:53PM +0200, Asger K. Alstrup Nielsen wrote:
> On Mon, 6 Aug 2001, John Levon wrote:
>
> > > No, I don't think you understand what I mean by XML-like. Let's call
> > > it well-formed XML instead.
>
> I guess the point is that we don't want to a full-blown XML parser in LyX.
>
> Therefore, the LyX document format can look like XML, but there
> are constraints to what the program will read. E.g. some well-formed
> XML documents will be rejected by LyX.
Having recently done an XML seminar at work, I can offer the following
to the discussion:
- Well-Formed XML:
A text file following the minimal requirements for an XML document.
This includes the initial "<? xml-1.0 ?>" tag, a single root-level
node, no cross-nested blocks, and a few other simple rules.
- Valid XML:
A well-formed XML file that conforms to a known format. Thus, LyX
v12.9 files will be valid XML files.
For "well-formed", think "lex". For "valid", think "yacc".
As for fear of an "XML parser", there are, IIRC, levels of compliance
when it comes to parsers. You can write an XML parser that only reads
XML files in a specific valid format. Nothing wrong there. A
fully-compliant parser will also parse XSL files, enabling it to read
any XML document ever written, now or in the future. That, we do not
need.
Once we do design an XML-based LyX format, I suggest we document the
format using XSL. There's no magic around XSL: it's just an XML
document that uses a format designed for defining other XML formats.
I'll even volunteer to work on it (I'd like to improve my XML skills).
--
John Weiss
"Not through coercion. Not by force. But by compassion. By
affection. And, a small fish." -His Holiness, the 14th Dalai Lama