ODD question

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

ODD question

Torsten Schassan-2
Dear colleagues,

is it possible to define in my ODD a <valList> in a "modularised" way?

Explanation: I want to "reuse" a list of values for different attributes
(e.g. @xml:lang, @mainLang) or for attributes on different elements,
(e.g. ref/@type, ptr/@type).

Quest: Right now, if I understand it well, I have to define the
attDef/valList for each attribute and each of the elements separately or
using classSpec, if the attribute is specified there?

Best, Torsten


--
Torsten Schassan - Digitale Editionen, Abteilung Handschriften und
Sondersammlungen
Herzog August Bibliothek, D-38299 Wolfenbuettel, Tel. +49 5331 808-130
Fax -165
Handschriftendatenbank <http://diglib.hab.de/?db=mss>
Reply | Threaded
Open this post in threaded view
|

Re: ODD question

Syd Bauman-10
Torsten --

Excellent question. It would be nice if <specGrpRef> were allowed as
a child of <attDef> (or <content>, or a variety of other
places). That would allow exactly what you want, I think. But such is
not the case, at least not yet.

For now, one solution to your ref/@type, ptr/@type is pretty
straightforward: create a new class att.ptrTyped and put a definition
of @type that uses the desired <valList> in there.

For the @xml:lang, @mainLang two choices jump to mind.

 1) If you don't mind restricting all the others,[1] too, just alter
    the definition of teidata.language by removing the <alternate>
    and the <dataRef>, and inserting a bunch of <valItem>s as needed.

 2) Create a new torstendata.language and use it.


These are just what jump to my mind. Others may have better
suggestions. But, of course, if none of these suggestions work for
you, there is always XInclude.

Notes
-----
[1] att.pointing/@targetLang, langKnowledge/@tags langKnown/@tag,
    language/@ident, schemaSpec/@targetLang, schemaSpec/@docLang, and
    textLang/@otherLangs.

> is it possible to define in my ODD a <valList> in a "modularised" way?
>
> Explanation: I want to "reuse" a list of values for different
> attributes (e.g. @xml:lang, @mainLang) or for attributes on
> different elements, (e.g. ref/@type, ptr/@type).
>
> Quest: Right now, if I understand it well, I have to define the
> attDef/valList for each attribute and each of the elements
> separately or using classSpec, if the attribute is specified there?
Reply | Threaded
Open this post in threaded view
|

Re: ODD question

Torsten Schassan-2
Hi Syd,

thanks for your hints!

Two questions jump to my mind, one of which I could try out myself but
asking is faster and more secure:

1) If I define my own class att.ptrTyped, is the resulting ODD
respectively the resulting schema still TEI conformant? (Or, more
general: Is it the ODD, or the schema, or the data, that is or has to be
TEI conformant?)

2) Does Roma process XIncludes properly?

Best, Torsten


Am 09.07.2018 um 16:21 schrieb Syd Bauman:

> Torsten --
>
> Excellent question. It would be nice if <specGrpRef> were allowed as
> a child of <attDef> (or <content>, or a variety of other
> places). That would allow exactly what you want, I think. But such is
> not the case, at least not yet.
>
> For now, one solution to your ref/@type, ptr/@type is pretty
> straightforward: create a new class att.ptrTyped and put a definition
> of @type that uses the desired <valList> in there.
>
> For the @xml:lang, @mainLang two choices jump to mind.
>
>  1) If you don't mind restricting all the others,[1] too, just alter
>     the definition of teidata.language by removing the <alternate>
>     and the <dataRef>, and inserting a bunch of <valItem>s as needed.
>
>  2) Create a new torstendata.language and use it.
>
>
> These are just what jump to my mind. Others may have better
> suggestions. But, of course, if none of these suggestions work for
> you, there is always XInclude.
>
> Notes
> -----
> [1] att.pointing/@targetLang, langKnowledge/@tags langKnown/@tag,
>     language/@ident, schemaSpec/@targetLang, schemaSpec/@docLang, and
>     textLang/@otherLangs.
>
>> is it possible to define in my ODD a <valList> in a "modularised" way?
>>
>> Explanation: I want to "reuse" a list of values for different
>> attributes (e.g. @xml:lang, @mainLang) or for attributes on
>> different elements, (e.g. ref/@type, ptr/@type).
>>
>> Quest: Right now, if I understand it well, I have to define the
>> attDef/valList for each attribute and each of the elements
>> separately or using classSpec, if the attribute is specified there?


--
Torsten Schassan - Digitale Editionen, Abteilung Handschriften und
Sondersammlungen
Herzog August Bibliothek, D-38299 Wolfenbuettel, Tel. +49 5331 808-130
Fax -165
Handschriftendatenbank <http://diglib.hab.de/?db=mss>
Reply | Threaded
Open this post in threaded view
|

