
Does this look vaguely right <sch:assert test="name(parent(.))='dataSpec' and not(contains(dataRef))">An alternate element inside a dataSpec may contain only dataRef children </sch:assert> ? #tooLazyToLookItUp

Not 100% sure what you want, here, but I think it's something more like <sch:assert test=" parent::tei:dataSpec and child::*[not(self::tei:dataRef)]"
An alternate element inside a dataSpec may contain only dataRef children</sch:assert>
But don't <alternate> and <sequence> go inside <content> inside <dataSpec>?
Does this look vaguely right
<sch:assert test="name(parent(.))='dataSpec' and not(contains(dataRef))">An alternate element inside a dataSpec may contain only dataRef children </sch:assert>
?
#tooLazyToLookItUp

Thanks Syd, indeed that is much more like what I wanted. <alternate> also needs to be feasible inside <dataSpec> if you want to define a datatype which allows (choosing an example at random) data.probability or data.certainty! I am planning to get rid of <content> inside <dataSpec>, since we really dont want <elementRef>s etc. floating about there. The rule for <alternate> is similarly motivated. On 08/06/15 21:02, Syd Bauman wrote:
Not 100% sure what you want, here, but I think it's something more like
<sch:assert test=" parent::tei:dataSpec and child::*[not(self::tei:dataRef)]"
An alternate element inside a dataSpec may contain only dataRef children</sch:assert>
But don't <alternate> and <sequence> go inside <content> inside <dataSpec>?
Does this look vaguely right
<sch:assert test="name(parent(.))='dataSpec' and not(contains(dataRef))">An alternate element inside a dataSpec may contain only dataRef children </sch:assert>
?
#tooLazyToLookItUp
participants (2)
-
Lou Burnard
-
Syd Bauman