Closed Rober-Igtm closed 3 years ago
@Rober-Igtm Concerning the formatting, look up how to format a code block, that is, a few consecutive lines of code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks.
Your Schematron rule is close. Here are some detials:
preceding-sibling::sonnet
is any preceding sibling <sonnet>
(starting from the current context), but preceding-sibling::sonnet[1]
is the first (closest) preceding <sonnet>
.<sonnet>
elements of all sonnets in the document. That isn’t what you want; from each sonnet, you want only its preceding siblings. The default context is the particular <sonnet>
you’ve just matched (assuming you’re matching <sonnet>
elements), so you want a relative path from there, instead of an absolute path from the document node.preceding-sibling::sonnet[1]/@n
, so that value plus 1 is preceding-sibling::sonnet[1]/@n + 1
.Does this help?
Ok, I understand the issue with the immediate preceding siblings now. Thank you!
I had some trouble with the second part of the Schematron test, in which we had to form a rule that stipulated each of the sonnet numbers be in consecutive order; in both the table of contents and body. As the test proscribed, I wanted the rule to take each sonnet number and have it be equal to its preceding sonnet number plus one. Here's what I wrote for this rule: