Subject: [xml2rfc] Overstrict checking of ID and IDREF values

From: Roger Price <[email-masked]>
Date: Sun, 10 Jan 2021 12:41:28 +0100 (CET)

At line 159 of my markup I have:

  <t>Figure <xref target="fig:oview"></xref> shows a reference configuration
  in which the command/response protocol applies.
  </t>
  <figure anchor="fig:oview">
  <artwork align="center">

When I submit this to xml2rfc I get the error message:

  draft-rprice-UPS-management-protocol-00.rfc(159): Error: Type IDREF doesn't
      allow value 'fig:oview', at /rfc/middle/section[3]/t[1]/xref
  draft-rprice-UPS-management-protocol-00.rfc(159): Error: Element xref failed to
      validate attributes, at /rfc/middle/section[3]/t[1]/xref
  draft-rprice-UPS-management-protocol-00.rfc(162): Error: Invalid attribute
      anchor for element figure, at /rfc/middle/section[3]/figure[1]

ID and IDREF values are names, and the EBNF for XML 1.0 shows:

  [4] 	NameChar	::=	Letter | Digit | '.' | '-' | '_' | ':' |
                                 CombiningChar |  Extender
  [5] 	Name	::=	(Letter | '_' | ':') (NameChar)*

so fig:oview should be ok.  Roger

---

From: Carsten Bormann <[email-masked]>
Date: Sun, 10 Jan 2021 13:27:36 +0100

But then it [1] also says:

> Note:
> 
> The Namespaces in XML Recommendation [XML Names] assigns a meaning to names containing colon characters. Therefore, authors should not use the colon in XML names except for namespace purposes, but XML processors must accept the colon as a name character.

The namespace Recommendation [2] says:

> It follows that in a namespace-valid document:
> 
> 	• No attributes with a declared type of ID, IDREF(S), ENTITY(IES), or NOTATION contain any colons.

Since RFCXML is namespaced XML, this applies.

Grüße, Carsten

[1]: https://www.w3.org/TR/REC-xml/
[2]: https://www.w3.org/TR/xml-names/

---

From: Roger Price <[email-masked]>
Date: Sun, 10 Jan 2021 13:46:15 +0100 (CET)

> Since RFCXML is namespaced XML, this applies.

Ok, thanks, Roger