Documents structurés, Multimédia et Web
DEA 2003-2003
A document is organized as a tree structure in which the leaves are the basic elements representing the "content" of the document.
<?xml version="1.0"?>
<message xml:lang="fr">
<sender> Cécile </sender>
<receiver> Muriel </receiver>
<subject> cours de DEA </subject>
<date> 14/10/2002 </date>
<body>
<para> c'est en salle F 107,</para>
<para> n'oublie pas!</para>
</body>
</message>
Extensible Markup Language: http://www.w3.org/XML/
XML is:
<!ELEMENT body (para)+ >
<!ELEMENT sender #PCDATA >
<!ELEMENT receiver #PCDATA >
<!ELEMENT subject #PCDATA >
<!ELEMENT date #PCDATA >
<!ELEMENT para #PCDATA >
<! ATTLIST message lang (fr | en | sp | it ) #REQUIRED >
(from : http://www.w3.org/TR/xmlquery-use-cases/)
<!ELEMENT bib (book* )> <!ELEMENT book (title, (author+ | editor+ ), publisher, price )> <!ATTLIST book year CDATA #REQUIRED > <!ELEMENT author (last, first )> <!ELEMENT editor (last, first, affiliation )> <!ELEMENT title (#PCDATA )> <!ELEMENT last (#PCDATA )> <!ELEMENT first (#PCDATA )> <!ELEMENT affiliation (#PCDATA )> <!ELEMENT publisher (#PCDATA )> <!ELEMENT price (#PCDATA )>
(also: document inclusion mechanism)
Motivation
<xsd:schema xmlns:xsd="http://www.w3.org/2000/08/XMLSchema">
<xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
<xsd:element name="comment" type="xsd:string"/>
<xsd:complexType name="PurchaseOrderType">
<xsd:sequence>
<xsd:element name="shipTo" type="USAddress"/>
<xsd:element name="billTo" type="USAddress"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="items" type="Items"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
...
</xsd:schema>
<schema xmlns='http://www.w3.org/1999/XMLSchema'
targetNamespace='http://www.w3.org/namespace/'
xmlns:t='http://www.w3.org/namespace/'>
<element name='message'>
<complexType content='elementOnly'>
<element ref='t:sender'/>
<element ref='t:receiver'/>
<element ref='t:subject' minOccurs='0'
maxOccurs='1'/>
<element ref='t:date'/>
<element ref='t:body'/>
<attribute name='lang' use='required'>
<simpleType base='string'>
<enumeration
value='fr'/>
<enumeration
value='en'/>
<enumeration
value='sp'/>
<enumeration
value='it'/>
</simpleType>
</attribute>
</complexType>
</element>
<element name='body'>
<complexType content='elementOnly'>
<sequence maxOccurs='unbounded'>
<element ref='t:para'/>
</sequence>
</complexType>
</element>
<element name='sender'> <complexType content='mixed'>
</complexType> </element>
<element name='receiver'> <complexType content='mixed'>
</complexType> </element>
<element name='subject'> <complexType content='mixed'>
</complexType> </element>
<element name='date'> <complexType content='mixed'>
</complexType> </element>
<element name='para'> <complexType content='mixed'>
</complexType> </element>
</schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="http://www.w3.org/XML/1998/namespace" xmlns="http://purl.org/dc/elements/1.1/" targetNamespace="http://purl.org/dc/elements/1.1/" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:annotation> <xs:appinfo> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <rdf:Description rdf:about=""> <dc:title>Simple DC XML Schema</dc:title> <dc:date>2002-03-12</dc:date> <dc:description>This schema defines terms for Simple Dublin Core... </dc:description> <dc:publisher>The Dublin Core Metadata Initiative</dc:publisher> <dc:creator>Pete Johnston (p.johnston@ukoln.ac.uk)</dc:creator> <dc:creator> ...</dc:creator> <dc:relation rdf:resource="http://purl.org/dc/elements/1.1/"/> </rdf:Description> </rdf:RDF> </xs:appinfo> </xs:annotation> <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"> </xs:import> <xs:element name="title" type="elementType"/> <xs:element name="creator" type="elementType"/> <xs:element name="subject" type="elementType"/> <xs:element name="description" type="elementType"/> <xs:element name="publisher" type="elementType"/> <xs:element name="contributor" type="elementType"/> <xs:element name="date" type="elementType"/> <xs:element name="type" type="elementType"/> <xs:element name="format" type="elementType"/> <xs:element name="identifier" type="elementType"/> <xs:element name="source" type="elementType"/> <xs:element name="language" type="elementType"/> <xs:element name="relation" type="elementType"/> <xs:element name="coverage" type="elementType"/> <xs:element name="rights" type="elementType"/> <xs:group name="elementsGroup"> <xs:sequence> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="title"/> <xs:element ref="creator"/> <xs:element ref="subject"/> <xs:element ref="description"/> <xs:element ref="publisher"/> <xs:element ref="contributor"/> <xs:element ref="date"/> <xs:element ref="type"/> <xs:element ref="format"/> <xs:element ref="identifier"/> <xs:element ref="source"/> <xs:element ref="language"/> <xs:element ref="relation"/> <xs:element ref="coverage"/> <xs:element ref="rights"/> </xs:choice> </xs:sequence> </xs:group> <xs:complexType name="elementType"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute ref="x:lang" use="optional"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:schema>
(from http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/)
<rdf:RDF xmlns: rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:s="http://description.org/schema/"> <rdf:Description about="http://www.w3.org/Home/Lassila"> <s:Creator rdf:resource="http://www.w3.org/staffId/85740"/> </rdf:Description> <rdf:Description about="http://www.w3.org/staffId/85740"> <rdf:type resource="http://description.org/schema/Person"/> <v:Name>Ora Lassila</v:Name> <v:Email>lassila@w3.org</v:Email> </rdf:Description> </rdf:RDF>
ex: Ralph Swick says that Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila.
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:a="http://description.org/schema/"> <rdf:Description> <rdf:subject resource="http://www.w3.org/Home/Lassila" /> <rdf:predicate resource="http://description.org/schema/Creator" /> <rdf:object>Ora Lassila</rdf:object> <rdf:type resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement" /> <a:attributedTo>Ralph Swick</a:attributedTo> </rdf:Description> </rdf:RDF>
Property name | comment | domain | range |
---|---|---|---|
rdf:subject | The subject of an RDF statement. | rdf:Statement | rdfs:Resource |
rdf:predicate | the predicate of an RDF statement. | rdf:Statement | rdf:Property |
rdf:object | The object of an RDF statement. | rdf:Statement | not specified |
rdf:type | Indicates membership of a class | rdfs:Resource | rdfs:Class |
rdfs:subClassOf | Indicates membership of a class | rdfs:Class | rdfs:Class |
rdfs:subPropertyOf | Indicates specialization of properties | rdf:Property | rdf:Property |
rdfs:label | Provides a human-readable version of a resource name. | rdfs:Resource | rdfs:Literal |
rdfs:domain | A domain class for a property type | rdf:Property | rdfs:Class |
rdfs:range | A range class for a property type | rdf:Property | rdfs:Class |
Use Dublin Core elements.
http://dmoz.org/rdf/structure.example.txt <RDF xmlns:r="http://www.w3.org/TR/RDF/" xmlns:d="http://purl.org/dc/elements/1.0/" xmlns="http://directory.mozilla.org/rdf"> <Topic r:id="Top"> <tag catid="1"/> <d:Title>Top</d:Title> </Topic> <Topic r:id="Top/Arts"> <tag catid="2"/> <d:Title>Arts</d:Title> <link r:resource="http://www3.bc.sympatico.ca/PHILLIPSHOTGLASS/GlassPage.html"/> </Topic> <Topic r:id="Top/World"> <tag catid="16"/> <d:Title>World</d:Title> <narrow r:resource="Top/World/Español"/> <narrow r:resource="Top/World/Chinese"/> <narrow r:resource="Top/World/Deutsch"/> </Topic> </RDF>
The formatting process in a structured document editor must deal with:
=> Formatting requirements:
Platform independence, document and site maintenance, adaptability to network performances
Generic properties
Separation of content and presentation between HTML and style sheets:
Exceptions: the margin-top property is not inherited, etc.
<style type="text/css">
<!-- h4 {font: 17pt; font-weight: bold; color: maroon}
h2 {font: 15pt; font-weight: bold; color: blue}
p {font: 12pt; color: black}
-->
</style>
<body>
<html> <style type="text/css"> <!--
mystyle.css -- >
<!-- body {font: 10pt };
p
{color: black;
margin-left:
0.5in; margin-top: -10px } --> </style>
</html>
<head> <link rel=stylesheet href="mystyle.css" type="text/css">
Basic rule: the most specific setting wins.
"! important" statement overrides normal rules
A style sheet XSL contains a set of rules pattern/template
<xsl:template match="emph"> <fo:inline-sequence font-weight="bold"> <xsl:apply-templates/> </fo:inline-sequence> </xsl:template>
<xsl:template match="author-group"> <fo:inline-sequence> <xsl:apply-templates select="author/given-name"/> </fo:inline-sequence> </xsl:template>
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="memoset"> <HTML> <BODY> <xsl:apply-templates select="mémo"/> </BODY> </HTML> </xsl:template> <xsl:template match="mémo"> <xsl:apply-templates/> </xsl:template> <xsl:template match="de"> <P>Message de: <xsl:value-of select="."/></P> </xsl:template> <xsl:template match="message"> <UL> <xsl:apply-templates select="para"/> </UL> </xsl:template> <xsl:template match="para"> <LI> <xsl:value-of select="."/> </LI> </xsl:template> </xsl:stylesheet>
Cas de SMIL avec l'outil LimSee
Cas de la vidéo avec VideoMadeus
Cas des systèmes de présentation par transformation(s)
-> spatial, temporel, animations, liens
-> besoins de perception : multivues
-> synchronisation entre les vues
-> manipulatons directes
Remarque: dépendance avec le modèle de composition multimédia
Le document est composé de 2 parties : La structure spatiale La structure temporelle (séquentielle ou parallèle) |
|
Téléchargement : http://opera.inrialpes.fr/LimSee.html
Prototype VideoMadeus (T. Tran Thuong)
=> Systèmes de présentation par transformations des
données source
?? Quels besoins d'édition ??
Prototype Madeus* (L. Villard)