ID attributes in cache files

Shaun McCance <shaunm at gnome.org>
Sat Jul 11 10:21:33 EDT 2015

Filed an issue:

https://github.com/projectmallard/projectmallard.org/issues/32

On Fri, 2015-07-10 at 19:54 -0400, Shaun McCance wrote:
> Cache files define section IDs to contain the page ID, as you would link
> to it, such as:
> 
> <section id="the_page_id#the_section_id">
> 
> This is not how section IDs are written in pages, of course. This is
> designed to make it easier to use xsl:key to look up the target node in
> the cache file.
> 
> Problem: Mallard 1.0 defines the id attribute to be NMTOKEN, which does
> not allow the # character. Because you're not supposed to put the #
> character in the id attribute in actual pages.
> 
> The cache schema is designed to be mixed with the Mallard schema using
> the version attribute, such as:
> 
> <cache version="cache/1.0 1.0">
> 
> Right now, with the cache schema, it is impossible to validate because
> of this mismatch. There's no easy to to override the type of the id
> attribute in the 1.0 schema. It's just not designed to allow that to be
> overridden. We can't change the 1.0 schema now. But we can change the
> cache/1.0 schema.
> 
> Attached patch fixes the validation issue. But it's ugly and fragile and
> could potentially lock out extensions from validating in cache files. It
> has to be done, or cache/1.0 will never validate. But we need to look at
> how to make the 1.1 schema more extensible so cache/1.1 can drop this
> awfulness.
> 
> --
> Shaun
> 
> _______________________________________________
> mallard-list mailing list
> mallard-list at projectmallard.org
> http://projectmallard.org/mailman/listinfo/mallard-list