tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: Stephen Gregoratto <dev@sgregoratto.me>
Cc: tech@mandoc.bsd.lv
Subject: Re: Parsing errors, output regressions with new XML parser
Date: Tue, 2 Apr 2019 19:48:53 +0200	[thread overview]
Message-ID: <20190402174853.GH6369@athene.usta.de> (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">
  &alias;

to

  .ds alias "realtext"
  \*[alias]

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.

Thanks,
  Ingo
--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv

      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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20190402174853.GH6369@athene.usta.de \
    --to=schwarze@usta.de \
    --cc=dev@sgregoratto.me \
    --cc=tech@mandoc.bsd.lv \
    --subject='Re: Parsing errors, output regressions with new XML parser' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).