Skip to content

first draft for a TEI with RDFa exemplar #2431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
completed the rdfa exemplar with @martinascholger
  • Loading branch information
HelenaSabel committed Oct 18, 2024
commit 3fc6e8b1a2f3424e986a347198aa5babc5e3e43a
93 changes: 52 additions & 41 deletions P5/Exemplars/tei_rdfa.odd
Original file line number Diff line number Diff line change
Expand Up @@ -51,35 +51,36 @@
<text>
<body>
<schemaSpec ident="tei_rdfa" start="TEI">
<moduleRef key="tei"/> <!-- required -->
<moduleRef key="core"/> <!-- required -->
<moduleRef key="analysis"/>
<moduleRef key="certainty"/>
<moduleRef key="corpus"/>
<moduleRef key="dictionaries"/>
<moduleRef key="drama"/>
<moduleRef key="figures"/>
<moduleRef key="tei"/> <!-- required -->
<moduleRef key="header"/> <!-- required -->
<moduleRef key="core"/> <!-- required -->
<moduleRef key="textstructure"/> <!-- required -->
<moduleRef key="gaiji"/>
<moduleRef key="header"/> <!-- required -->
<moduleRef key="iso-fs"/>
<moduleRef key="linking"/>
<moduleRef key="verse"/>
<moduleRef key="drama"/>
<moduleRef key="spoken"/>
<moduleRef key="cmc"/>
<moduleRef key="dictionaries"/>
<moduleRef key="msdescription"/>
<moduleRef key="transcr"/>
<moduleRef key="textcrit"/>
<moduleRef key="namesdates"/>
<moduleRef key="figures"/>
<moduleRef key="corpus"/>
<moduleRef key="linking"/>
<moduleRef key="analysis"/>
<moduleRef key="iso-fs"/>
<moduleRef key="nets"/>
<moduleRef key="spoken"/>
<moduleRef key="textcrit"/>
<moduleRef key="textstructure"/> <!-- required -->
<moduleRef key="transcr"/>
<moduleRef key="verse"/>

<moduleRef key="certainty"/>
<moduleRef key="tagdocs" except="elementSpec moduleRef schemaSpec" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My instinct is that this should be

<moduleRef key="tagdocs" include="att code eg egXML gi ident tag val"/>

<!--
The tagdocs module is disabled due to attribute name clashes
for the attribute `@prefix` which is both defined locally on
From the tagdocs module we exclude the three elements that have
a `@prefix` attribute which is both defined locally on
elementSpec, moduleRef, and schemaSpec, as well as by our new
class `att.global.analytic.rdfa`
class `att.global.analytic.rdfa`. We argue that these tagdocs elements
are not going to be used in the context where RDFa support is relevant
-->
<!--<moduleRef key="tagdocs"/>-->


<classSpec type="atts" ident="att.global.analytic.rdfa" mode="add">
<desc xml:lang="en" versionDate="2020-07-01">provides additional global attributes for
embedding RDF following the RDFa Core 1.1 specification</desc>
Expand Down Expand Up @@ -121,26 +122,27 @@
<attDef mode="add" ident="inlist">
<gloss xml:lang="en" versionDate="2020-07-01">rdfa-inlist</gloss>
<desc xml:lang="en" versionDate="2020-07-01">An attribute used to indicate that the
object associated with a rel or property attribute on the same element is to be added
to the list for that predicate. The value of this attribute MUST be ignored. Presence
of this attribute causes a list to be created if it does not already exist.</desc>
object associated with a rel or property attribute on the same element is to be
added to the list for that predicate. The value of this attribute MUST be ignored.
Presence of this attribute causes a list to be created if it does not already
exist.</desc>
<datatype>
<dataRef key="teidata.enumerated"/>
<dataRef key="teidata.nullOrName"/>
</datatype>
</attDef>
<attDef mode="add" ident="prefix">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prefix probably isn't needed in a TEI context since we can use @xmlns to declare prefixes. Non-XHTML HTML can't, hence the need for the attribute.

