help / color / mirror / Atom feed
From: Ingo Schwarze <>
To: Stephen Gregoratto <>
Subject: Re: Parsing errors, output regressions with new XML parser
Date: Tue, 2 Apr 2019 19:48:53 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <20190330001919.rrbc2xxrx47upalg@BlackBox>

Hi Stephen,

Stephen Gregoratto wrote on Sat, Mar 30, 2019 at 11:19:19AM +1100:

> - entities are not expanded. Some documents, like xmllint[3], will 
>   declare an ENTITY in the DTD.

My first idea was to convert

  <!ENTITY alias "realtext">


  .ds alias "realtext"

but it turns out that doesn't work because "realtext" can contain XML.

My second idea was to build a table of user-defined entities
in the parser and then parse "realtext" from xml_entity() on demand;
but that is also hard to implement in the current framework because
parse_file() conflates parsing with the physical read(2).

>   A solution here would be to use a tool 
>   like xmllint to expand the entities into their full versions like so:
>   xmllint --noent xmllint.xml | docbook2mdoc > xmllint.1

Right, i guess that is reasonable for now.  At some point, we might
wish to revisit the topic, but i don't think user-defined entities
are the most pressing issue at right now.

I hope i addressed all topics you brought up; otherwise, please don't
hesitate to remind me.

 To unsubscribe send an email to

      parent reply	other threads:[~2019-04-02 17:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-30  0:19 Stephen Gregoratto
2019-04-02 13:16 ` Ingo Schwarze
2019-04-02 16:02 ` Ingo Schwarze
2019-04-02 16:50 ` Ingo Schwarze
2019-04-02 17:20 ` Ingo Schwarze
2019-04-02 17:48 ` Ingo Schwarze [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \
    --subject='Re: Parsing errors, output regressions with new XML parser' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).