[tei-council] attRef/@class not valid?

Lou Burnard lou.burnard at retired.ox.ac.uk
Fri Apr 25 14:32:28 EDT 2014


The change that introduced @class to <attRef> was made mid November. 
Surely the framework has been regenerated since then?

The schematron problem seens unrelated.


   On 25/04/14 17:44, Martin Holmes wrote:
> The attRef spec contains this example:
>
> <attRef class="att.global" name="xml:id"/>
>
> but when I try to use that in my ODD file, Oxygen complains that:
>
> Description
> attribute "class" not allowed here; expected attribute "copyOf",
> "corresp", "exclude", "n", "name", "next", "prev", "rend", "rendition",
> "sameAs", "select", "style", "synch", "xml:base", "xml:id", "xml:lang"
> or "xml:space"
>
> I'm using the TEI ODDs schema:
>
> file:/home/mholmes/Oxygen%20XML%20Editor%2015/frameworks/tei/xml/tei/custom/schema/relaxng/tei_odds.rng
>
> If I point at the latest build:
>
> <http://teijenkins.hcmc.uvic.ca/job/TEIP5/lastSuccessfulBuild/artifact/release/xml/tei/custom/schema/relaxng/tei_odds.rng>
>
> That error disappears, but I get different errors from the Schematron:
>
> Engine name: ISO Schematron
> Severity: error
> Description: cvc-id.2: There are multiple occurrences of ID value
> 'tei_odds-relatedItem-targetorcontent1-constraint'.
> Start location: 4661:73
> End location: 4661:73
> URL: http://www.w3.org/TR/xmlschema-1/#cvc-id
>
> Engine name: ISO Schematron
> Severity: error
> Description: cvc-attribute.3: The value
> 'tei_odds-relatedItem-targetorcontent1-constraint' of attribute 'id' on
> element 'pattern' is not valid with respect to its type, 'ID'.
> Start location: 4661:73
> End location: 4661:73
> URL: http://www.w3.org/TR/xmlschema-1/#cvc-attribute
>
> I think this is due to the fact that there are two things, a report and
> a constraint, inside the constraint element in the relatedItem.xml:
>
>     <constraintSpec ident="targetorcontent1" scheme="isoschematron">
>       <constraint>
>         <sch:report test="@target and count( child::* ) &gt; 0">
> If the @target attribute on <sch:name/> is used, the
> relatedItem element must be empty</sch:report>
>         <sch:assert test="@target or child::*">A relatedItem element
> should have either a 'target' attribute
>           or a child element to indicate the related bibliographic
> item</sch:assert>
>       </constraint>
>     </constraintSpec>
>
> I'm going to test this by splitting them out into individual
> constraintSpecs. If you know better, please put me right. Meanwhile, we
> seem to have a breakage in the published schema - - any idea why?
>
> Cheers,
> Martin



More information about the tei-council mailing list