19. Elements and their Content element type character content element empty element < bibliography > < paper ID="object-fusion"> < authors > < author >Y.Papakonstantinou</ author > < author >S. Abiteboul</ author > < author >H. Garcia-Molina</ author > </ authors > < fullPaper source="fusion"/> < title >Object Fusion in Mediator Systems</ title > < booktitle > VLDB 96 </ booktitle > </ paper > </ bibliography > element content
20. Element Attributes <bibliography> <paper pid =" object-fusion " > <authors> <author>Y.Papakonstantinou</author> <author>S. Abiteboul</author> <author>H. Garcia-Molina</author> </authors> <fullPaper source ="fusion"/> <title>Object Fusion in Mediator Systems</title> <booktitle>VLDB 96</booktitle> </paper> </bibliography> Attribute name Attribute Value
21.
22. Example: Relational Data to XML R R tuple A a1 /A B b1 /B C c1 /C /tuple tuple A a2 /A B b2 /B C c2 /C /tuple … /R c2 b2 a2 c3 b3 a3 c1 b1 a1 C B A R tuple A B C a1 b1 c1 tuple A B C a2 b2 c2 tuple A B C a3 b3 c3
23. Example: Relational Data to XML R R tuple A a1 /A B b1 /B C c1 /C /tuple tuple A a2 /A B b2 /B C c2 /C /tuple … /R c2 b2 a2 c3 b3 a3 c1 b1 a1 C B A R tuple A B C a1 b1 c1 tuple A B C a2 b2 c2 tuple A B C a3 b3 c3
30. How do you get the data? Documents, stylesheets, and other data can all be expressed in XML. This model can work locally or over a network. Parsing, tree-building, and access can shift between client/server XML data Parser Information structure (tree+links) DOM Interface Any application can plug in via an API called “Document Object Model” DTD/ Schema But their information is accessed directly.
31. Server side XML publishing Server transforms to HTML/CSS; Ship to client browser for display Very common current strategy; Leverages current technology XML data XSLT http Stylesheet HTML +CSS Browser/ Interface
32.
33.
34.
35. Anatomy of an element <p type="rule">Use a hyphen: ­.</p> Start-tag Content End-tag Element Element type Attribute name Attribute value (character) entity reference Element type Attribute