advertisement

Applications of XML Pipelines

41 %
59 %
advertisement
Information about Applications of XML Pipelines

Published on June 19, 2007

Author: ebruchez

Source: slideshare.net

Description

The XProc XML pipeline language is well on its way to be standardized at W3C. But, exactly, what are XML pipelines good for? And how do they work in practice?

In this talk, we attempt to answer these questions by presenting use cases for XML pipelines implemented with XPL, a close cousin of XProc. We show in particular how XML pipelines fill a niche in the constantly evolving web applications ecosystem. Can XML pipelines help deal with multiple web browsers? With REST services? With the plethora of syndication formats such as RSS and Atom? With Ajax? We suggest that the answer is yes in all these cases.

We also show how XML pipelines can play a particularly interesting role when used in conjunction with XForms.
advertisement

Erik Bruchez [email_address] Applications of XML Pipelines XML Prague, June 16 th , 2007

XPL and XProc

History XPL stands for XML Pipeline Language 2002: Developed by A. Vernet and myself 2004: Implementation open source (LGPL) 2005: Specification for XPL at W3C We now participate in the XProc Working Group at W3C

XPL stands for XML Pipeline Language

2002: Developed by A. Vernet and myself

2004: Implementation open source (LGPL)

2005: Specification for XPL at W3C

We now participate in the XProc Working Group at W3C

Shared Features Same goal: performing sequences of operations on XML documents XML-based syntax Exchange of XML documents between "steps" Steps with multiple inputs and outputs Iterations and conditionals

Same goal: performing sequences of operations on XML documents

XML-based syntax

Exchange of XML documents between "steps"

Steps with multiple inputs and outputs

Iterations and conditionals

New in XProc Exception handling Viewports Sequences of documents between steps Parameters and options Standard step library

Exception handling

Viewports

Sequences of documents between steps

Parameters and options

Standard step library

XProc as a Superset of XPL Most XPL pipelines can be transformed into XProc with XSLT stylesheet (provided that the same steps are available on both sides) A subset of XProc can be implemented on top of XPL with XSLT

Most XPL pipelines can be transformed into XProc with XSLT stylesheet (provided that the same steps are available on both sides)

A subset of XProc can be implemented on top of XPL with XSLT

XPL and Orbeon Forms

Orbeon Forms Open source platform Evolution general-purpose XML transformation platform web presentation platform forms solution

Open source platform

Evolution

general-purpose XML transformation platform

web presentation platform

forms solution

XPL in Orbeon Forms MVC architecture Configurable post-processing Ajax server hooking-up to the XForms engine Lightweight REST services callable from XForms submissions

MVC architecture

Configurable post-processing

Ajax server hooking-up to the XForms engine

Lightweight REST services callable from XForms submissions

XML Pipelines and MVC

MVC Architecture Separates data and presentation Model View Controller

Separates data and presentation

Model

View

Controller

Controller Pipeline

Example "request" step extracts a portion of the URL path "choose" step contains one "when" branch per path to process Each branch Calls "model" sub-pipeline step Calls "view" sub-pipeline (stylesheet or XHTML+XForms) "serialize" step sends result to the browser

"request" step extracts a portion of the URL path

"choose" step contains one "when" branch per path to process

Each branch

Calls "model" sub-pipeline step

Calls "view" sub-pipeline (stylesheet or XHTML+XForms)

"serialize" step sends result to the browser

Request Step

Controller Language < page id=&quot;view-account&quot; path-info=&quot;/atm-view-account&quot; model=&quot;view-account-model.xpl&quot; view=&quot;view-account-view.xhtml&quot;/>

< page id=&quot;view-account&quot;

path-info=&quot;/atm-view-account&quot;

model=&quot;view-account-model.xpl&quot;

view=&quot;view-account-view.xhtml&quot;/>

Document Types & Client Capabilities

Post-Processing Pseudo-HTML document XHTML document Supported by client Not supported by client XHTML + XForms Supported by client Not supported by client

