Building Web Solutions With XML And XSL Lisa Lippert Program Manager Exchange Microsoft Corporation - PowerPoint PPT Presentation

Loading...

PPT – Building Web Solutions With XML And XSL Lisa Lippert Program Manager Exchange Microsoft Corporation PowerPoint presentation | free to view - id: a2c3f-YjdhN



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Building Web Solutions With XML And XSL Lisa Lippert Program Manager Exchange Microsoft Corporation

Description:

Define own unique namespace. E.g. 'http://mycompany.com/ xmlschemas' ... Define schema and namespace. New XML document type. New properties for Exchange. store items ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 33
Provided by: lisali8
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Building Web Solutions With XML And XSL Lisa Lippert Program Manager Exchange Microsoft Corporation


1
Building Web Solutions With XML And XSL Lisa
LippertProgram ManagerExchangeMicrosoft
Corporation
2
(No Transcript)
3
Overview
  • XML Advantages
  • Transferring XML
  • XML Documents and XML Properties
  • To and from Exchange store
  • Transforming and displaying XML
  • XSL XML Stylesheet Language
  • XML-DOM Data Object Model
  • XQL XML Query Language
  • XML-Data Data typing and schemas

4
XML Advantages
  • Overall
  • Tools exist to parse format
  • Easy to build new apps or send new data to
    existing apps
  • Easy to extend Exchange data (contacts, tasks,
    calendar items) with custom data

5
XML Advantages
  • IE5
  • Simple display
  • Request new data without reloading page
  • Performance gains
  • Variables preserved

6
XML Transfer Model
Network
Server
Client
HTML/ DHTML
Browser
ASP
XSL
Store
XML Parser
XML
7
XML Documents, XML Properties
  • XML is one type of object in store
  • text/xml or application/xml
  • XML properties on all objects in store
  • Request
  • List of specified properties
  • Filter or sort by property value
  • Response
  • Formatted as text/xml

8
Getting XML Into Exchange
  • HTTP
  • POST/PUT a document of type text/xml
  • XML-DOM
  • Script access to internals of XML docs on store
  • Office Documents
  • Save using Web Folders
  • PROPPATCH
  • Set XML properties on objects in store

9
Getting XML From Exchange
  • HTTP GET, XML-DOM
  • Documents of type text/xml
  • Download document as part of a script
  • PROPFIND, SEARCH
  • Properties on docs of all kinds

10
XSL Extensible Stylesheet Language
  • XSL transforms XML docs into
  • HTML pages
  • Other XML docs
  • Filtered, sorted, rearranged, elements renamed
  • XSL works together with HTML and CSS
  • HTML static, data and view mixed
  • CSS cant alter structure of data

11
XSL Advantages
  • Lightweight
  • From one data format, several views
  • Create variety of Web pages
  • Extract interesting data (perhaps from multiple
    XML sources)
  • Sort, filter data
  • Format data

12
Example Display Contact Properties As Table
  • Goals
  • To use the Exchange XML property schema
  • To display selected properties as a simple table
  • Note that we have ignored status codes

13
Namespaces
  • Unique Identifier used to disambiguate XML
    elements
  • A namespace ! a schema
  • A namespace ! a resolvable URL

ltto Xmlnsurnschemashttpmailgt
lisal_at_ms.comlt/togt ltto xmlnshttp//flightinfo.com
gt Dulles Airportlt/togt ltto xmlnshttp//virtu
algifts.comgt honeybunslt/togt
14
Namespaces
  • Defined once, used many times
  • Prefixes used to abbreviate long names
  • Prefixes are not fixed
  • Attributes can have namespaces

ltahref bdatatypeurigt http//url/foo.txt lt/a
hrefgt
15
Example With Namespaces
  • Uses namespace attributes
  • Also shows URL as a link

16
Custom Properties
  • Define own unique namespace
  • E.g. http//mycompany.com/xmlschemas
  • Define readable property names
  • Define type and syntax of property
  • Add property to resources
  • Use XML-DOM in script
  • Use DAV PROPPATCH

