Lexique
Langages & Documents Réfs
Paul FranchiSI 4
2011-12
Techs
Sommaire
.
.
.
.
.
.
12/09/2011 Transparent - 1
Chap IX - RDF
Resource Description Framework
Chap IX - RDF
Resource Description Framework
Chap X - AJAX
Asynchronous JavaScript And XML
Chap X - AJAX
Asynchronous JavaScript And XML
SommaireLexique
Réfs
Techs
.
.
.
.
.
.
Transparent 212/09/2011
Sommaire du Cours
Chap I - Documents: Historique, Modèles, Standards et Références
Chap II - HTML: voir le cours CIP1-CMD & HTML5
Chap III - XML: "eXtensible Markup Language", les Bases
Chap IV - DTD: "Document Type Definition"
Chap V - CSS: Feuilles de Styles en Cascades& CSS3
Chap VI - DOM, DHTML: "Domain Object Model "& Programmation Dynamique en HTML & SPRY & JQuery
Chap VII - XSD: Schémas XML
Chap VIII - XML "Advanced" Processeurs et Dialectes: XPath, Xlink
Chap IX - XSLT: Transformations XML
Chap X - RDF: "Resource Description Framework"
Chap IX - AJAX: "Asynchronous JavaScript And XML"
Savoir-Faire: Know Hows
HTML XHTML CSS JS+DOM MATHML XPATH XLINK XSLT
Etat de l'art: HTML5 CSS3 SPRY SVG RDF AJAX XUL
SommaireLexique
Réfs
Techs
.
.
.
.
.
.
Transparent 312/09/2011
Web
EPU courses (in French)
Création & Manipulltion de Document http://www.polytech.unice.fr/~pfz/cmd.html
Introduction to Internet http://rainbow.i3s.unice.fr/iai/
Langages & Documents http:www.polytech.unice;fr/~pfz/document.html
W3C tutorial : http://www.w3schools.com/
Mozilla Development Center http://developer.mozilla.org/en/docs/Main_Page
W3C, http://www.w3.org/
Web Developer's Bookmarks http://antriksh.com/resources/
Biblio:
many issues at EPU's lib
Some Références
SommaireLexique
Réfs
Techs
.
.
.
.
.
.
Transparent 412/09/2011
Documentation et Manuels
Documents du web
liste de balises HTML
code des couleurs RVB
code HTML des caractères ISO
liste des extensions de fichiers (formats)
Expressions Rationnelles
Manuels.
Expressions régulières sous Emacs
Recherche et remplacement sous Emacs
compléments Emacs
grep sous Unix
Tutoriaux du Web
W3C : http://www.w3schools.com/
CSS Play : http://www.cssplay.co.uk/index
Zen Garden : http://www.csszengarden.com/tr/francais/
CSS in10 steps : http://www.barelyfitz.com/screencast/html- training/css/positioning/
10 steps to better CSS: http://shapeshed.com/journal/10_steps_to_bette r_css/
SommaireLexique
Réfs
Techs
.
.
.
.
.
.
Transparent 512/09/2011
Références Web
SommaireLexique
Réfs
Techs
.
.
.
.
.
.
Transparent 612/09/2011
API – Application Programming Interface
ANSI – American National Standards Institute
ASCII – American Standard Code for Information Interchange (128 car.)
AJAX – Asynchronous JavaScript & XML
CSS – Cascading Style Sheets
DHTML – Dynamic HTML
DOM – Document Object Model
DTD – Document Type Definition
HTML – HyperText Markup Language
HTTP – HyperText Transfer Protocol
ISO - International Standards Organization
Mozilla - Fondation (global community for free and open Internet software))
MVC - Model View Controler
RDF - Resource Description Framework
REST - Representational State Transfer
RIA - Rich Internet Application
RSS - Really Simple Syndication
SGML - Standard Generalized Markup Language
SOAP - Simple Access Object Protocol
SPRY - Extensions JS pour HTML - Adobe Lab.
SVG - Scalable Vector Graphics
UNICODE – World wide Code (16 bits)
UTF-8 – Unicode version 8 bits
URL / URI – Uniform Resource Locator / Identifier
XML – eXtensible Markup Language
XBL – XML Binding Language (Mozilla)
XForms – XML Forms
XHTML – HTML 4 en XML
XLink – XML Linking Language
XPath – XML Path Language
XPointer – XML Pointer Language
XSL - eXtensible Stylesheet Language
XSLT – XSL Transformations
XSL-FO – XSL Formatting Objects
XSD – XML Schémas Définition Language
XUL – XML User Language (Mozilla)
W3C – World Wide Web Consortium
Web2.0 – Web dit "sémantique"
WHATWG - Web Hypertext Application Technology Working Group
WSDL - Web Service Description Language
Lexique
Lexique
Langages & Documents Réfs
Paul FranchiSI 4
2011-12
Techs
Sommaire
.
.
.
.
.
.
12/09/2011 Transparent - 7
Chap IX - RDF
Resource Description Framework
Chap IX - RDF
Resource Description Framework
RDF/XML
Dublin Core
OWL
RDF validator
RDF/XML
Dublin Core
OWL
RDF validator
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 812/09/2011
RDF- Resource Description Framework (W3C)
RDF is a part of the W3C's Semantic Web Activity
RDF is a W3C Recommendation
RDF is a framework for describing resources on the web
RDF provides a model for data, and a syntax so that independent parties can exchange and use it
RDF is designed to be read and understood by computers
RDF is not designed for being displayed to people
RDF is a XML Dialect
RDF - Examples of Use
Describing properties for shopping items, such as price and availability
Describing time schedules for web events
Describing information about web pages, such as content, author, created and modified date
Describing content and rating for web pictures
Describing content for search engines
Describing electronic libraries.
RDF and "The Semantic Web"(W3C's "Semantic Web Vision")
Web information has exact meaning
Web information can be understood and processed by computers
Computers can integrate information from the web
RDF is a part of the W3C's Semantic Web Activity
RDF is a W3C Recommendation
RDF is a framework for describing resources on the web
RDF provides a model for data, and a syntax so that independent parties can exchange and use it
RDF is designed to be read and understood by computers
RDF is not designed for being displayed to people
RDF is a XML Dialect
RDF - Examples of Use
Describing properties for shopping items, such as price and availability
Describing time schedules for web events
Describing information about web pages, such as content, author, created and modified date
Describing content and rating for web pictures
Describing content for search engines
Describing electronic libraries.
RDF and "The Semantic Web"(W3C's "Semantic Web Vision")
Web information has exact meaning
Web information can be understood and processed by computers
Computers can integrate information from the web
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 912/09/2011
RDF/XML – Resource with Properties and Values
A Resource is anything that can have a URI (about=), such as "http://polytech/LANGDOC/RDF"
A Property is a Resource that has a name, such as <author>or <homepage>
A Property value, such as "Paul Franchi" or "http://www.polytech.unice.fr/~pfz"
W3C RDF Syntax Validator & Graph Generator
A Resource is anything that can have a URI (about=), such as "http://polytech/LANGDOC/RDF"
A Property is a Resource that has a name, such as <author>or <homepage>
A Property value, such as "Paul Franchi" or "http://www.polytech.unice.fr/~pfz"
W3C RDF Syntax Validator & Graph Generator
<?xml version="1.0" encoding="ISO-8859-1"?><!-- RDF file pour ce cours --><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:pol="http://polytech#" ><rdf:Description rdf:about="http://polytech/LANGDOC/RDF"> <pol:author> Paul Franchi </pol:author> <pol:homepage> http://www.polytech.unice.fr/~pfz </pol:homepage> </rdf:Description> </rdf:RDF>
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Un modèle de Graphe Entités/Relations
Une syntaxe RDF/XML pour "sérialiser" le graphe
Un modèle de Graphe Entités/Relations
Une syntaxe RDF/XML pour "sérialiser" le graphe
Transparent 1012/09/2011
RDF - Graphe Entité-Relation
http://polytech#author
http://polytech#homepage
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 1112/09/2011
RDF: Description, Property, Attribute, Value, resource
<?xml version="1.0" encoding="ISO-8859-1"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://www.Bib/cd#">
<rdf:Description rdf:about="http://www.Bib/cd/Empire Burlesque"cd:artist="Bob Dylan" cd:country="USA" cd:company="Columbia" cd:price="10.90" cd:year="1985" />
<rdf:Description rdf:about="http://www.Bib/cd/Hide your heart"> <cd:artist rdf:resource="http://www.Bib/cd/Bonnie Tyler" /><cd:company>CBS Records</cd:company><cd:year>1988</cd:year> </rdf:Description> . . .
</rdf:RDF>
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 1212/09/2011
RDF - W3C Syntax Validator & Graph Generator
http://www.w3.org/RDF/Validator/
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 1312/09/2011
RDF: Bag et les autres Conteneurs
<?xml version="1.0" encoding="ISO-8859-1"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://www.Bib/cd#"> <rdf:Description rdf:about="http://www.Bib/cd/Beatles"> <cd:artist>
<rdf:Bag> <rdf:li>John</rdf:li> <rdf:li>Paul</rdf:li> <rdf:li>George</rdf:li><rdf:li>Ringo</rdf:li>
</rdf:Bag> </cd:artist> </rdf:Description></rdf:RDF>
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 1412/09/2011
RDF: Bag, Seq, Alt
<?xml version="1.0" encoding="ISO-8859-1"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://www.Bib/cd#">
<rdf:Description rdf:about="http://www.Bib/cd/Beatles"> <cd:artist>
<rdf:Bag> <rdf:li>John</rdf:li> <rdf:li>Paul</rdf:li> <rdf:li>George</rdf:li><rdf:li>Ringo</rdf:li>
</rdf:Bag> </cd:artist> </rdf:Description>. . .
</rdf:RDF>
<cd:format> <rdf:Alt>
<rdf:li>CD</rdf:li><rdf:li>Record</rdf:li><rdf:li>Tape</rdf:li>
</rdf:Alt> </cd:format>
<cd:artist><rdf:Seq>
<rdf:li>George</rdf:li> <rdf:li>John</rdf:li> <rdf:li>Paul</rdf:li> <rdf:li>Ringo</rdf:li>
</rdf:Seq> </cd:artist>
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 1512/09/2011
RDF- les utilisations classiques
Dublin Core MetaData
OWL
Mozilla
contents.rdf
chrome.rdf
XUL
Communication par RDF files (génération par Php, etc.)
RSS 1.0
Dublin Core MetaData
OWL
Mozilla
contents.rdf
chrome.rdf
XUL
Communication par RDF files (génération par Php, etc.)
RSS 1.0
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 1612/09/2011
Dublin Core
The Dublin Core Metadata Initiative (DCMI) has created some predefined properties for describing documents.
The Dublin Core Metadata Initiative (DCMI) has created some predefined properties for describing documents.
Property DefinitionContributor An entity responsible for making contributions to the content of the resource
Coverage The extent or scope of the content of the resource
Creator An entity primarily responsible for making the content of the resource
Format The physical or digital manifestation of the resource
Date A date of an event in the lifecycle of the resource
Description An account of the content of the resource
Identifier An unambiguous reference to the resource within a given context
Language A language of the intellectual content of the resource
Publisher An entity responsible for making the resource available
Relation A reference to a related resource
Rights Information about rights held in and over the resource
Source A Reference to a resource from which the present resource is derived
Subject A topic of the content of the resource
Title A name given to the resource
Type The nature or genre of the content of the resource
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 1712/09/2011
Dublin Core
<?xml version="1.0" encoding="ISO-8859-1"?><!-- RDF file pour le Tutorial de W3Schools--><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="http://www.w3schools.com "> <dc:title>D-Lib Program</dc:title> <dc:description>W3Schools - Free tutorials</dc:description> <dc:publisher>Refsnes Data as</dc:publisher> <dc:date>1999-09-01</dc:date> <dc:type>Web Development</dc:type> <dc:format>text/html</dc:format> <dc:language>en</dc:language> </rdf:Description> </rdf:RDF>
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 1812/09/2011
OWL - "Web Ontology Language " (W3C)
What is OWL?
OWL is built on top of RDF as a web standard
OWL is for processing information on the web
OWL was designed to be interpreted by computers
OWL was not designed for being read by people
OWL is written in XML
OWL has three sublanguages:
OWL Lite
OWL DL (includes OWL Lite)
OWL Full (includes OWL DL)
OWL is Different from RDF
OWL is a stronger language with greater machine interpretability than RDF.
OWL comes with a larger vocabulary and stronger syntax than RDF.
What is OWL?
OWL is built on top of RDF as a web standard
OWL is for processing information on the web
OWL was designed to be interpreted by computers
OWL was not designed for being read by people
OWL is written in XML
OWL has three sublanguages:
OWL Lite
OWL DL (includes OWL Lite)
OWL Full (includes OWL DL)
OWL is Different from RDF
OWL is a stronger language with greater machine interpretability than RDF.
OWL comes with a larger vocabulary and stronger syntax than RDF.
What is Ontology?For the web, Ontology is about
the exact description of web information and relationships
between web information.
OWL Example (Airport)
OWL Resource: http://www.daml.org/2001/10/ html/airport-ont
Class: Airport
Properties:
elevation
iataCode
icaoCode
latitude
location
longitude
name
Lexique
Langages & Documents Réfs
Paul FranchiSI 4
2011-12
Techs
Sommaire
.
.
.
.
.
.
12/09/2011 Transparent - 19
Chap X - AJAX
Asynchronous JavaScript And XML
Chap X - AJAX
Asynchronous JavaScript And XML
Http synchrone
XMLHttpRequest
Http synchrone
XMLHttpRequest
Les exemples AJAX tournent sous FF3,mais pas (encore) sous FF4+
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 2012/09/2011
AJAX- Asynchronous JavaScript and XML
AJAX is not a new programming language, but a technique for creating better, faster, and more interactive web applications.
With AJAX, your JavaScript can communicate directly with the server, using the JavaScript XMLHttpRequest object. With this object, your JavaScript can trade data with a web server, without reloading the page.
AJAX uses asynchronous data transfer (HTTP requests) between the browser and the web server, allowing web pages to request small bits of information from the server instead of whole pages.
The AJAX technique makes Internet applications smaller, faster and more user-friendly.
AJAX is a browser technology independent of web server software.
AJAX is based on the following web standards:
JavaScript
XML
HTML
CSS
AJAX is not a new programming language, but a technique for creating better, faster, and more interactive web applications.
With AJAX, your JavaScript can communicate directly with the server, using the JavaScript XMLHttpRequest object. With this object, your JavaScript can trade data with a web server, without reloading the page.
AJAX uses asynchronous data transfer (HTTP requests) between the browser and the web server, allowing web pages to request small bits of information from the server instead of whole pages.
The AJAX technique makes Internet applications smaller, faster and more user-friendly.
AJAX is a browser technology independent of web server software.
AJAX is based on the following web standards:
JavaScript
XML
HTML
CSS
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 2112/09/2011
<html><script type="text/javascript">
function HTTP() {
}</script><body>
HTTP() ;
</body> </html>
Côté "Client"
Côté "Serveur"
AJAX : schéma "HttpRequest / Response"
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 2212/09/2011
L'Objet XMLHttpRequest
Attributs
readyState
status 200 si ok - 404 si la page n'est pas trouvée.
responseText données chargées dans une chaîne de caractères.
responseXml données chargées sous forme xml,
onreadystatechange propriété activée par un évènement de changement d'état. On lui assigne une fonction.
Méthodes
open(mode, url, boolean)
mode: type de requête, GET ou POST
url: l'adresse des données,
boolean: true (asynchrone) / false (synchrone).
en option on peut ajouter un login et un mot de passe.
send("chaine") null pour une commande GET.
Attributs
readyState
status 200 si ok - 404 si la page n'est pas trouvée.
responseText données chargées dans une chaîne de caractères.
responseXml données chargées sous forme xml,
onreadystatechange propriété activée par un évènement de changement d'état. On lui assigne une fonction.
Méthodes
open(mode, url, boolean)
mode: type de requête, GET ou POST
url: l'adresse des données,
boolean: true (asynchrone) / false (synchrone).
en option on peut ajouter un login et un mot de passe.
send("chaine") null pour une commande GET.
0 (non init)
1 (connexion)
2 (requete)
3 (réponse),
4 (terminé)
0 (non init)
1 (connexion)
2 (requete)
3 (réponse),
4 (terminé)
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 2312/09/2011
function submitForm(){
var xhr; try { xhr = new ActiveXObject('Msxml2.XMLHTTP'); }catch (e) { //IE
try { xhr = new ActiveXObject('Microsoft.XMLHTTP'); }catch (e2) { //FFtry { xhr = new XMLHttpRequest(); }catch (e3) { xhr = false; }
}}
xhr.onreadystatechange = function() { if(xhr.readyState == 4){
if(xhr.status == 200) document.ajax.dyn="Received:" + xhr.responseText;
elsedocument.ajax.dyn="Error code " + xhr.status;
}};
xhr.open( GET", "data.xml", true); xhr.send(null);
}
Script AJAX
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 2412/09/2011
<html><script type="text/javascript"> function syncHTTP() {try {
var xmlHttp;try { // IE7, Firefox, Opera 8.0+, Safari
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");xmlHttp=new XMLHttpRequest();
}catch (e) { alert("Your browser is not a good one!"); return false; }xmlHttp.open ("GET","http://www.w3schools.com/ajax/time.asp", false); // synchronexmlHttp.send (null);if(xmlHttp.status != 200) { throw new ERROR("HTTP " + xmlHttp.status); } //200=OKdocument.myForm.time.value=xmlHttp.responseText;
}catch (e) { alert("Erreur au HTTP"); return false;} } // syncHTTP()</script><body> <form name="myForm"> Name: <input type="text" onkeyup="syncHTTP() ;" name="username" />Time: <input type="text" name="time" /></form> </body> </html>
"Http synchrone"
"Request" synchrone sur un serveur
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 2512/09/2011
<html><script type="text/javascript"> var xmlHttp;function ajaxFunction() {
/* voir suivant */xmlHttp.onreadystatechange = function() {
/* voir suivant */}
}</script>
<form name="myForm"> Name:
<input type="text" onkeyup="ajaxFunction();" name="username" />
Time: <input type="text" name="time" />
</form></body></html>
XMLHttpRequest asynchrone: onreadystatechange()
"Request" sur un serveur (url, .asp ou.php)
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 2612/09/2011
function ajaxFunction() {var xmlHttp;try { // IE7, Firefox, Opera 8.0+, Safari
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");xmlHttp = new XMLHttpRequest();}
catch (e) { // Internet Explorer 6 et -try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); }catch (e) {
try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); }catch (e) { alert("Your browser does not support AJAX!"); return false; }}
}xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState==4) { document.myForm.time.value = xmlHttp.responseText; }
}xmlHttp.open("GET","http://www.w3schools.com/ajax/time.asp", true);xmlHttp.send (null);
} // ajaxFunction
XMLHttpRequest asynchrone: onreadystatechange()
"Request" sur un serveur (url, .asp ou.php)
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 2712/09/2011
<?xml version="1.0" encoding="ISO-8859-1"?><script type="text/javascript"><![CDATA[ var xmlhttp;function loadXMLDoc (url) {xmlhttp=null;if (window.XMLHttpRequest) { // code for IE7, Firefox, Mozilla, etc.
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");xmlhttp=new XMLHttpRequest();}
else if (window.ActiveXObject) { // code for IE5, IE6xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP");}
if (xmlhttp!=null) {xmlhttp.onreadystatechange = onResponse;xmlhttp.open ("GET", url, true);xmlhttp.send (null);}
else { alert ("Your browser does not support XMLHTTP."); }}
XMLHttpRequest asynchrone: onResponse()
XMLHttpRequest asynchrone: onResponse()
"Request" sur un document .xml
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 2812/09/2011
function onResponse(){if (xmlhttp.readyState!=4) return;if (xmlhttp.status!=0 && xmlhttp.status!=200) // OK?
{alert ("Problem retrieving XML data");return;}
TRAITEMENT_DU_XML() ; // ou TRAITEMENT_DU_TEXTE()}]]></script></head><body><div id="copy"><button onclick="loadXMLDoc('cd_catalog.xml')">Get CD info</button></div> </body>
XMLHttpRequest asynchrone: onResponse()
XMLHttpRequest asynchrone: onResponse()
"Request" sur un document .xml
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 2912/09/2011
TRAITEMENT_DU_TEXTE() {
// extraction du "string source"var reponse = xmlhttp.responseText ;
/******* traitement avec RegExp, match(), split(), substr(), slice(), etc.
****/
var debut=new RegExp ("[\\d\\D]*?<\/CD>");alert (xmlhttp.responseText.match(debut)[0]) ;
}
XMLHttpRequest: responseText
"Request" sur un document .xml
Lexique
Réfs
Techs
RDF- Resource Description Framework (source W3C)
"Request" sur un serveur (url, .asp ou.php)
RDF -W3C SyntaxValidator & Graph Generator
Dublin Core
RDF: Bag, Seq, Alt
RDF - Graphe Entité-Relation
OWL - "Web Ontology Language " (source W3C)
"Request" sur un document .xml
RDF/XML –Resource withProperties and Values
AJAX- AsynchronousJavaScript and XML
Objet xmlHttpRequest
Sommaire
Transparent 3012/09/2011
TRAITEMENT_DU_XML() {txt="<table border='1'>";x = xmlhttp.responseXML.
documentElement.getElementsByTagName("CD");for (i=0;i<x.length;i++) {
txt=txt + "<tr>";xx=x[i].getElementsByTagName("TITLE");
{try { txt=txt + "<td>" + xx[0].firstChild.nodeValue + "</td>"; }catch (er) { txt=txt + "<td> </td>"; }}
xx=x[i].getElementsByTagName("ARTIST");{try { txt=txt + "<td>" + xx[0].firstChild.nodeValue + "</td>"; }catch (er) { txt=txt + "<td> </td>"; }}
txt=txt + "</tr>";}
txt=txt + "</table>";document.getElementById('copy').innerHTML = txt;}
XMLHttpRequest: responseXML.
"Request" sur un document .xml