ID attributes in cache files
Shaun McCance
<shaunm at gnome.org>
Fri Jul 10 19:54:34 EDT 2015
- Next message: ID attributes in cache files
- Sort by: [ thread ] [ subject ] [ author ] [ date ]
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 -------------- next part -------------- A non-text attachment was scrubbed... Name: cache-id.diff Type: text/x-patch Size: 1357 bytes Desc: not available URL: <http://projectmallard.org/pipermail/mallard-list/attachments/20150710/4434a850/attachment.bin>
- Next message: ID attributes in cache files
- Sort by: [ thread ] [ subject ] [ author ] [ date ]
- More information on mallard-list