Subject: [xml2rfc] #196: ISO references fail to parse

From: "xml2rfc issue tracker" <[email-masked]>
Date: Tue, 03 Sep 2013 23:39:35 -0000

#196: ISO references fail to parse

 I included ISO 7498-2 reference via:

 {{{
 <!ENTITY ISO.7498-2.1988 SYSTEM "http://xml.resource.org/public/rfc
 /bibxml-misc/_reference.ISO.7498-2.1988.xml">

 }}}

 and then:
 {{{
       &ISO.7498-2.1988;
 }}}

 and I get:
 {{{
 dooku-[/corp/ietf/roll/security-threats] mcr 5429 %make security-
 threats.html                                 unset DISPLAY;
 XML_LIBRARY=:./src xml2rfc --html -o security-threats.html security-
 threats.xml
 Parsing file security-threats.xml
 ERROR: Unable to parse the XML document: security-threats.xml
  /home/mcr/.cache/xml2rfc/_reference.ISO.7498-2.1988.xml: Line 1: Space
 needed here
  /home/mcr/.cache/xml2rfc/_reference.ISO.7498-2.1988.xml: Line 2:
 StartTag: invalid element name
  security-threats.xml: Line 2244: Failure to process entity
 ISO.7498-2.1988
  security-threats.xml: Line 2244: Entity 'ISO.7498-2.1988' not defined
 make: *** [security-threats.html] Error 1
 }}}

 I don't understand how a space could be needed:
 {{{
 dooku-[/corp/ietf/roll/security-threats] mcr 5427 %curl
 http://xml.resource.org/public/rfc/bibxml-
 misc/_reference.ISO.7498-2.1988.xml
 <?xml version="1.0"?>
 <!DOCTYPE reference SYSTEM "rfc2629.dtd">

 <reference anchor="ISO.7498-2.1988">
 <front>
 <title>Information Processing Systems - Open Systems Interconnection
 Reference Model - Security Architecture</title>
 <author>
 <organization>International Organization for
 Standardization</organization>
 </author>
 <date month="" year="1988" />
 </front>

 <seriesInfo name="ISO" value="Standard 7498-2" />

 </reference>
 }}}

 I notice that other references, e.g:
 http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-roll-
 terminology-12.xml
 do not include the DOCTYPE header, and include the encoding on the first
 line:

 {{{
 dooku-[~] mcr 5407 %curl
 http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-roll-
 terminology-12.xml | head -3
 <?xml version='1.0' encoding='UTF-8'?>

 <reference anchor='I-D.ietf-roll-terminology'>
 }}}

 and if I hack the cached copy in _cached/xml2rfc, to match, things work.

-- 
------------------------------+----------------------------------
 Reporter:  [email-masked]  |      Owner:  [email-masked]
     Type:  defect            |     Status:  new
 Priority:  medium            |  Milestone:
Component:  Version 2 cli     |    Version:  2.4.x
 Keywords:                    |
------------------------------+----------------------------------

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/196>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 04 Sep 2013 05:25:46 -0000

Changes (by [email-masked]):

 * status:  new => closed
 * resolution:   => invalid

Comment:

 Not a bug. The DTD in the included file needs to be removed. (In doubt,
 try with a generic XML parser)

-- 
-------------------------------+----------------------------------
  Reporter:  [email-masked]  |      Owner:  [email-masked]
      Type:  defect            |     Status:  closed
  Priority:  medium            |  Milestone:
 Component:  Version 2 cli     |    Version:  2.4.x
Resolution:  invalid           |   Keywords:
-------------------------------+----------------------------------

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/196#comment:1>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 04 Sep 2013 08:47:35 -0000

Comment (by [email-masked]):

 The reference URL used is wrong.  The correct URL is
 {{{http://xml.resource.org/public/rfc/bibxml2/reference.ISO.7498-2.1988.xml}}}

 Please remove any leading underscores from any bibxml* URLs you use.

 {{{
 henrik@merlot $ wget -q -O -
 http://xml.resource.org/public/rfc/bibxml2/reference.ISO.7498-2.1988.xml
 <?xml version="1.0" encoding='UTF-8'?>

 </reference>
 }}}

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/196#comment:2>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>