Re: ODD question

Lou Burnard-6

If, as suggested, you define a new attribute class the effect of which is to restrict the available values for one or more attributes to a subset of the values that would otherwise be permitted, then in my opinion the resulting schema defines a TEI subset. A document which is valid according to that schema is also valid according to TEI All; further, you haven't changed the semantics of the attributes concerned (sfaics). So I'd say that's TEI conformant.

Similar considerations apply to the proposed datatype change. In both cases, making the required constraint explicit in the ODD is a very good idea, far preferable to doing the job with an xInclude, which doesnt reduce the complexity implicit in the duplication.


From: TEI (Text Encoding Initiative) public discussion list <[hidden email]> on behalf of Torsten Schassan <[hidden email]>
Sent: 09 July 2018 16:39:13
To: [hidden email]
Subject: Re: ODD question
 
Hi Syd,

thanks for your hints!

Two questions jump to my mind, one of which I could try out myself but
asking is faster and more secure:

1) If I define my own class att.ptrTyped, is the resulting ODD
respectively the resulting schema still TEI conformant? (Or, more
general: Is it the ODD, or the schema, or the data, that is or has to be
TEI conformant?)

2) Does Roma process XIncludes properly?

Best, Torsten


Am 09.07.2018 um 16:21 schrieb Syd Bauman:
> Torsten --
>
> Excellent question. It would be nice if <specGrpRef> were allowed as
> a child of <attDef> (or <content>, or a variety of other
> places). That would allow exactly what you want, I think. But such is
> not the case, at least not yet.
>
> For now, one solution to your ref/@type, ptr/@type is pretty
> straightforward: create a new class att.ptrTyped and put a definition
> of @type that uses the desired <valList> in there.
>
> For the @xml:lang, @mainLang two choices jump to mind.
>
>  1) If you don't mind restricting all the others,[1] too, just alter
>     the definition of teidata.language by removing the <alternate>
>     and the <dataRef>, and inserting a bunch of <valItem>s as needed.
>
>  2) Create a new torstendata.language and use it.
>
>
> These are just what jump to my mind. Others may have better
> suggestions. But, of course, if none of these suggestions work for
> you, there is always XInclude.
>
> Notes
> -----
> [1] att.pointing/@targetLang, langKnowledge/@tags langKnown/@tag,
>     language/@ident, schemaSpec/@targetLang, schemaSpec/@docLang, and
>     textLang/@otherLangs.
>
>> is it possible to define in my ODD a <valList> in a "modularised" way?
>>
>> Explanation: I want to "reuse" a list of values for different
>> attributes (e.g. @xml:lang, @mainLang) or for attributes on
>> different elements, (e.g. ref/@type, ptr/@type).
>>
>> Quest: Right now, if I understand it well, I have to define the
>> attDef/valList for each attribute and each of the elements
>> separately or using classSpec, if the attribute is specified there?


--
Torsten Schassan - Digitale Editionen, Abteilung Handschriften und
Sondersammlungen
Herzog August Bibliothek, D-38299 Wolfenbuettel, Tel. +49 5331 808-130
Fax -165
Handschriftendatenbank <http://diglib.hab.de/?db=mss>
Reply | Threaded
Open this post in threaded view
|

Re: ODD question

Syd Bauman-10
In reply to this post by Torsten Schassan-2
Torsten --

1) Yes, unless you work at it, defining a class for @type and
   refering to it in your ODD would not make anything non-
   conformant. (You *could* do something that would make it
   non-conformant, e.g. by allowing PUA characters or U+2029
   (PARAGRAPH SEPARATOR) inside your @type, or by defining the class
   for a constrainted @type named "model.paragraph" that was an
   attribute class; but you wouldn't.)

2) Idunno. Don't think I've ever tried. I perform XInclude processing
   first,[1] and then hand it off. But both because that's a bit of a
   pain, and because the XInclude solution does not give you the use
   of <gloss>, <desc>, etc. to document what you are doing, I think
   of it as a hack-around, more than a proper solution.

Note
----
[1] Typically
    $ xmllint --xinclude input.xml > output.xml
   
> thanks for your hints!
>
> Two questions jump to my mind, one of which I could try out myself
> but asking is faster and more secure:
> 1) If I define my own class att.ptrTyped, is the resulting ODD
>    respectively the resulting schema still TEI conformant? (Or,
>    more general: Is it the ODD, or the schema, or the data, that is
>    or has to be TEI conformant?)
> 2) Does Roma process XIncludes properly?