Pseudo-HTML document

XHTML document

Supported by client

Not supported by client

XHTML + XForms

Supported by client

Not supported by client

Other Document Types XSL-FO Atom and RSS Text and binary Other XML documents

XSL-FO

Atom and RSS

Text and binary

Other XML documents

Epilogue Pipeline Leverages conditionals Root element Other (xforms:model) Configurable and expandable

Leverages conditionals

Root element

Other (xforms:model)

Configurable and expandable

Portal Environment Full HTML document HTML fragment

Full HTML document

HTML fragment

REST

Typical REST Service Receives XML from client Returns back XML Variations on the payload JSON HTML plain text / custom formats

Receives XML from client

Returns back XML

Variations on the payload

JSON

HTML

plain text / custom formats

REST with Pipelines Rich enough steps (components) “ request” component “ response” or “serialization” component XSLT does a lot already!

Rich enough steps (components)

“ request” component

“ response” or “serialization” component

XSLT does a lot already!

Search Results &quot;request&quot; step extracts data submitted by client &quot;validation&quot; step validates the posted data &quot;SQL&quot; step calls relational database &quot;serialize&quot; step serializes XML to HTTP

&quot;request&quot; step extracts data submitted by client

&quot;validation&quot; step validates the posted data

&quot;SQL&quot; step calls relational database

&quot;serialize&quot; step serializes XML to HTTP

Adapter Service &quot;request&quot; step extracts POSTed data &quot;http&quot; step calls service with the extracted data. &quot;XSLT 2.0&quot; step (regexps) extracts data returned by service format XML response &quot;serialize&quot; step serializes XML to HTTP

&quot;request&quot; step extracts POSTed data

&quot;http&quot; step calls service with the extracted data.

&quot;XSLT 2.0&quot; step (regexps)

extracts data returned by service

format XML response

&quot;serialize&quot; step serializes XML to HTTP

Ajax

Ajax Server Server part is just REST service Can be implemented natively Plumbing with pipelines 

Server part is just REST service

Can be implemented natively

Plumbing with pipelines 

Ajax-Based XForms

Ajax XForms Server &quot;request&quot; step extracts request headers and HTTP method. Request is an HTTP POST &quot;request&quot; step extracts body and exports as a URI &quot;generator&quot; step dereferences URI and parses as XML Payload validated with Relax NG &quot;XForms server&quot; step receives the XML payload Response validated with Relax NG &quot;serializer&quot; step serializes response to HTTP as XML

&quot;request&quot; step extracts request headers and HTTP method.

Request is an HTTP POST

&quot;request&quot; step extracts body and exports as a URI

&quot;generator&quot; step dereferences URI and parses as XML

Payload validated with Relax NG

&quot;XForms server&quot; step receives the XML payload

Response validated with Relax NG

&quot;serializer&quot; step serializes response to HTTP as XML

Ajax XForms Server (cont.) Request is a pseudo-Ajax submission &quot;request&quot; step extracts request parameters &quot;XSLT&quot; step formats parameters into an XML document Payload validated with Relax NG &quot;XForms server&quot; step receives the XML payload Response validated with Relax NG &quot;XSLT&quot; step embeds XML into small XHTML document &quot;serializer&quot; step serializes response to HTTP as XML

Request is a pseudo-Ajax submission

&quot;request&quot; step extracts request parameters

&quot;XSLT&quot; step formats parameters into an XML document

Payload validated with Relax NG

&quot;XForms server&quot; step receives the XML payload

Response validated with Relax NG

&quot;XSLT&quot; step embeds XML into small XHTML document

&quot;serializer&quot; step serializes response to HTTP as XML

Cross-Domain Proxies &quot;request&quot; step obtains relevant request data &quot;http&quot; step forwards the step to an external service Forward the response back to the browser through HTTP

&quot;request&quot; step obtains relevant request data

