Schema: allow "@component" on metadata elements and "docinfo" - #3079
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reported on pretext-support (VS complaining about component in subtitle, but all works well): placing
component="..."on asubtitledraws a validation complaint, while processing is perfectly happy. The version machinery in assembly acts on any element carrying@component, and the attribute survives into the assembled tree, so the schema is the only gatekeeper — for editor validation (pretext-tools) and for-Valike.Two commits extend the allowance where a version-conditional variant makes sense:
title(both forms),subtitle(both forms, the reported case),shorttitle,plaintitle,creator,caption,attribution. A caption reading "the red curve" needs a variant in a black-and-white version; a title's companions travel with it.docinfo— the version mechanism's motivating example (per-versionlatex-image-preamblecolor palettes) is authored as twodocinfoelements, yet@componentwas not allowed there.Precedents:
idxalready carries the allowance, andcommentaryrequires the attribute.Verified:
@componentplanted on one instance of each of the eight elements in the sample article draws exactly eight complaints from the current schema and zero from the revised schema (the total error count drops by exactly eight, nothing else moves); regenerating.rnc/.rngfrom unmodified source was checked clean first, so each commit pairs the literate source with its derived files.Claude Fable 5, acting as a coding assistant for Rob Beezer