ordering of #answer and #solution

6 views
Skip to first unread message

David Austin

unread,
Jul 28, 2026, 8:32:02 AM (3 days ago) Jul 28
to prete...@googlegroups.com
In cleaning up the ULA source, I found that the schema enforces an ordering of #answer and #solution elements inside a #task.  So the following is valid:

<task>
  <answer> .. </answer>
  <solution> .. </solution>
</task>

but 

<task>
  <solution> .. </solution>
  <answer> .. </answer>
</task>

is not.  It felt more natural to me to write solutions and then append shorter answers so I'm wondering if this is intentional.  My assistant says the order doesn't affect processing. I can easily fix the 386 (!) violations, but I'm wondering about newer authors who may be confused since the validation report just says that 'element "answer" not allowed here.'

David

David Austin

unread,
Jul 28, 2026, 8:41:17 AM (3 days ago) Jul 28
to PreTeXt development
Similarly, a #caption must come before #image inside a #figure.  ULA has 260 violations from the ordering requirement!  

Oscar Levin

unread,
9:36 AM (6 minutes ago) 9:36 AM
to prete...@googlegroups.com
This should be a relatively easy change in the schema, assuming there isn't a semantics or code reason to keep enforcing this.

Rob, would you like a PR?

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/f8f981b0-21a5-4177-949b-af5d437c1a4dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages