Task #13535

Bug #10507: As Klaus I want to use nested content elements on a website

Nice to have: Nested content elements for containers

Added by Rens Admiraal over 4 years ago. Updated almost 3 years ago.

Status:Resolved Start date:
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:-
Target version:-

History

#1 Updated by Rens Admiraal over 4 years ago

  • Subject changed from Nested content elements for containers to Nice to have: Nested content elements for containers

#2 Updated by Rens Admiraal over 4 years ago

  • Parent task changed from #13528 to #10507

#3 Updated by Karsten Dambekalns about 4 years ago

I emailed Jochen about RDFa and content nesting and stuff. Here is what he wrote:

Ich sehe mehrere prinzipielle Möglichkeiten, Entities (Bilder, andere Webseiten, etc. einschlißlich deren Metadaten) mit einem (Fließ)Text zu verbinden. Nehmen wir mal das Endprodukt

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:typo3="http://typo3.org/ontologies/core#" 
xmlns:dc="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/"  xmlns:sioc="http://rdfs.org/sioc/ns#" 
xmlns:og="http://ogp.me/ns#" xml:lang="en" lang="en">
<head profile="http://www.w3.org/1999/xhtml/vocab">
<title>Example</title>
<base href="http://example.com/" />
</head>
<body>
<article about="/resources/e1a6c4c3-c7f5-429c-9463-43f090df0baa" typeOf="sioc:Post">
<h2 property="dc:title">My Trip to Massachusetts</h2>
<p property="sioc:content" rel="og:img" resource="/resources/8685e939-dad2-4fd9-a04e-112c3fc7f16b">Lorem ipsum dolor sit 
amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<div class="typo3-image" about="/resources/8685e939-dad2-4fd9-a04e-112c3fc7f16b" typeOf="foaf:Image">
<div rel="typo3:realizedBy">
<img src="/images/hatfield.jpg" width="400" height="300" />
</div>
<div class="typo3-caption">
<span property="dc:title">Beautiful Town of Hatfield</span> by <span property="dc:creator">Jochen Rau</span>.
</div>
</div>
<p property="sioc:content">Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</article>
</body>
</html>

Dann könnte man den Text mit eingebettetem Bild in einem BLOB so speichern:

<p property="sioc:content" rel="og:img" resource="urn:uuid:8685e939-dad2-4fd9-a04e-112c3fc7f16b">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna 
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>

<p property="sioc:content">Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla 
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

<div about="urn:uuid:8685e939-dad2-4fd9-a04e-112c3fc7f16b" typeof="foaf:Image">
    <div rel="typo3:realizedBy">
        <img src="/images/hatfield-large.jpg" width="400" height="300" rel="typo3:context" resource="typo3:SingleView" />    
        <img src="/images/hatfield-thumb.jpg" width="40" height="30" rel="typo3:context" resource="typo3:ListView"/>
    </div>
    <span property="exif:imageWidth" content="862" datatype="xsd:integer" />
    <span property="exif:imageHeight" content="634" datatype="xsd:integer" />
    <span property="exif:dateTimeOriginal" content="2003-01-18T16:07:30" datatype="xsd:datetime" />
    <span property="dc:title" content="Beautiful Town of Hatfield" xml:lang="en" />
    <span property="dc:title" content="Das schöne Städtchen Hatfield" xml:lang="de" />
    <span property="dc:creator" resource="urn:uuid:91510ff9-c64a-4716-80a0-97aad4afa513"/>
    <span property="dc:description" content="Ullamco laboris nisi ut aliquip." />
    <a rel="license" href="http://creativecommons.org/licenses/by/3.0/" />
</div>

Dabei werden die eingebetteten Metadaten des Bildes zum Zeitpunkt der Seitengenerierung in die gewünschten HTML-Tags umgesetzt. Es können dabei Metadaten weggelassen werden (wie z.B. die Lizenzdaten). Manche fallen automatisch weg, da sie nicht in der angeforderten Sprache vorliegen. Dabei wird deutlich, dass RDFa zwei Zwecke hat: Zum Einen kann man damit den Inhalt für Maschinen-Clients lesbar machen. Zum andern lassen sich mit RDFa auch Daten innerhalb des Server-Systems schemafrei speichern. Durch Volltext-Extraktoren (gibt es für Solr) können alle Inhalte nahtlos durchsucht werden.

Die Metadaten können natürlich auch außerhalb des Textes gespeichert werden, da der Absatz mit dem Bild über die urn:uuid:8685e939.... eindeutig verknüpft ist. Beim Bild-Autor ist das so gemacht, da die Informationen ansonsten redundant vorliegen würden.

Die Trennung zwischen dem Bild als abstrakte Ressource und der Realisierung in Form "echter" Bild-Dateien scheint mir notwendig, da manche Metadaten nicht mit einer Bild-Datei, sondern mit dem Abstraktum verknüpft sind (es ist egal in welcher Auflösung das Bild vorliegt. Der Autor war immer ich, bzw. mein Konzept ;-)).

Die notwendige API zum Auslesen von RDFa-Daten aus einem HTML-Dokument wird zur Zeit in eine Spezifikation gegossen (http://www.w3.org/2010/02/rdfa/sources/rdf-api/). An dieser könnte man sich orientieren.

Der RDF-Graph, den man aus dem Snippet gewinnt, enthält keine exakte Position innerhalb eines Absatzes. Man könnte dies mit dem Vokabular http://www.w3.org/TR/Pointers-in-RDF10/ realisieren.

Als Vokabular für die Speicherung von Multi-Media-Inhalten kann man http://www.w3.org/TR/2011/WD-mediaont-10-20110308/ heranziehen.

Interessant sind auch die Aktivitäten innerhalb des IKS-Projekts (das ich -- ehrlich gesagt -- etwas unterschätzt habe): http://wiki.iks-project.eu/index.php/Semantic_Editor.

#4 Updated by Sebastian Kurfuerst over 3 years ago

  • Status changed from New to Resolved

nested content elements are implemented by now.

Also available in: Atom PDF