Download presentation
Presentation is loading. Please wait.
Published byKristina Lynch Modified over 9 years ago
1
XML, XSL, and SOAP Building Object Systems from Documents CSC/ECE 591o Summer 2000
2
Copyright © 2000, Sandeep Singhal New Web Technologies Technologies under development by the World Wide Web Consortium (W3C) See http://www.w3.orghttp://www.w3.org Standards for Web-based documents XML: Extensible Markup Language XSL: Extensible Stylesheet Language SOAP: Simple Object Access Protocol Other technologies: XML Pointer, XML Fragments, XML Schema, Resource Description Framework (RDF)…
3
Copyright © 2000, Sandeep Singhal XML, the Extensible Markup Language Structured meta-data language Derived from SGML (Simple Generalized Markup Language) Same heritage as HTML, so looks similar Used to describe any type of information in a machine-readable way
4
Copyright © 2000, Sandeep Singhal Components of XML DTD (Document Type Definition) Description of valid XML document syntax (elements and structure) Element XML document component Example: … Example: CDATA: Text inside an element Comments: Tags:,, Processing instructions:
5
Copyright © 2000, Sandeep Singhal Example XML Document Hello, world!
6
Copyright © 2000, Sandeep Singhal Example DTD
7
Copyright © 2000, Sandeep Singhal A More Complex DTD
8
Copyright © 2000, Sandeep Singhal XSL – Extensible Stylesheet Language XSL is a language for expressing stylesheets (XSL:T) A language for transforming XML documents An XML vocabulary for specifying formatting semantics (under development) An XSL stylesheet specifies the presentation of a class of XML documents by describing how an instance of the class is transformed into an XML document that uses the formatting vocabulary
9
Copyright © 2000, Sandeep Singhal Thinking of XSL Model the XML document as a “tree” XSL document is a list of node “patterns” and “actions” Search XML tree for matching patterns and apply corresponding actions Result is target document
10
Copyright © 2000, Sandeep Singhal A Simple XSL Example <xsl:stylesheet version="1.0“ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/strict">
11
Copyright © 2000, Sandeep Singhal Applying the Example Document Title Chapter Title Document Title Chapter Title
12
Copyright © 2000, Sandeep Singhal Defining an “area” of the Tree Types of relationships Child Sibling Parent Descendant Ancestor Root
13
Copyright © 2000, Sandeep Singhal Examples of Template Matching para (element match) * (any element) chapter|appendix (either/or) olist/item (parent/child) appendix//para (ancestor/child) / (root) id(“W11”) (any node with ID W11) para[1] (para element that is first child) para[last()=1] (only para child) para[position()>1] (not first para child) para[position() mod 2=1] (odd numbered child para)
14
Copyright © 2000, Sandeep Singhal Content Generation Among the things you can do: Generate numbered lists Create XML processing instructions Apply variables and dynamic values Create comments Sort
15
Copyright © 2000, Sandeep Singhal Uses of XSL Convert XML data Into HTML, WML, VoiceXML, etc. One XSL document per target format Single input document Bridge disparate systems EDI Legacy integration
16
Copyright © 2000, Sandeep Singhal SOAP: Simple Object Access Protocol Developed by IBM, Microsoft, Lotus, DevelopMentor, and UserLand Software Lightweight protocol for exchanging information in a decentralized distributed environment XML description of an RPC call Implementation could be RMI or ActiveX or something else Represents an alternative to IIOP Uses HTTP to transport request/response
17
Copyright © 2000, Sandeep Singhal Document Structure (mandatory) [Describes SOAP message type] (optional): Includes processing instructions for the request (mandatory): Describes the parameters Fault: Includes error codes
18
Copyright © 2000, Sandeep Singhal SOAP Example Request HOST /StockQuote HTTP/1.1 Host: www.stockquoteserver.comwww.stockquoteserver.com Content-Type: text/xml; charset=“utf-8” Content-Length: nnnn SOAPAction: “Some-URI” <SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/http://schemas.xmlsoap.org/soap/envelope/ SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/>http://schemas.xmlsoap.org/soap/encoding/ DIS
19
Copyright © 2000, Sandeep Singhal SOAP Example Response HTTP/1.1 200 OK Content-Type: text/xml; charset=“utf-8” Content-Length: nnnn <SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/http://schemas.xmlsoap.org/soap/envelope/ SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/>http://schemas.xmlsoap.org/soap/encoding/ 34.5
20
Copyright © 2000, Sandeep Singhal Another SOAP Example … <SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/http://schemas.xmlsoap.org/soap/envelope/ SOAP- ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/>http://schemas.xmlsoap.org/soap/encoding/ <t:Transaction xmlns:t=“some-URI” SOAP-ENV:mustUnderstand=“1”> 5 IBM Yes
21
Copyright © 2000, Sandeep Singhal Some Other Capabilities Encoding Can define structures, arrays, enumerations, and other basic data types Transmission Use standard HTTP 1.1 Use HTTP Extension Framework
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.