17
Example With Custom Properties
  • Goal to add custom properties to previous example

18
XSL Transforms
HTML, DHTML
Useful XML
Bulky XML
XSL Transform
XSL Format
CSS
ltfngtJohn Doelt/fngt ltogtMicrosoftlt/ogt
ltogtMicrosoftlt/ogt ltothergtuseless
infolt/othergt ... ltcontactgtltfngtJohn Doe
lt/fngtlt/contactgt
ltP Stylefont-styleitalicgt John Doe of
Microsoftlt/Pgt
19
Server-Side Transforms
  • Use XSL in an ASP page
  • Filter or transform XML data before it is sent to
    client
  • Extend Exchange data with custom data
  • E.g. add a node to the PROPFIND results to load a
    certain style sheet

20
Server-Side Transforms
Network
Server
Client
HTML/ DHTML
Browser
ASP
XSL
Store
XML Parser
XML
21
Server-Side Transforms
Network
Server
Client
HTML/ DHTML
Browser
ASP
XSL
XML
Store
XML Parser
XML
22
XML-DOM
  • Document Object Model
  • W3C Standard API and model
  • Model for XML
  • Documents contain elements
  • Elements contain elements and attributes
  • Can create documents, take apart documents
  • http//www.w3c.org/dom/

23
DOM Examples (VBScript)
DIM xmldoc DIM root DIM child Set xmldoc
CreateObject(Microsoft.XMLDOM) xmldoc.load(http
//svr/myfile.xml) Set root xmldoc.DocumentElem
ent For Each child In root.childNodes MsgBox
child.text Next
24
What Is XQL?
  • XQL does pattern-matching on XML documents
  • Provides matching for XSL Templates
  • Works with DOM to traverse tree

ltxslvalue-of selectxql/gt ltxsltemplate
selectxql/gt
FooXML.SelectSingleNode(xql) BarXML.SelectNode
s(xql)
25
XQL Examples
  • Hierarchy
  • All elements in a scope
  • Containing element
  • Element values
  • Sub-element values
  • Attributes
  • propstat/prop/to
  • propstat/prop/
  • bookexcerpt
  • cnLisa
  • bookauthorLisa
  • thisprop/_at_datatype

26
XML Schemas
  • DTD Document Type Description
  • XML that fits a DTD is valid, but any XML can be
    well-formed
  • The parser on the client may validate the XML
  • Only provides grammar checking
  • XML-Data is a richer schema language
  • Has some basic semantic information data
    typing, associations between properties

27
XML-Data
  • W3C Submission
  • Supported by IE5
  • Features
  • Data typing Integer, string, uri...
  • Schema definition language
  • So
  • All Exchange properties are typed
  • New custom properties can be typed
  • IE5 has some idea how to display them

28
Defining New Exchange Schemas
  • Easy way
  • Define schema and namespace
  • New XML document type
  • New properties for Exchange store items
  • Add to store
  • Hard way
  • Write a DTD
  • Make DTD available with XML

29
Summary
  • XML is easy to work with in Exchange
  • XSL and XML-DOM are powerful tools
  • Retrieve, filter, transform, format, display
  • Namespaces and XML-Data aid extensibility of XML
  • Extending Exchange data with custom data is easy
  • E-mail, calendaring, tasks and contacts
  • Increased access to information

30
Dev Resources
  • Tutorials and demos http//msdn.microsoft.com/xml
    /
  • XSL documentation http//www.w3.org/TR/NOTE-XSL-9
    70910,
  • ZDNet Devhead http//www.zdnet.com/devhead/filte
    rs/xml/
  • Tools http//www.xml.com/xml/pub/listrescat

31
Books On XML
  • Homer, Alex. XML in IE5 Programmers Reference
  • Simpson, John E. Just XML
  • Leventhal, Michael, et al. Designing XML Internet
    Applications
  • Bradley, Neil. The XML Companion
  • Mohr, Stephen. Designing Distributed Applications

32
(No Transcript)
About PowerShow.com