1 / 6

Fly reservation study

Fly reservation study. Customers. Air Lines. Online reservation system. HTML. Air Line 1. XML. HTTP - XML. HTTP. Air Line 2. B2C : Présentation de l’information au client en fonction de l’appareil qu’il utilise téléphone WAP ou browser WEB.

herne
Download Presentation

Fly reservation study

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fly reservation study Customers Air Lines Online reservation system HTML Air Line 1 XML HTTP - XML HTTP Air Line 2 B2C : Présentation de l’information au client en fonction de l’appareil qu’il utilise téléphone WAP ou browser WEB B2B : Dialogue XML pour récupérer les informations auprès des compagnies aériennes et intégration WML (WAP)

  2. Customers Air Lines Online reservation system • Xml flight list modelization • Flight • Flight nb • Departure date • Departure city • Arrival city • Departure time • Arrival time • total seats • available seats • price Présentation de la liste des vols DTD Air Line 1 server HTML XSD XML XSL XSL HTML Liste des Vol de la compagnie Presentation server Integration server XML XSL WML Convertit le XML au format de la DTD de l’intégration serveur XML WML (WAP) XSL Air Line 2 server Représentation de la liste de tous les vols

  3. Étapes de TP file://D:/Docs/Cours/WAP/codes/A.wml • Installer Tomcat & Cocoon • Faire un fichier WML simple, le tester avec le simulateur en local, puis via HTTP • Ajouter le mime type WML au fichier de configuration (*) • Tester un fichier WML http://localhost:8080/cocoon/TD/test.wml airline1-valide-dtd.xml airline1-valide-xsd.XML airline1.dtd airline1.xsd Airline1_Conv2Integration.xsl airline2.xml Airline2_Conv2Integration.xsl <mime-mapping> <extension> wml </extension> <mime-type> text/vnd.wap.wml </mime-type> </mime-mapping> <mime-mapping> <extension> wbmp </extension> <mime-type> image/vnd.wap.wbmp </mime-type> integration.xml integration.xsl validate_js.htm presentation.xml presentation_HTML.xsl presentation_WML.xsl (*) MIME types : web.xml du projet !

  4. Étapes du TP Customers Air Lines Online reservation system DTD HTML Air Line 1 server XSL XSD XSL HTML XML XML 2 WML (WAP) Presentation server Integration server 5 XSL XML XML XSL WML XSL Fichier exemple XML XSL XML Air Line 2 server 1 4 3 • Coder un fichier XML représentant la liste des vols de toutes les compagnies • Faire un feuille de style pour affichage en HTML • Faire un feuille de style pour affichage en WML • Coder une DTD, une XSD et un fichier XML représentant les vols la compagnie aérienne 1 (balises différentes de celles générées par le serveur d’intégration) • Tester la validation avec « validate_js.htm » • Coder une feuille de style pour conversion du document XML airline1 en document XML compatible avec le serveur d’intégration • Faire un Fichier XML et XSL pour le serveur simulé Airline2 • Réaliser l’intégration de différents fichier XML grâce à deux fichiers XML + XSL • Créer deux fichiers XML + XSL pour récupérer le flux du serveur d’intégration et appliquer contextuellement les feuilles de style testées en 1) • Réaliser la conversion et la présentation via un programme Java

  5. exemple Air Lines Syntaxe XSD <FlightList xmlns="x-schema:airline1.xsd"> Integration Serveur <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="Airline1_Conv2Integration.xsl"?> <?cocoon-process type="xslt"?> <!DOCTYPE FlightList SYSTEM "airline1.dtd"> <FlightList> <AirLineName>EasyJet.com</AirLineName> <Flight FlightNb="aze"> <dd>11/11/01</dd> <dc>nice</dc> <ac>paris</ac> <dt>0100</dt> <at>420</at> <TotalSeats>100</TotalSeats> <AvailableSeats>8</AvailableSeats> <SeatPrice>500.3</SeatPrice> </Flight> </FlightList> <?xml version="1.0"?> <?xml-stylesheet href="integration.xsl" type="text/xsl"?> <?cocoon-process type="xslt"?> <test> <file href="http://localhost:8080/cocoon/TD/Airline1/airline1-valide-dtd.xml" /> <file href="http://localhost:8080/cocoon/TD/Airline2/airline2.xml" /> </test> XSL 2 4 = <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="test"> <xsl:processing-instruction name="cocoon-format">type="text/xml"</xsl:processing-instruction> <FlightsList> <xsl:for-each select="document(file/@href)"> <xsl:copy-of select="FL/*"/> </xsl:for-each> </FlightsList> </xsl:template> </xsl:stylesheet> XSL <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="Airline2_Conv2Integration.xsl"?> <?cocoon-process type="xslt"?> <Flight_List> <Flight> <Flight_nb>CDZE11</Flight_nb> <Departure_date>11/11/01</Departure_date> <Departure_city>nice</Departure_city> <Arrival_city>paris</Arrival_city> <Departure_time>0900</Departure_time> <Arrival_time>1030</Arrival_time> <total_seats>420</total_seats> <available_seats>15</available_seats> <price_per_seats>1202</price_per_seats> </Flight> …. 3

  6. exemple Integration Serveur Presentation Serveur <?xml version="1.0"?> <?xml-stylesheet href="presentation_HTML.xsl" type="text/xsl"?> <?xml-stylesheet href="presentation_WML.xsl" type="text/xsl" media="wap"?> <?cocoon-process type="xslt"?> <presentation> </presentation> 5 <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html"/> <xsl:variable name="IntegrationDocument" select="document('http://localhost:8080/cocoon/TD/IntegrationServeur/integration.xml')"/> <xsl:template match="/"> ….. <xsl:for-each select="$IntegrationDocument/FlightsList/f"> <tr><td> <center><xsl:value-of select="@Compagny"/><br/>Vol : <xsl:value-of select="@Flight_nb"/></center> </td><td> <center><xsl:value-of select="dc"/> - <xsl:value-of select="ac"/></center> </td><td> <center><xsl:value-of select="dd"/><br/><xsl:value-of select="dt"/> - <xsl:value-of select="at"/></center> </td></tr> </xsl:for-each> …

More Related