Using XSLT with Web Services - PowerPoint PPT Presentation

1 / 5
About This Presentation
Title:

Using XSLT with Web Services

Description:

... xml, RSS 1.0, RSS 0.9, Minimal, Tokeerkat, Meerkat. s is used to specify what you want Meerkat to search for. ... [2] See this URL for the complete Meerkat API: ... – PowerPoint PPT presentation

Number of Views:90
Avg rating:3.0/5.0
Slides: 6
Provided by: roger238
Category:
Tags: xslt | meerkat | services | using | web

less

Transcript and Presenter's Notes

Title: Using XSLT with Web Services


1
Using XSLT with Web Services
  • Roger L. Costello
  • XML Technologies

2
Document() function is for more than just static
XML documents!
  • The format of the document function is
    document(url). The URL does not have to be to a
    static XML document. It can be to any URL which
    serves up XML.
  • In other words, the URL could be to a Web service
    which dynamically generates XML documents!

3
XSLT as a Data Aggregator
Web Service 1
Web Service 2
document(url2)
document(url1)
XSLT
4
Meerkat Web Service
  • Meerkat is an open service1 which aggregates
    data from hundreds of sites
  • Here's an example of how to retrieve an XML
    document of all articles that were written on
    REST in the last 14 days
  • http//meerkat.oreillynet.com/?_flxmlsRESTt14
    DAY
  • Here are highlights of the Meerkat API2
  • _fl is used to indicate the desired "flavor" of
    the result. Legal values xml, RSS 1.0, RSS 0.9,
    Minimal, Tokeerkat, Meerkat
  • s is used to specify what you want Meerkat to
    search for. Separate keywords with a plus, e.g.,
    RESTSOAP means you want all articles with REST
    or SOAP in them
  • t is used to specify how far back you want
    Meerkat to look for stories. You give it a
    number and then either MINUTE, HOUR, DAY, ALL.
    ALL means that you want all stories (no number
    needed with ALL)

1 An open service is a web service that is free
and has a publicly available API 2 See this URL
for the complete Meerkat API
http//www.oreillynet.com/lpt/a//rss/2000/05/09/me
erkat_api.html
5
lt?xml version"1.0"?gt ltxslstylesheet
xmlnsxsl"http//www.w3.org/1999/XSL/Transform"
version"1.0"gt ltxsloutput
method"html"/gt ltxsltemplate match"/"gt
ltHTMLgt ltBODYgt ltxslvariable
name"Meerkat" select"document('http//www.oreill
ynet.com/meerkat/?_flxmlampsREST')"/gt
ltTABLE border"1" width"75"gt
ltTRgt ltTHgtTitlelt/THgt
ltTHgtDescriptionlt/THgt
lt/TRgt ltxslfor-each
select"Meerkat/meerkat/story"gt
ltTRgt ltTDgtltxslvalue-of
select"title"/gtlt/TDgt
ltTDgtltxslvalue-of select"description"/gtlt/TDgt
lt/TRgt
lt/xslfor-eachgt lt/TABLEgt
lt/BODYgt lt/HTMLgt lt/xsltemplategt lt/xsls
tylesheetgt
See document-example01 Note if you are running
the stylesheet behind a firewall you will need to
set the HTTP_PROXY appropriately.
Write a Comment
User Comments (0)
About PowerShow.com