xml:id RE: [sc34wg3] Compact syntax requirement question

Lars Marius Garshol sc34wg3@isotopicmaps.org
Thu, 21 Jul 2005 09:43:31 +0200


* Murray Altheim
| 
| [on embedded XML in CTM]
|
| While an interesting and potentially valuable idea, this is the kind
| of thing that profoundly alters the requirements on programmers --
| in essense it means that in addition to writing a parser for CTM
| they must also provide support for XML fragment parsing and
| validation (which is markedly a lot more work and also decidedly
| different than XML document validation).

It's true that this does mean additional work, but those implementing
CTM parsers need not necessarily parse the embedded XML themselves.
It's quite easy to supply a "wrapper element" around the embedded XML
and leave the parsing to a real XML parser. In Java, for example, that
should require no more than 5-10 lines plus the code that reads the
parsed result (and the code dealing with the parsed fragment could
well be shared with the XTM reader).
 
| It certainly raises the bar to entry considerably and would require
| both an EBNF for CTM and another for XML.

Not necessarily. The EBNF for XML already exists, and so we could do
this by referencing it. Basically, referencing the "content"
production from the CTM EBNF should do the trick.

Having said all this, I have to say I find Jirka's suggestion
interesting. I'm not sure whether we want XML-as-XML in CTM or
XML-as-in-RNC; this is definitely something to consider carefully.

| With XTM 1.1 at least the parser was already available.

Well, it's not as if XTM 1.1 (or 1.0) is that easy to support. In
fact, in the OKS there is more code to support XTM (~1300 lines) than
to support LTM (~750 lines), and the XTM code was a lot more work.
I'll grant you that LTM does not support embedded markup.

-- 
Lars Marius Garshol, Ontopian         <URL: http://www.ontopia.net >
GSM: +47 98 21 55 50                  <URL: http://www.garshol.priv.no >