Source: https://fhiso.org/TR/cev-rdfa-bindings-20170626
Timestamp: 2019-04-21 16:35:26+00:00

Document:
This is a first public draft of a standard documenting the proposed usage of the FHISO Citation Elements standard in RDFa. This document is not an FHISO standard and is not endorsed by the FHISO membership. It may be updated, replaced or obsoleted by other documents at any time.
In particular, some examples in this draft use citation elements that are not yet included in the draft Citation Element Vocabulary, and source derivation types that may be standardised in a future Source Derivation Vocabulary. These are likely to be changed as these vocabularies progress.
The specification of [RDFa Core] assumes a good working knowledge of the RDF graph model. A more accessible introduction to RDFa can be found in the [RDFa Primer], but FHISO's use of RDFa attributes here is limited and this standard is designed to be used without any knowledge of RDFa or RDF. An application parsing RDFa attributes according to this specification does not need a full RDFa parser, far less to support the full RDF graph model.
The title of the book can be tagged by adding a property attribute to the existing <i> element. As written above, no element contains just the author's name as the <p> element also encloses the title; however author's name can be wrapped in an <span> element and the property attributed added to that. HTML's <span> element has no defined meaning of its own, but exists to provide a place for attributes such as this.
The property attribute contains a citation element name as per §4.2. Full support for its RDFa semantics is required, other than when it is used in constructs that define source-exclusion elements, and except for the special behaviour RDFa gives to an rdfa:copy property for which support is optional.
The content attribute can be used to represent a citation element value as per §4.2.1. Full support for its RDFa semantics is required.
The href and src attribute can be used to represent a citation element value as per §4.2.1. They are not formally considered RDFa attributes but are part of the host language. Full support for their RDFa semantics is required if the host language permit their use, as HTML does.
The datetime attribute can also be used to represent a citation element value as per §4.2.1 if the host language is HTML.
The xml:lang and lang attributes are used to represent a language tag as per §4.2.3. Full support for their RDFa semantics is required.
The datatype attribute is used in this standard to determine the type of the citation element value in certain situations. Full support for its RDFa semantics is recommended. Any unsupported use of this attribute shall be ignored, except when the presence of this attribute (but not its value) affects the determination of the citation element value per §4.2.
[CEV Concepts] recommends that if high quality formatted citations are required, users should be allowed to fine-tune the presentation by hand because it is not anticipated that an application will always do a perfect job. Many citation styles use italics and some use bold, underlining or other text-level formatting when formatting certain citation elements. In order to allow the user to fine-tune the use of such formatting, the user should be allowed the formatted citation to be edited as HTML.
The use of RDFa attributes is not the recommended way of serialising citation element sets primarily because it requires creating a formatted citation. Doing this to a reasonable standard is non-trivial, and results in particular language and style being favoured. This standard is provided for situations when a formatted citation is desired or required anyway. For example, an enormous amount of genealogical research has been published online and includes formatted citations. If they are tagged according to this standard, these formatted citations can be copied and pasted into a genealogy application which can convert them back to a citation element set.
Here two alternative IRIs are used to tag the title, presumably because the citation's creator anticipated it being processed by applications that support [Dublin Core] metadata as well as FHISO's Citation Elements standards. A parser conforming to this standard will treat both IRIs as valid and create two citation elements, both with the same citation element value, however if the Dublic Core IRI is not known to the application, it will likely be ignored.
In the uses described by this standard the property attribute will always contain a citation element name, and the datatype attribute will always contain a class name. The typeof attribute will contain an IRI that allows this standard's use of RDFa to be distinguished from any other uses also present in the document. The rev and rel attributes will contain a source derivation type to denote citation layer links.
RDFa provides two separate mechanisms for abbreviating the IRIs in these attributes: by setting a local default vocabulary, and by using prefixes to create compact URIs expressions (CURIEs). Applications processing formatted citations in accordance with this standard must support both of these mechanisms. Expansion of terms using the local default vocabulary shall be done before the expansion of CURIEs. An application must behave as if all datatype, property, rel, rev and typeof attributes have been expanded before continuing to process the data.
Markup generators should ensure that a vocab is present if terms are being used when compatibility between implementations is desirable. When these attributes are used in languages other than HTML, the definition of that language may provide a default vocabulary that applies in the event that no vocab attribute is found; HTML provides no such default.
The prefix consisting of a single underscore character (U+005F) has special meaning in §7.4.5 [RDFa Core] for referencing blank nodes. It must not be used in CURIEs other than for that purpose. Support for blank nodes is optional in this standard. Applications that do not support blank nodes must ignore CURIEs with a prefix consisting of a single underscore.
In addition, applications supporting a larger part of RDFa may discard triples where the object is an RDF blank node.
a citation element value, which shall either be a string or a translation set.
For the purpose of this section, the current element refers to the element that has the property attribute which tags the current citation element.
The citation element name shall be the value of the property attribute, once shorthand IRIs have been expanded. If the property attribute contains more than one IRI, each shall be used as the citation element name of a separate citation element with the same citation element value.
In parsing a citation element, an application shall determine its current property value. This is used to construct its citation element value. The citation element value is a translation set when the citation element is translatable and a string otherwise. To decide this, an application shall determine whether the element is translatable. If the citation element was found (or assumed by default) to be translatable, the application shall also determine the language tag. The rules for determining the current property value, its translatability and its language tag are given in the sections below.
If the citation element was found (or assumed by default) to be translatable, a new translation set shall be constructed to serve as the citation element value. It shall comprise a single string, which shall be the current property value, and shall be tagged with the language tag. If the citation element was found not to be translatable, its citation element value shall be a string which shall be the current property value.
RDFa, as used in this standard, is a list-flattening format. This means it does not naturally provide a means of keeping the translation sets of each citation element separate because it has no means of distinguishing multi-valued elements from translatable elements. Applications must therefore assume every property attribute refers to a separate citation element.
It would be possible to define a usage of RDFa that was not a list-flattening format. After careful consideration is was decided not to do this on the grounds that it would make the RDFa usage excessively verbose and contrary to standard RDFa idioms, so much so that it would likely compromise the uptake of this standard.
The Anglo-Japanese Treaty was (at least nominally) authored by two people: the Marquess of Lansdowne and Count Hayashi Tadasu whose name is written in kanji as 林 董. A conformant application will see three authorNames and make each into a separate citation element, when in fact the desired behaviour is for "林 董" to be part of the same translation set as "Hayashi Tadasu".
Applications are required to use the translatedElement mechanism defined in §3.4.1 of [CEV Concepts] to disambiguate these cases.
If current element has a content attribute, and either has no datatype attribute, or its datatype attribute is empty or has a value (after expanding shorthand IRIs) other than either of the following IRIs then the current property value shall be the value of the content attribute.
These two IRIs have special treatment in RDFa. This standard excludes them for completeness, but it is not anticipated that they will arise in practice.
Consider adding support for the <date> element, even without a datetime attribute, if the host language is HTML.
Otherwise, in HTML or in other XML languages that support an href attribute, if the current element has a src attribute and no datatype attribute, the current property value shall be the value of the src attribute, which shall be an IRI.
Otherwise, the current property value shall be formed by concatenating the text contained in each of the descendant elements of the current element in document order.
A conformant parser must determine the translatability of a citation element as follows.
If an application has access to the definition of the citation element, it must use its translatability as given in the definition.
This is expected to be the normal case, as applications are expected to ship with definitions included for those citation elements their users are likely to use commonly.
Otherwise, an application may use one or more discovery mechanism to attempt to obtain a machine-readable definition of the citation element, and if successful should use the translatability from that definition.
The [CEV Concepts] standard does not currently define a discovery mechanism. This is likely to be subject of a future FHISO standard.
Otherwise, if the current element has a non-empty datatype attribute, then the citation element shall be considered not to be translatable. The value of the datatype attribute (once shorthand IRIs have been expanded) should be the range of the citation element. A datatype attribute must not be present on a citation element which is translatable; otherwise the use of a datatype attribute is recommended for citation elements that are not well-known.
By using a datatype attribute, the RDFa author is not only ensuring the application processing the data knows the citation element is not translatable, but is also telling the application that the citation element value is a date.
This rule exists for compatibility with a full HTML+RDFa parser; implementation of this rule is otherwise not recommended. Document authors should not rely on this behaviour, and should instead add a datetype attribute.
Had a different HTML element been used, say a <span>, and assuming this third-party element was unfamiliar to the parser, a parser not implementing this rule would have generated a translation set from this HTML element.
Otherwise, if the current property value was found in a src or href attribute, then the citation element shall be considered not to be translatable.
Otherwise, the application must assume the citation element is translatable and make its citation element value a translation set.
When these attributes are used in languages other than HTML, the definition of that language may provide a default language tag that applies in the event that no such attribute is found.
Once the citation elements in a document have been located, parsed and grouped into citation element sets, an application shall convert each into a citation layer. The [CEV Concepts] standard models a citation layer as a citation element set tagged with a layer identifier. An application parsing RDFa in accordance with this standard shall synthesise a unique layer identifier for each citation layer it reads.
It would be trivial to allow the resource attribute on the source-type element to be used as a layer identifier, but unless this standard is extended to allow citation layers to be referenced, this serves no purpose. This may change if explicit layer derivation links are added, rather than just having them implicit through nesting.
This representation of layer derivation links does not allow an arbitrary set of layer derivation links to be encoded, but it does cope with any that are anticipated to arise in practice. Applications supporting a greater range of RDFa functionality can express arbitrary collections of layer derivation links, and an example of this is given in §5.4.
This section is only relevant if an implementation wishes to make greater use of the RDF features that underlie RDFa.
Applications may utilise the fact that http://terms.fhiso.org/sources/CitedSource is an RDF subclass of http://terms.fhiso.org/sources/Source.
This document does not prescribe a particular mechanism for ensuring this, but most strategies will involve parse the RDFa attributes before and after the edit and identify any citation elements whose values have changed. An application might ask the user whether the change should be propagated back to the original citation element set. If the change is not to be propagated back to the citation element set, the application might delete the property attribute so the changed data is no longer recognised as a citation element, or insert a content attribute containing the correct data per §4.3.1.

References: §4
 §4
 §4
 §4
 §4
 §4
 §7
 §3
 §5
 §4