Skip to content

Decisions and ideas that can't yet be acted on but must be remembered

Martin Holmes edited this page Nov 27, 2024 · 3 revisions

This page is for decisions we make or ideas we formulate which we can't yet act on because we're not yet working on the processing stage to which they're pertinent, but at the same time we must not forget them.

Normalize all @ident values early in the processing chain.

We discovered an in-vivo ODD which had an ident with a trailing space, which broke our transpile step, even though it's not actually invalid (and can't really be made so, because of whitespace rules in XML). By the time we get to the transpile step, we are using @idents all over the place to build keys and ids and look things up, so we don't want to have to normalize-space() on every instance, so an earlier stage in the processing should make a point of running normalize-space() on every instance of this and other attributes which are defined as QNames.

Making test diffs more robust

When writing tests which depend on diffing invalidity messages from Jing, we should delete everything after the semi-colon before diffing, to avoid test breakages due to irrelevant changes.

Normalize the content of <content>

We would like to thoroughly normalize the content of a <content> element at the early stages, so that it only has a single child, removing some of the ambiguity where (for instance) a single sequence element means the same as its children being the direct children of <content>.

Single-element child of <content>

If TEI issue 2381 https://github.com/TEIC/TEI/issues/2381 is agreed, then we will have to add a step to our pre-PLODD processing two wrap any sequence of one or more elements in the RNG namespace which are children of a TEI <content> element in a single <rng:div>, so that our PLODD processing can assume the single-element-child model.

minoccurs and maxoccurs should be checked and a warning possibly issued before the PLODD step

Although we don't know what constitutes a "high" value for an item occurrence count, it seems a bit strange to have a constraint on occurrence which exists but is inordinately high; when would you want up to 700 instances of an element but no more? So if we can decide on a logical point at which to warn users, we should catch such cases to point out that schemas may get large and slow if you don't use unbounded instead.

XPath variables within e.g. @select attributes do not need to follow our naming conventions

Because they're scoped only for the attribute itself, they can/should be simple and short ("for $p in //p...).

Re TEI Stylesheets issue #624: external references from a customization

A customization ODD may contain references to external resources which need to be retrieved. However, we don't believe that a potentially infinite sequence of nested references should be handled by ATOP (and it isn't handled by the Stylesheets either). Any external specification which is referenced in a customization ODD should already be self-contained; in other words, the author of the customization is responsible for resolving any external references in any external file pointed at by the customization before building the schema.