Subject: [Tools-discuss] Bibxml7: anchor normalization, xml2rfc: caching with anchors

From: Carsten Bormann <[email-masked]>
Date: Wed, 15 May 2019 07:28:28 +0200

I just tried to work around a problem in kramdown-rfc’s “stand_alone: false” mode (this is where kramdown-rfc doesn’t do the reference handling by itself but instead generates entity declarations like it were 1986).

I noticed that

https://xml2rfc.tools.ietf.org/public/rfc/bibxml7/reference.DOI.10.1145_1282427.1282421.xml?anchor=foo

generates

<reference anchor="FOO">

Hmm, ID/IDREF are case-sensitive in XML, so this doesn’t quite work for an <xref target=“foo”/>.
➔ bug1

Independent of what anchor I specify, xml2rfc creates a cache file called

reference.DOI.10.1145_1282427.1282421.xml

So if I have another document that does 

https://xml2rfc.tools.ietf.org/public/rfc/bibxml7/reference.DOI.10.1145_1282427.1282421.xml?anchor=bar

Xml2rfc still uses the cache entry with 

<reference anchor=“FOO">

➔ bug2

Bug 1 actually has another interesting facet:

https://xml2rfc.tools.ietf.org/public/rfc/bibxml7/reference.DOI.10.1145_1282427.1282421.xml?anchor=DOI.10.1145_637201.637236

creates

<reference anchor=‘DOI101145_637201637236' >

Whoa, what happened to my dots?

➔ bug1b

So can we make anchor normalization on the bibxml server less aggressive?
No upcasing (bug1), no removal of valid ID/IDREF characters (bug1b).

Also, we’d need to fix the caching in xml2rfc (bug2).
(Kramdown-rfc’s [1.2.12, unreleased] cache file names for URLs with anchors currently look like this:
reference.DOI.10.1145_1282427.1282421--anchor=foo.xml
)

Grüße, Carsten

---

From: Henrik Levkowetz <[email-masked]>
Date: Wed, 15 May 2019 13:19:21 +0200

Hi Carsten,

I just checked to see who's the bibxml7 script author, and from what I can
see it's Tony's script.  Adding Cc: Tony.

Regards,

	Henrik

On 2019-05-15 07:28, Carsten Bormann wrote:
> ___________________________________________________________
> Tools-discuss mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/tools-discuss
> 
> Please report datatracker.ietf.org and mailarchive.ietf.org
> bugs at http://tools.ietf.org/tools/ietfdb
> or send email to [email-masked]
> 
> Please report tools.ietf.org bugs at
> http://tools.ietf.org/tools/issues
> or send email to [email-masked]
>