[tei-council] Two quick questions about Schematron constraints

Lou Burnard lou.burnard at retired.ox.ac.uk
Fri Jun 15 15:56:28 EDT 2012


On 15/06/12 19:46, Martin Holmes wrote:

> In this constraint (from delSpan):
>
>     <constraintSpec ident="spanTo" scheme="isoschematron">
>       <constraint>
>         <assert xmlns="http://purl.oclc.org/dsdl/schematron"
> test="@spanTo">The spanTo= attribute of<name/>  is required.</assert>
>       </constraint>
>     </constraintSpec>
>
> does<name/>  automatically get replaced by ancestor::elementSpec/@ident?

Judging from the output of the detest test file, yes. I think it's dark 
magic though.

> What happens in the case of constraints on attributes? There appears to
> be only one (on @targetLang in att.pointing), but if<name/>  were used
> there, would it be replaced with @targetLang, or with the ancestor's
> @ident (att.pointing)?

No idea, but my guess is neither : I think it would be replaced by the 
name of the gi of the element which was being processed when the rule 
fired. Try it!

>
> Secondly, these constraints appear on the root TEI element:
>
>     <constraintSpec ident="c1" scheme="isoschematron">
>       <constraint>
>         <ns xmlns="http://purl.oclc.org/dsdl/schematron" prefix="tei"
> uri="http://www.tei-c.org/ns/1.0"/>
>       </constraint>
>     </constraintSpec>
>     <constraintSpec ident="c2" scheme="isoschematron">
>       <constraint>
>         <ns xmlns="http://purl.oclc.org/dsdl/schematron" prefix="rng"
> uri="http://relaxng.org/ns/structure/1.0"/>
>       </constraint>
>     </constraintSpec>
>
> What are they actually doing, if anything?

I think this is more dark magic, the effect of which is to bung the 
required namespace declarations into the isosch file generated during 
the P5 build.



More information about the tei-council mailing list