1 / 19

XML within Websites

XML within Websites. Philipp Glogowski - Stefan Mohr - Julia Wenzel University of Applied Sciences FHTW Berlin. Index. 1. Introduction 2. Overview about XML 3. Website vs. PDA-View with an example 4. Conclusions. 1. Introduction. targets: dynamic web site for www PDA view

harley
Download Presentation

XML within Websites

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. XML within Websites • Philipp Glogowski - Stefan Mohr - Julia Wenzel • University of Applied Sciences FHTW Berlin

  2. Index • 1. Introduction • 2. Overview about XML • 3. Website vs. PDA-View with an example • 4. Conclusions

  3. 1. Introduction • targets: • dynamic web site for www • PDA view • print version (pdf-format)

  4. 2. Overview about XML (1) • Extensible Markup Language • standard for creating documents • tree structure • readible by people & machines

  5. 2. Overview about XML (2) • data exchange format • generate any other formats • universally valid language • xml ≠ programming language ≠ database

  6. 2. Overview about XML (3) Content browser.html pda.html printer.html

  7. 2. Overview about XML (4) XML- File Content one xml file that is used to generate different website versions for a desktop-pc, a pda and a printer XML-FO

  8. 3. Website vs. PDA-View • website view - general view with internet browser • pda view - mobile devices • shortened version

  9. web site – startpage

  10. PDA view – startpage

  11. <?xml version="1.0" encoding="utf-8"?> <xsp:page xmlns:xsp="http://apache.org/xsp" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp-request="http://apache.org/xsp/request/2.0" language="java"> ... <content> <esql:execute-query> <esql:query> select id, spieler, tore, spiele, gelb, 2min, rot from mis_torschuetzen </esql:query> <esql:results> <rowset> <!-- für jede einzelene Ergebniszeile --> <esql:row-results> <row> <!-- damit holt man einen bestimmten Datensatz aus der Zeile der Tabelle --> <id><esql:get-int column="id"/></id> <spieler><esql:get-string column="spieler"/></spieler> <tore><esql:get-string column="tore"/></tore> <spiele><esql:get-string column="spiele"/></spiele> <gelb><esql:get-int column="gelb"/></gelb> <min2><esql:get-int column="2min"/></min2> <rot><esql:get-int column="rot"/></rot> </row> </esql:row-results> </rowset> </esql:results> </esql:execute-query> </content> ... </xsp:page>

  12. Header of the XML - File <?xml version="1.0" encoding="utf-8"?> <xsp:page xmlns:xsp="http://apache.org/xsp" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp-request="http://apache.org/xsp/request/2.0" language="java"> ...

  13. Database SQL Query <content> <esql:execute-query> <esql:query> select id, spieler, tore, spiele, gelb, 2min, rot from mis_torschuetzen </esql:query> ...

  14. Database SQL Values <esql:results> <rowset> <esql:row-results> <row> <id><esql:get-int column="id"/></id> <spieler><esql:get-string column="spieler"/></spieler> <tore><esql:get-string column="tore"/></tore> <spiele><esql:get-string column="spiele"/></spiele> <gelb><esql:get-int column="gelb"/></gelb> <min2><esql:get-int column="2min"/></min2> <rot><esql:get-int column="rot"/></rot> </row> </esql:row-results> </rowset> </esql:results> </esql:execute-query> </content> ... </xsp:page>

  15. 4. Conclusions • one file for different devices • platform independency • quick & easy changes

  16. Questions ??? Thank you for your attention.

More Related