Subject: [xml2rfc] Bad entities in the XML

From: Mark Nottingham <[email-masked]>
Date: Fri, 24 May 2013 11:39:45 +1000

<http://xml.resource.org/public/rfc/bibxml/index.xml> contains a few &nbsp; entities -- which are not valid XML.

Can we get these fixed? 

Thanks,

--
Mark Nottingham   http://www.mnot.net/

---

From: Paul Hoffman <[email-masked]>
Date: Fri, 24 May 2013 08:16:56 -0700

> <http://xml.resource.org/public/rfc/bibxml/index.xml> contains a few &nbsp; entities -- which are not valid XML.

+1. I have had to fix these by hand, and none of the xml2rfc tools make this error at all clear when they trip over it.

--Paul Hoffman

---

From: Nico Williams <[email-masked]>
Date: Fri, 24 May 2013 14:36:32 -0500

xml2rfc ought to define such entities if they are to be used.  They
are useful, after all.

---

From: Mark Nottingham <[email-masked]>
Date: Sat, 25 May 2013 11:57:16 +1000

> xml2rfc ought to define such entities if they are to be used.  They

It's not xml2rfc that needs to do it - it needs to be in the DTD of the XML, if they're used at all.

---

From: Nico Williams <[email-masked]>
Date: Fri, 24 May 2013 22:31:58 -0500

> It's not xml2rfc that needs to do it - it needs to be in the DTD of the XML, if they're used at all.

I'm aware, but xml2rfc should include its own copy of the DTD, thus it
should appear to define these entities itself.  (Users using XML
editors instead of emacs/vim/whatever would also have to have the DTD
on hand, but hey.)

---

From: Julian Reschke <[email-masked]>
Date: Sat, 25 May 2013 08:45:47 +0200

On 2013-05-24 21:36, Nico Williams wrote:
> _______________________________________________
> xml2rfc mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/xml2rfc

XML is XML is XML. xml2rfc MUST NOT accept something an XML parser would 
not.

Best regards, Julian

---

From: Nico Williams <[email-masked]>
Date: Sat, 25 May 2013 02:59:23 -0500

> XML is XML is XML. xml2rfc MUST NOT accept something an XML parser would

The DTD can define such entities.  Indeed, rfc2629-xhtml.ent does, and
rfc2629.dtd includes it.

---

From: Mark Nottingham <[email-masked]>
Date: Sat, 25 May 2013 18:17:22 +1000

Er, rfc2629-xhtml.ent is a 404.

---

From: Nico Williams <[email-masked]>
Date: Sat, 25 May 2013 03:25:06 -0500

> Er, rfc2629-xhtml.ent is a 404.

http://xml.resource.org/authoring/rfc2629-xhtml.ent
http://xml.resource.org/authoring/rfc2629-other.ent

The very first entity in the first of those is:

<!-- All of ISO Latin 1 -->
<!ENTITY nbsp    "&#160;"><!-- U+00A0 NO-BREAK SPACE
          (special " ")        -->

What's the argument anyways?  That we *can't* have &nbsp;?  Surely
that's not correct.  Or is it that we *shouldn't* have &nbsp;?  If so,
why not?

---

From: Mark Nottingham <[email-masked]>
Date: Sat, 25 May 2013 20:05:07 +1000

No, Nico, my "argument" is that the DTD doesn't refer to the URL you say in the external entity - it refers to a non-existant file (perhaps because someone has copied the DTD without including its dependencies), resulting in a 404. This makes the document unparseable.

There are lots of ways to fix this; I'll leave it up to others as to how to do so. Hopefully we're not actually disputing that it's a problem, though?

Cheers,

---

From: Julian Reschke <[email-masked]>
Date: Sat, 25 May 2013 20:31:49 +0200

> that's not correct.  Or is it that we *shouldn't* have &nbsp;?  If so,

The argument is that you can have &nbsp;, and you'll get it given a 
proper declaration and a proper XML parser. But we shouldn't hack any 
additional support into xml2rfc beyond what the XML spec requires *and* 
allows.

Best regards, Julian

---

From: Nico Williams <[email-masked]>
Date: Sun, 26 May 2013 01:20:23 -0500

On Sat, May 25, 2013 at 1:31 PM, Julian Reschke <[email-masked]> wrote:
> The argument is that you can have &nbsp;, and you'll get it given a proper
> declaration and a proper XML parser. But we shouldn't hack any additional
> support into xml2rfc beyond what the XML spec requires *and* allows.

As a user I could not care less where &nbsp; is defined, as long as it
is.  As a developer I understand it belongs in the DTD.  Surely we all
agree on this.

---

From: Mark Nottingham <[email-masked]>
Date: Sun, 26 May 2013 19:23:38 +1000

Can anyone on this list actually get the problem fixed, or should I ask elsewhere?

Thanks,

---

From: Julian Reschke <[email-masked]>
Date: Sun, 26 May 2013 14:03:07 +0200

> Can anyone on this list actually get the problem fixed, or should I ask elsewhere?

I have no idea what's generating it, so I can't fix it.

Best regards, Julian

---

From: Henrik Levkowetz <[email-masked]>
Date: Sun, 26 May 2013 16:28:09 +0200

> Can anyone on this list actually get the problem fixed, or should I ask elsewhere?

I can fix it, if someone would suggest an acceptable fix.  Would the inclusion
of the following right after <!DOCTYPE rfc SYSTEM 'rfc2629.dtd'> in
http://xml.resource.org/public/rfc/bibxml/index.xml do the trick for now?

<!ENTITY nbsp    '&#160;'>

	Henrik

---

From: Henrik Levkowetz <[email-masked]>
Date: Sun, 26 May 2013 16:33:41 +0200

> Er, rfc2629-xhtml.ent is a 404.

I've added rfc2629-other.ent and rfc2629-xhtml.ent to the bibxml directory
at http://xml.resource.org/public/rfc/bibxml/

	Henrik

---

From: Mark Nottingham <[email-masked]>
Date: Mon, 27 May 2013 17:19:04 +1000

Thanks, Henrik!

---

From: Mark Nottingham <[email-masked]>
Date: Mon, 27 May 2013 17:42:29 +1000

... but it's not quite there yet.

The entities are still declared externally, and non-validating XML parsers aren't required to load them; thus, the document is still unusable (e.g., in many browsers).

Can we get the entities declared in the internal subset, by any chance?

(I'm asking on behalf on an external developer who has a use for this; <https://github.com/tobie/specref>).

Thanks,