<gloss xml:lang="en" versionDate="2020-07-01">rdfa-prefix</gloss>
<desc xml:lang="en" versionDate="2020-07-01">a white space separated list of prefix-name
IRI pairs of the form NCName ':' ' '+ xsd:anyURI </desc>
<desc xml:lang="en" versionDate="2020-07-01">a white space separated list of
prefix-name IRI pairs of the form NCName ':' ' '+ xsd:anyURI </desc>
<datatype maxOccurs="unbounded">
<dataRef key="teidata.enumerated"/>
</datatype>
</attDef>
<attDef mode="add" ident="property">
<gloss xml:lang="en" versionDate="2020-07-01">rdfa-property</gloss>
<desc xml:lang="en" versionDate="2020-07-01">a white space separated list of
TERMorCURIEorAbsIRIs, used for expressing relationships between a subject and either a
resource object if given or some literal text (also a 'predicate')</desc>
TERMorCURIEorAbsIRIs, used for expressing relationships between a subject and either
a resource object if given or some literal text (also a 'predicate')</desc>
<datatype maxOccurs="unbounded">
<dataRef key="teidata.enumerated"/>
</datatype>
Expand All @@ -156,8 +158,8 @@
</attDef>
<attDef mode="add" ident="resource">
<gloss xml:lang="en" versionDate="2020-07-01">rdfa-resource</gloss>
<desc xml:lang="en" versionDate="2020-07-01">a SafeCURIEorCURIEorIRI for expressing the
partner resource of a relationship that is not intended to be navigable (e.g., a
<desc xml:lang="en" versionDate="2020-07-01">a SafeCURIEorCURIEorIRI for expressing
the partner resource of a relationship that is not intended to be navigable (e.g., a
'clickable' link) (also an 'object')</desc>
<datatype>
<dataRef key="teidata.enumerated"/>
Expand All @@ -166,40 +168,42 @@
<attDef mode="add" ident="rev">
<gloss xml:lang="en" versionDate="2020-07-01">rdfa-rev</gloss>
<desc xml:lang="en" versionDate="2020-07-01">a white space separated list of
TERMorCURIEorAbsIRIs, used for expressing reverse relationships between two resources
(also 'predicates')</desc>
TERMorCURIEorAbsIRIs, used for expressing reverse relationships between two
resources (also 'predicates')</desc>
<datatype maxOccurs="unbounded">
<dataRef key="teidata.enumerated"/>
</datatype>
</attDef>
<attDef mode="add" ident="src">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment on @href above. We shouldn't add this.

<gloss xml:lang="en" versionDate="2020-07-01">rdfa-src</gloss>
<desc xml:lang="en" versionDate="2020-07-01">an IRI for expressing the partner resource
of a relationship when the resource is embedded (also a 'resource object')</desc>
<desc xml:lang="en" versionDate="2020-07-01">an IRI for expressing the partner
resource of a relationship when the resource is embedded (also a 'resource
object')</desc>
<datatype>
<dataRef key="teidata.enumerated"/>
</datatype>
</attDef>
<attDef mode="add" ident="typeof">
<gloss xml:lang="en" versionDate="2020-07-01">rdfa-typeof</gloss>
<desc xml:lang="en" versionDate="2020-07-01">a white space separated list of
TERMorCURIEorAbsIRIs that indicate the RDF type(s) to associate with a subject</desc>
TERMorCURIEorAbsIRIs that indicate the RDF type(s) to associate with a
subject</desc>
<datatype maxOccurs="unbounded">
<dataRef key="teidata.enumerated"/>
</datatype>
</attDef>
<attDef mode="add" ident="vocab">
<gloss xml:lang="en" versionDate="2020-07-01">rdfa-vocab</gloss>
<desc xml:lang="en" versionDate="2020-07-01">an IRI that defines the mapping to use when
a TERM is referenced in an attribute value. See General Use of Terms in Attributes and
the section on Vocabulary Expansion.</desc>
<desc xml:lang="en" versionDate="2020-07-01">an IRI that defines the mapping to use
when a TERM is referenced in an attribute value. See General Use of Terms in
Attributes and the section on Vocabulary Expansion.</desc>
<datatype>
<dataRef key="teidata.enumerated"/>
</datatype>
</attDef>
</attList>
</classSpec>

<!--
Hook the new class `att.global.analytic.rdfa` into the existing
class `att.global.analytic`
Expand All @@ -210,6 +214,13 @@
</classes>
</classSpec>

<elementSpec ident="citeData" mode="change">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting @property from <citeData> isn't a viable solution going forward. The attribute on citeData is (almost) precisely the same thing, except that it doesn't play a role in defining a proper triple (it specifies how to use the document to construct triples). Do these attributes have to be absolutely global? Can we simply override the definition in this case, as we do in various places with @type, for example. I feel like some thinking about the scope of RDFa in TEI might be worthwhile.

<desc>We delete the attribute @property from this element (A URI indicating a property definition) so as avoid
a double definition with the same attribute in our new class att.global.analytic.rdfa</desc>
<attList>
<attDef ident="property" mode="delete"/>
</attList>
</elementSpec>
</schemaSpec>
</body>
</text>
Expand Down