Skip to content

add cardsort; premise has order attr#2552

Closed
wrigjl wants to merge 1 commit intoPreTeXtBook:masterfrom
wrigjl:jlw-cardsort-premise-order
Closed

add cardsort; premise has order attr#2552
wrigjl wants to merge 1 commit intoPreTeXtBook:masterfrom
wrigjl:jlw-cardsort-premise-order

Conversation

@wrigjl
Copy link
Copy Markdown
Contributor

@wrigjl wrigjl commented Jun 5, 2025

Add cardsort as an option for a matching problem. Also, allow premise to have an order attribute.

(Be gentle with me please, this is the first time I've meddled in the affairs of XML validation).

@rbeezer
Copy link
Copy Markdown
Collaborator

rbeezer commented Apr 6, 2026

First, apologies for taking so long to get to this. We now have cardsort (old matches) and the slightly more general matching.

I edits your commit some for cardsort, and it still has your name on it (along with an AI co-author). Then I added another commit with similar schema stuff for matching.

Be gentle with me please

Always! Next comment will be from AI, mostly for the discussion about the script that automates making the derived files. I suspect that is in a README somewhere as well.

@rbeezer rbeezer closed this Apr 6, 2026
@rbeezer
Copy link
Copy Markdown
Collaborator

rbeezer commented Apr 6, 2026

Two commits merged to address this PR and extend the schema.

Commit 1 (amended from your original): Adds <cardsort> to the Matches production, removes the deprecated <matches> element and @order on <match>, allows multiple <premise> per <match>, and switches the content model for premise and response in cardsort from mixed {BlockText?} to TextLong so that inline elements like <m> validate.

Commit 2: Adds <matching> as an alternative to <cardsort> in the Matches production, with <premise> (optional @ref) and <response> (@xml:id, optional @order), also using TextLong content.

About derived files. The schema source of truth is schema/pretext.xml, which is a literate program. The .rnc and .rng files are derived from it by running xsltproc with xsl/pretext-litprog.xsl to extract the compact RELAX-NG (.rnc), then trang to convert to RELAX-NG XML (.rng). The script schema/build.sh automates this. PRs that modify the schema should edit only pretext.xml and include the regenerated derived files.

@wrigjl wrigjl deleted the jlw-cardsort-premise-order branch April 7, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants