DALI examples and mixed content

Markus Demleitner msdemlei at ari.uni-heidelberg.de
Tue May 24 11:16:18 CEST 2016


Hi,

On Mon, May 23, 2016 at 03:17:32PM +0100, Mark Taylor wrote:
> The general approach of sticking strictly with RDFa Lite at the expense
> of blocking some otherwise-useful-but-not-totally-necessary features
> (@content), as well as the details you mention about how to do that,
> looks good to me.
> 
> Concerning @content:
> so get ready ...  Actually I find the RDFa standard a bit hard to
> understand on the details of this topic, but as far as I can tell
> @content is forbidden at least on any element that has a @property
> of significance to DALI or TAP, so I plan to complain about those.
> 
> Note that the TAP 1.1 WD currently says this:
> 
>   "When using elements with src or href attributes to carry the property
>    attributes, note that the element content must be repeated in a content
>    attribute, as otherwise RDFa clients would interpret the embedded link rather
>    than the element content as the object in the triple."
> 
> so that text needs to be altered, at least so it does not condone
> use of @content, and possibly with some other constructive advice
> instead.

Ok -- I've tried to clean this up.  First, in DALI-1.1 WD, I propose
(and committed) the following patch (rev. 3406):

  --- DALI.tex	(revision 3405)
  +++ DALI.tex	(working copy)
  @@ -361,6 +361,46 @@
   included in surrounding text and the author does not want any special rendering 
   to be applied by the machine-readable additions.
   
  +To maintain compatibility with mainstream RDFa tools, extra care is
  +necessary with elements that have \xmlel{src} or \xmlel{href}
  +attributes.  According to RDFa rules, in such cases the object of the
  +relationship is the linked entity rather than the element content.
  +While this is intended in some cases -- see the continuation property
  +below -- this will lead to erroneous interpretations in the typcial
  +case.
  +
  +For instance,
  +
  +\begin{lstlisting}[language=XML]
  +<!-- Wrong! -->
  +<div id="x" resource="#x" typeof="example">
  +<p>The case of <a property="name" 
  +  href="http://object-resolver.edu/M42">Messier 42</a> is special.</p>
  +</div>
  +\end{lstlisting}
  +
  +would imply that the name of the example \texttt{x} is
  +\nolinkurl{http://object-resolver.edu/M42} rather than just ``Messier
  +42''.  Full RDFa offers the \xmlel{content} attribute to allow correct
  +markup even in the presence of \xmlel{href} attributes, but since DALI
  +examples are restricted to RDFa lite, this cannot be used.
  +
  +The rule of thumb is to only use elements with links when the
  +relationship's object actually is a linked document or entity (for the
  +terms given here, this is only true for continuation).  If document
  +authors wants to express a link with the relationship's object anyway,
  +they will have to restructure their texts (which typically will also
  +yield better link semantics).  For instance, the example above could be
  +written as:
  +
  +\begin{lstlisting}[language=XML]
  +<div id="x" resource="#x" typeof="example">
  +<p>The case of <span property="name">Messier 42</span> (<a
  +  href="http://object-resolver.edu/M42">M42 at object resolver</a>)
  +  is special.</p>
  +</div>
  +\end{lstlisting}
  +
   \subsubsection{name property}
   
   The content of this element must be plain text (i.e., no child
  @@ -377,7 +417,9 @@
   \subsubsection{capability property}
   
   The capability property for an example specifies which service capability the 
  -example is to be used with. For example, if the text is describing how to use a
  +example is to be used with by giving, in plain text, the standards URI
  +as given in the respective capability's \xmlel{standardID} attribute. 
  +For example, if the text is describing how to use a
   SODA-1.0 service, the example could contain:
   
   \begin{lstlisting}[language=XML]


-- I'm not totally happy with this text and would certainly
appreciate improvements.  I was tempted to regret the adoption of
RDFa while trying to explain this without going overboard.  But well,
this is stuff we'd have to think about ourselves if we hadn't re-used
what's already there...

In TAP, I've patched the paragraph in question like this:

  -When using elements with src or href attributes to carry the property 
  -attributes, note that the element content must be repeated in a content 
  -attribute, as otherwise RDFa clients would interpret the embedded link rather 
  -than the element content as the object in the triple.
  +Although it might be tempting, examples authors should not put table
  +names into HTML \xmlel{a} elements (e.g., to link to the table
  +descriptions).  As discussed in DALI 1.1, sect.~2.3, this would result
  +in invalid RDF statements.

The full patch to rev. 3407 fixes a few other things in that
paragraph.  Sorry about this.

Can people live with this?

Cheers,

          Markus


More information about the dal mailing list