From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout-kit-01.scc.kit.edu (scc-mailout-kit-01.scc.kit.edu [129.13.231.81]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id 6f500cb5 for ; Tue, 2 Apr 2019 12:48:56 -0500 (EST) Received: from asta-nat.asta.uni-karlsruhe.de ([172.22.63.82] helo=hekate.usta.de) by scc-mailout-kit-01.scc.kit.edu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (envelope-from ) id 1hBNWo-0004OR-S9; Tue, 02 Apr 2019 19:48:56 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1hBNWo-0004xS-1y; Tue, 02 Apr 2019 19:48:54 +0200 Received: from athene.usta.de ([172.24.96.10]) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1hBNWn-0008Bw-Sy; Tue, 02 Apr 2019 19:48:53 +0200 Received: from localhost (athene.usta.de [local]) by athene.usta.de (OpenSMTPD) with ESMTPA id 669e8f0b; Tue, 2 Apr 2019 19:48:53 +0200 (CEST) Date: Tue, 2 Apr 2019 19:48:53 +0200 From: Ingo Schwarze To: Stephen Gregoratto Cc: tech@mandoc.bsd.lv Subject: Re: Parsing errors, output regressions with new XML parser Message-ID: <20190402174853.GH6369@athene.usta.de> References: <20190330001919.rrbc2xxrx47upalg@BlackBox> X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190330001919.rrbc2xxrx47upalg@BlackBox> User-Agent: Mutt/1.8.0 (2017-02-23) 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 &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