Feature proposal: source location in XML output

Feature proposal: source location in XML output

Following up Github issue #168 https://github.com/invisibleXML/ixml/issues/=
168, on handling XML
or LaTeX like input markup.

 I have started trying out IXML and encountered similar problem of embeddin=
g some markup in
 the input that can be converted to XML tags in the final form.

 I suppose XML with an unconstrained set of tag is not covered by CFG. Actu=
ally, if the input is
 structured (i.e. can be handled by grammar below) it is not necessary to h=
ave the closing tag
 carrying a tag name (by specify -closetag).

line: (text; node)+ .
node: @opentag, text, @closetag
   =20
 If one wants to verify input is well formed XML, or a =E2=80=9Cproper=E2=
=80=9D LaTeX markup, it would likely be
 done in a XSLT post pass.

 I think that leads to the demand for an implementation definable extension=
 to IXML that adds
 the source location to the resulting XML, that for any serious markup deve=
lopment this can be
 used as concrete syntax tree.

 Now, for certain markup design, the closing tag is optional or implicit. O=
ne example is GML
 which influenced HTML to allow the closing </p> become optional. In such c=
ases IXML is more
 like a lexer and further parsing requires the power of XSLT.

-------------------------------------------------------------------------

LdBeth

--Multipart_Wed_Jan_11_08:28:07_2023-1
Content-Type: text/html;charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Feature proposal: source location in XML output</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body style="margin:0;padding:0;"><div style="margin:70px;font-family: Arial, Helvetica, sans-serif;">
    <p><em>Following up Github issue #168</em>
    <a href="https://github.com/invisibleXML/ixml/issues/168">https://github.com/invisibleXML/ixml/issues/168</a>,
    <em>on handling XML or LaTeX like input markup.</em></p>
    <blockquote style="margin:0 0 0 .8ex;border-left:4px #ccc solid;padding-left:1ex;color:#333;">
    <p>I have started trying out IXML and encountered similar problem
    of embedding some markup in the input that can be converted to XML
    tags in the final form.</p>

    <p>I suppose XML with an unconstrained set of tag is not covered
    by CFG. Actually, if the input is structured (i.e. can be handled
    by grammar below) it is not necessary to have the closing tag
    carrying a tag name (by specify <code>-closetag</code>).</p>

    <pre>line: (text; node)+ .
node: @opentag, text, @closetag
    </pre>

    <p> If one wants to verify input is well formed XML, or a “proper”
    LaTeX markup, it would likely be done in a XSLT post pass.</p>

    <p>I think that leads to the demand for an implementation
    definable extension to IXML that adds the source location to the
    resulting XML, that for any serious markup development this can be
    used as concrete syntax tree.</p>

    <p>Now, for certain markup design, the closing tag is optional or
    implicit. One example is GML which influenced HTML to allow the
    closing <code>&lt;/p&gt;</code> become optional. In such cases IXML is
    more like a lexer and further parsing requires the power of
    XSLT.</p>
    </blockquote>
  <hr/><div class="signature">
    <p>LdBeth</p>
  </div></div></body></html>
--Multipart_Wed_Jan_11_08:28:07_2023-1--

Received on Thursday, 12 January 2023 08:03:43 UTC