&quot;http&quot; step forwards the step to an external service

Forward the response back to the browser through HTTP

Pipelines and XForms

XForms Submissions xforms:submission Serializes XML instance data Submits the serialization with a protocol XML data can be returned as well XForms 1.1 specifies http, https, file, and mailto SOAP serialization Implementation could define serializations to and from JSON over HTTP

xforms:submission

Serializes XML instance data

Submits the serialization with a protocol

XML data can be returned as well

XForms 1.1 specifies http, https, file, and mailto

SOAP serialization

Implementation could define serializations to and from JSON over HTTP

XForms 1.1 Extends 1.0 HTTP and HTTPS support Intent to support REST interfaces XForms applications natively talk with RESTful services that speak XML

Extends 1.0 HTTP and HTTPS support

Intent to support REST interfaces

XForms applications natively talk with RESTful services that speak XML

Impedance Mismatch Missing REST XML SOAP support XML pipelines = impedance adapters

Missing

REST

XML

SOAP support

XML pipelines = impedance adapters

Transformations XForms does not directly support XSLT 2.0 or XQuery Transformations can be implemented in XML pipelines called from an XForms submission

XForms does not directly support XSLT 2.0 or XQuery

Transformations can be implemented in XML pipelines called from an XForms submission

i18n XForms resources As XML instances Loaded during initialization Static resources from web server Database, etc. impedance mismatch solved with pipelines

XForms resources

As XML instances

Loaded during initialization

Static resources

from web server

Database, etc.

impedance mismatch solved with pipelines

Conclusion XML pipelines can play the role of a glue Putting together web apps out of XML XProc makes one more component of this architecture a standard Last missing piece of the puzzle: standard specification for a web application controller!

XML pipelines can play the role of a glue

Putting together web apps out of XML

XProc makes one more component of this architecture a standard

Last missing piece of the puzzle: standard specification for a web application controller!

Add a comment

Related pages

Applications_of_XML_Pipelines - Ap p lic atio ns o fXML ...

View Notes - Applications_of_XML_Pipelines from CS 5 at San Diego State. Ap p lic atio ns o fXML Pip e line s XMLPrague ,June 16 th ,2007 Erik
Read more

Applications of XML Pipelines - Technology - documents.mx

The XProc XML pipeline language is well on its way to be standardized at W3C. But, exactly, what are XML pipelines good for? And how do they work in practice?
Read more

XML Pipeline - XML Editor, XML Tools, and XQuery - Stylus ...

An XML pipeline represent the steps in processing XML documents. Stylus Studio provides powerful grapical tools for expressing XML pipelines in terms of a ...
Read more

Building reusable XML pipelines with APP - researchgate.net

Building reusable XML pipelines with APP Rui Lopes and Lu´ıs Carri¸co LaSIGE and Department of Informatics University of Lisbon {rlopes,lmc}@di.fc.ul.pt
Read more

An Introduction to XML Pipelines

An Introduction to XML Pipelines Erik Bruchez Architect Orbeon, Inc. Even though XML is becoming increasingly ubiquitous, there is no standard dedicated to ...
Read more

Processing Messages: Pipelines - msdn.microsoft.com

Connecting Applications Processing Messages: Pipelines. Processing Messages: ... BizTalk Server uses XML as its internal format for processing all documents.
Read more

Schema Resolution in Pipeline Components - msdn.microsoft.com

Developing BizTalk Server Applications Creating Pipelines Using Pipeline ... Pipeline components that receive XML messages determine the message type by ...
Read more

Copyright © Orbeon, Inc. All rights reserved. Erik Bruchez ...

Erik Bruchez Applications of XML Pipelines XML Prague, June 16 th, 2007. Published byMadeline Murphy Modified about 1 year ago. Embed. Download presentation
Read more

Building Applications With Reusable XML Components

Building Applications With Reusable XML Components by Erik Bruchez, ... XML pipelines can also be used to build an application from the ground up. ...
Read more