SlideShare a Scribd company logo
1 of 25
Download to read offline
Application Integration with XProc


Vojtech Toman
Principal Software Engineer
EMC Corporation
Overview


 XProc basics

 Application integration with XProc

 Q/A
XProc: An XML Pipeline Language


 W3C Candidate Recommendation
    http://www.w3.org/TR/xproc/

 Language for describing operations to be performed on XML
 documents

 Declarative, XML-based, extensible
XProc Status


  XProc processor implementations
     Calabash (http://xmlcalabash.com)

     Calumet (http://developer.emc.com/xmltech)

     …more in development

  XProc.org
     Informal website about XProc and its use

     http://xproc.org

  XProc Test Suite
     http://tests.xproc.org
Validate/XQuery/Transform Pipeline




        Validate


                     XQuery


                                     XSLT
XProc Basics


 Step
    Performs a well-defined task
    Validate, XSLT, XInclude, identity transformation, rename elements, …

 Three main step types:
    Atomic, compound, and built-in language constructs

 Pipeline
    Sequence (possibly non-linear) of steps
    Is a step itself

 Built-ins
    For-each, choose, try/catch, …

 XPath as expression language
Anatomy of an XProc Step


 Step declaration
    Type, input ports, output ports, options

 When used in a pipeline, a step                  source


 is a black box that                           Step
    Expects zero or more XML documents on         result
    its input ports

    Produces zero or more XML documents
    on its output ports
Step Declaration – Atomic Steps


  Standard XProc step: p:add-attribute


  <p:declare-step type="p:add-attribute"
                  xmlns:p="http://www.w3.org/ns/xproc">
    <p:input port="source"/>
    <p:output port="result"/>
    <p:option name="match" required="true"/>
    <p:option name="attribute-name" required="true"/>
    <p:option name="attribute-value" required="true"/>
  </p:declare-step>
Step Declaration – Compound Steps


 Pipeline that applies the p:add-attribute step

  <p:declare-step>
    <p:input port="source"/>
    <p:output port="result"/>


    <p:add-attribute match="book"
                      attribute-name="foo"
                      attribute-value="bar"/>
  </p:declare-step>
Extensibility of XProc


  Custom steps

  Step libraries & import functionality

  Extension attributes

  Implementation-defined mechanisms
     I/O extensibility

     Security

     …
Application Integration with XProc


  XProc as the XML processing layer

  Integration using standard XProc facilities
     Interoperable

  Integration using extensions
     Implementation-dependent

     Limited interoperability
XProc – Enabling Technology


 Some XML standards depend on
 XML processing capabilities          XForms

    XForms                      XML

 The XRX architecture                 HTTP
    XForms/REST/X......                         XML

    End-to-end XML model
                                      XProc
    XProc is a natural fit
                                              Native
                                             XML DB
Validate/XQuery/Transform Pipeline


  XProc itself integrates multiple XML technologies
     Easy to use, robust

     Focus on WHAT, not on the low-level HOW

     Better maintainability and customizability



            p:validate-
             with-xml-           p:xquery         p:xslt
             schema
Validate/XQuery/Transform Pipeline


<p:for-each>
  <p:validate-with-xml-schema>
    <p:input port="schema">...</p:input>
  </p:validate-with-xml-schema>
</p:for-each>
<p:xquery>
  <p:input port="query">...</p:input>
</p:xquery>
<p:for-each>
  <p:xslt>
    <p:input port="stylesheet">...</p:input>
  </p:xslt>
</p:for-each>
Executing external programs


  p:exec
    Program to execute         p:exec

    Command-line arguments              cmd

    Working directory

    Standard input/output

    Support for non-XML data

    Error handling
Executing external programs – Example


  Pipeline that counts the words in the input document


  <p:declare-step>
     <p:input port="source"/>
     <p:output port="result"/>
     <p:exec command="/usr/bin/wc"
             source-is-xml="false"
             result-is-xml="false"/>
  </p:declare-step>
Integration with REST Web Services


  p:http-request
    Request URL                  p:http-request

    Request method           Request
    Authentication                     HTTP
    Headers                                      Response
                                       REST
    Multipart messages
                                       Service
Integration with REST Web Services – Example


  Pipeline that retrieves the Twitter public timeline

  <p:declare-step>
     <p:output port="result"/>
     <p:http-request>
       <p:input port="source">
         <p:inline>
           <c:request method="GET"
              href="http://twitter.com/statuses/public_timeline.xml"/>
         </p:inline>
       </p:input>
     </p:http-request>
  </p:declare-step>
Custom Atomic Steps


 Custom step that provides the
                                             ext:custom-
 integration logic                               step
    Implementation in the processor’s host
    language
    Step declaration + import

 Potentially not interoperable
    p:step-available() XPath function

 EXProc.org
    http://exproc.org
Custom Atomic Steps – Example


  Custom step that triggers a workflow (xproc-wf.xpl)
<p:declare-step type="wf:trigger-workflow"
                xmlns:wf="http://example.com/ns/xproc-wf">
  <p:input port="source"/>
  <p:option name="workflow-type" required="true"/>
</p:declare-step>

  Usage:
<p:declare-step xmlns:wf="http://example.com/ns/xproc-wf">
  <p:input port="source"/>
  <p:import href="xproc-wf.xpl"/>
  <wf:trigger-wf workflow-type="translate"/>
</p:declare-step>
Integration on the I/O level


  Resource access in XProc is URI-based
     XProc processors should support file and http(s)

     Support for other URI schemes is implementation-defined

  Transparent support for additional storage models/systems


                p:load                          p:store




                            Storage system
Integration on the I/O Level - Example


  Pipeline that loads a document from a native XML database


  <p:declare-step>
     <p:output port="result"/>
     <p:load href="xhive:/books/book24.xml"/>
  </p:declare-step>
Other Types of Integration


  XML data model integration
     Persistent DOM-based native XML databases

  Integration via other XML languages
     XSLT and XQuery extensions
Conclusions


 XProc deals with composing XML processes

 Extensible by nature

 Easy to integrate with external world

 Declarative code easier to develop and maintain
Questions and Answers




                Vojtech Toman
           toman_vojtech@emc.com


              http://www.emc.com
        http://developer.emc.com/xmltech

More Related Content

What's hot

Simple Object Access Protocol
Simple Object Access ProtocolSimple Object Access Protocol
Simple Object Access Protocol
Saatviga Sudhahar
 
JSON-RPC Proxy Generation with PHP 5
JSON-RPC Proxy Generation with PHP 5JSON-RPC Proxy Generation with PHP 5
JSON-RPC Proxy Generation with PHP 5
Stephan Schmidt
 
Simple object access protocol
Simple object access protocolSimple object access protocol
Simple object access protocol
djleis
 
Coldfusion basics training by Live instructor
Coldfusion basics training by Live instructorColdfusion basics training by Live instructor
Coldfusion basics training by Live instructor
LearnFunGo
 

What's hot (20)

Fluentd Unified Logging Layer At Fossasia
Fluentd Unified Logging Layer At FossasiaFluentd Unified Logging Layer At Fossasia
Fluentd Unified Logging Layer At Fossasia
 
Simple Object Access Protocol
Simple Object Access ProtocolSimple Object Access Protocol
Simple Object Access Protocol
 
Bt0087 wml and wap programing2
Bt0087 wml and wap programing2Bt0087 wml and wap programing2
Bt0087 wml and wap programing2
 
JSON-RPC Proxy Generation with PHP 5
JSON-RPC Proxy Generation with PHP 5JSON-RPC Proxy Generation with PHP 5
JSON-RPC Proxy Generation with PHP 5
 
.Net framework
.Net framework.Net framework
.Net framework
 
Best Of Jdk 7
Best Of Jdk 7Best Of Jdk 7
Best Of Jdk 7
 
Shipping your logs to elk from mule app/cloudhub part 2
Shipping your logs to elk from mule app/cloudhub   part 2Shipping your logs to elk from mule app/cloudhub   part 2
Shipping your logs to elk from mule app/cloudhub part 2
 
SOAP - Simple Object Access Protocol
SOAP - Simple Object Access ProtocolSOAP - Simple Object Access Protocol
SOAP - Simple Object Access Protocol
 
Php intro
Php introPhp intro
Php intro
 
Php a dynamic web scripting language
Php   a dynamic web scripting languagePhp   a dynamic web scripting language
Php a dynamic web scripting language
 
Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)
 
Simple object access protocol
Simple object access protocolSimple object access protocol
Simple object access protocol
 
SOAP Overview
SOAP OverviewSOAP Overview
SOAP Overview
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
 
PHP
PHPPHP
PHP
 
PHP Hypertext Preprocessor
PHP Hypertext PreprocessorPHP Hypertext Preprocessor
PHP Hypertext Preprocessor
 
Fluentd introduction at ipros
Fluentd introduction at iprosFluentd introduction at ipros
Fluentd introduction at ipros
 
Sql php-vibrant course-mumbai(1)
Sql php-vibrant course-mumbai(1)Sql php-vibrant course-mumbai(1)
Sql php-vibrant course-mumbai(1)
 
Coldfusion basics training by Live instructor
Coldfusion basics training by Live instructorColdfusion basics training by Live instructor
Coldfusion basics training by Live instructor
 

Viewers also liked

Складові комп"ютера та їх призначення
Складові комп"ютера та їх призначенняСкладові комп"ютера та їх призначення
Складові комп"ютера та їх призначення
sveta7940
 
State Responsibility and Liability for Nuclear Damage1
State Responsibility and Liability for Nuclear Damage1State Responsibility and Liability for Nuclear Damage1
State Responsibility and Liability for Nuclear Damage1
Abhay Singh Thakur
 
โครงงาน โรคไบโพลาร์-Bipolar-คนสองบุคลิก
โครงงาน โรคไบโพลาร์-Bipolar-คนสองบุคลิกโครงงาน โรคไบโพลาร์-Bipolar-คนสองบุคลิก
โครงงาน โรคไบโพลาร์-Bipolar-คนสองบุคลิก
phurinwisachai
 
أرقام مكاتب الترجمة في عفيف
أرقام مكاتب الترجمة في عفيفأرقام مكاتب الترجمة في عفيف
أرقام مكاتب الترجمة في عفيف
Alhayat4Translation
 

Viewers also liked (20)

What to do when they've had too much Scratch?
What to do when they've had too much Scratch?What to do when they've had too much Scratch?
What to do when they've had too much Scratch?
 
Editing cover 4
Editing cover 4Editing cover 4
Editing cover 4
 
TV Quiz Long Connect
TV Quiz Long ConnectTV Quiz Long Connect
TV Quiz Long Connect
 
APP Email 7.27.05 (e)
APP Email 7.27.05 (e)APP Email 7.27.05 (e)
APP Email 7.27.05 (e)
 
EPA DROE Email 7.11.03
EPA DROE Email 7.11.03EPA DROE Email 7.11.03
EPA DROE Email 7.11.03
 
Складові комп"ютера та їх призначення
Складові комп"ютера та їх призначенняСкладові комп"ютера та їх призначення
Складові комп"ютера та їх призначення
 
回想支援ツールNFC仏壇
回想支援ツールNFC仏壇回想支援ツールNFC仏壇
回想支援ツールNFC仏壇
 
State Responsibility and Liability for Nuclear Damage1
State Responsibility and Liability for Nuclear Damage1State Responsibility and Liability for Nuclear Damage1
State Responsibility and Liability for Nuclear Damage1
 
APP PowerPoint
APP PowerPointAPP PowerPoint
APP PowerPoint
 
White House Forum On Health Reform Report
White House Forum On Health Reform ReportWhite House Forum On Health Reform Report
White House Forum On Health Reform Report
 
ધોરણ - 10 પ્રકરણ 20 ભારત - માનવવિકાસની ગતિશીલતા
ધોરણ - 10 પ્રકરણ 20  ભારત - માનવવિકાસની ગતિશીલતાધોરણ - 10 પ્રકરણ 20  ભારત - માનવવિકાસની ગતિશીલતા
ધોરણ - 10 પ્રકરણ 20 ભારત - માનવવિકાસની ગતિશીલતા
 
Welcome to flanders
Welcome to flandersWelcome to flanders
Welcome to flanders
 
RCEC Email 5.19.03 (a)
RCEC Email 5.19.03 (a)RCEC Email 5.19.03 (a)
RCEC Email 5.19.03 (a)
 
โครงงาน โรคไบโพลาร์-Bipolar-คนสองบุคลิก
โครงงาน โรคไบโพลาร์-Bipolar-คนสองบุคลิกโครงงาน โรคไบโพลาร์-Bipolar-คนสองบุคลิก
โครงงาน โรคไบโพลาร์-Bipolar-คนสองบุคลิก
 
Presentation 1 (2)
Presentation 1 (2)Presentation 1 (2)
Presentation 1 (2)
 
Lector Rss
Lector RssLector Rss
Lector Rss
 
FYK (Find Your Karen) from Go Camp Pro
FYK (Find Your Karen) from Go Camp ProFYK (Find Your Karen) from Go Camp Pro
FYK (Find Your Karen) from Go Camp Pro
 
Vidcon Thumbnail Best Practices - Vidcon Presentation - Jeremy Vest
Vidcon Thumbnail Best Practices - Vidcon Presentation - Jeremy VestVidcon Thumbnail Best Practices - Vidcon Presentation - Jeremy Vest
Vidcon Thumbnail Best Practices - Vidcon Presentation - Jeremy Vest
 
EPA DROE Email 6.18.03 (c)
EPA DROE Email 6.18.03 (c)EPA DROE Email 6.18.03 (c)
EPA DROE Email 6.18.03 (c)
 
أرقام مكاتب الترجمة في عفيف
أرقام مكاتب الترجمة في عفيفأرقام مكاتب الترجمة في عفيف
أرقام مكاتب الترجمة في عفيف
 

Similar to Application Integration with XProc

EXPath: the packaging system and the webapp framework
EXPath: the packaging system and the webapp frameworkEXPath: the packaging system and the webapp framework
EXPath: the packaging system and the webapp framework
Florent Georges
 
XML London 2013 - Architecture of xproc.xq an XProc processor
XML London 2013 - Architecture of xproc.xq an XProc processorXML London 2013 - Architecture of xproc.xq an XProc processor
XML London 2013 - Architecture of xproc.xq an XProc processor
jimfuller2009
 
Laurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationLaurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus Presentation
Ajax Experience 2009
 

Similar to Application Integration with XProc (20)

Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
EXPath: the packaging system and the webapp framework
EXPath: the packaging system and the webapp frameworkEXPath: the packaging system and the webapp framework
EXPath: the packaging system and the webapp framework
 
XML London 2013 - Architecture of xproc.xq an XProc processor
XML London 2013 - Architecture of xproc.xq an XProc processorXML London 2013 - Architecture of xproc.xq an XProc processor
XML London 2013 - Architecture of xproc.xq an XProc processor
 
Laurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationLaurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus Presentation
 
Rapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devicesRapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devices
 
Load Balancing with Apache
Load Balancing with ApacheLoad Balancing with Apache
Load Balancing with Apache
 
Flex with AMFPHP
Flex with AMFPHPFlex with AMFPHP
Flex with AMFPHP
 
Flex with AMFPHP
Flex with AMFPHPFlex with AMFPHP
Flex with AMFPHP
 
Synapseindia dot net development web applications with ajax
Synapseindia dot net development  web applications with ajaxSynapseindia dot net development  web applications with ajax
Synapseindia dot net development web applications with ajax
 
AK 3 web services using apache axis
AK 3   web services using apache axisAK 3   web services using apache axis
AK 3 web services using apache axis
 
Interoperable Web Services with JAX-WS and WSIT
Interoperable Web Services with JAX-WS and WSITInteroperable Web Services with JAX-WS and WSIT
Interoperable Web Services with JAX-WS and WSIT
 
2014 Taverna tutorial Tool service
2014 Taverna tutorial Tool service2014 Taverna tutorial Tool service
2014 Taverna tutorial Tool service
 
Play Framework
Play FrameworkPlay Framework
Play Framework
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and Californium
 
How to use soap component
How to use soap componentHow to use soap component
How to use soap component
 
Foomo / Zugspitze Presentation
Foomo / Zugspitze PresentationFoomo / Zugspitze Presentation
Foomo / Zugspitze Presentation
 
cq_cxf_integration
cq_cxf_integrationcq_cxf_integration
cq_cxf_integration
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
Cutting Edge Data Processing with PHP & XQuery
Cutting Edge Data Processing with PHP & XQueryCutting Edge Data Processing with PHP & XQuery
Cutting Edge Data Processing with PHP & XQuery
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

Application Integration with XProc

  • 1. Application Integration with XProc Vojtech Toman Principal Software Engineer EMC Corporation
  • 2. Overview XProc basics Application integration with XProc Q/A
  • 3. XProc: An XML Pipeline Language W3C Candidate Recommendation http://www.w3.org/TR/xproc/ Language for describing operations to be performed on XML documents Declarative, XML-based, extensible
  • 4. XProc Status XProc processor implementations Calabash (http://xmlcalabash.com) Calumet (http://developer.emc.com/xmltech) …more in development XProc.org Informal website about XProc and its use http://xproc.org XProc Test Suite http://tests.xproc.org
  • 5. Validate/XQuery/Transform Pipeline Validate XQuery XSLT
  • 6. XProc Basics Step Performs a well-defined task Validate, XSLT, XInclude, identity transformation, rename elements, … Three main step types: Atomic, compound, and built-in language constructs Pipeline Sequence (possibly non-linear) of steps Is a step itself Built-ins For-each, choose, try/catch, … XPath as expression language
  • 7. Anatomy of an XProc Step Step declaration Type, input ports, output ports, options When used in a pipeline, a step source is a black box that Step Expects zero or more XML documents on result its input ports Produces zero or more XML documents on its output ports
  • 8. Step Declaration – Atomic Steps Standard XProc step: p:add-attribute <p:declare-step type="p:add-attribute" xmlns:p="http://www.w3.org/ns/xproc"> <p:input port="source"/> <p:output port="result"/> <p:option name="match" required="true"/> <p:option name="attribute-name" required="true"/> <p:option name="attribute-value" required="true"/> </p:declare-step>
  • 9. Step Declaration – Compound Steps Pipeline that applies the p:add-attribute step <p:declare-step> <p:input port="source"/> <p:output port="result"/> <p:add-attribute match="book" attribute-name="foo" attribute-value="bar"/> </p:declare-step>
  • 10. Extensibility of XProc Custom steps Step libraries & import functionality Extension attributes Implementation-defined mechanisms I/O extensibility Security …
  • 11. Application Integration with XProc XProc as the XML processing layer Integration using standard XProc facilities Interoperable Integration using extensions Implementation-dependent Limited interoperability
  • 12. XProc – Enabling Technology Some XML standards depend on XML processing capabilities XForms XForms XML The XRX architecture HTTP XForms/REST/X...... XML End-to-end XML model XProc XProc is a natural fit Native XML DB
  • 13. Validate/XQuery/Transform Pipeline XProc itself integrates multiple XML technologies Easy to use, robust Focus on WHAT, not on the low-level HOW Better maintainability and customizability p:validate- with-xml- p:xquery p:xslt schema
  • 14. Validate/XQuery/Transform Pipeline <p:for-each> <p:validate-with-xml-schema> <p:input port="schema">...</p:input> </p:validate-with-xml-schema> </p:for-each> <p:xquery> <p:input port="query">...</p:input> </p:xquery> <p:for-each> <p:xslt> <p:input port="stylesheet">...</p:input> </p:xslt> </p:for-each>
  • 15. Executing external programs p:exec Program to execute p:exec Command-line arguments cmd Working directory Standard input/output Support for non-XML data Error handling
  • 16. Executing external programs – Example Pipeline that counts the words in the input document <p:declare-step> <p:input port="source"/> <p:output port="result"/> <p:exec command="/usr/bin/wc" source-is-xml="false" result-is-xml="false"/> </p:declare-step>
  • 17. Integration with REST Web Services p:http-request Request URL p:http-request Request method Request Authentication HTTP Headers Response REST Multipart messages Service
  • 18. Integration with REST Web Services – Example Pipeline that retrieves the Twitter public timeline <p:declare-step> <p:output port="result"/> <p:http-request> <p:input port="source"> <p:inline> <c:request method="GET" href="http://twitter.com/statuses/public_timeline.xml"/> </p:inline> </p:input> </p:http-request> </p:declare-step>
  • 19. Custom Atomic Steps Custom step that provides the ext:custom- integration logic step Implementation in the processor’s host language Step declaration + import Potentially not interoperable p:step-available() XPath function EXProc.org http://exproc.org
  • 20. Custom Atomic Steps – Example Custom step that triggers a workflow (xproc-wf.xpl) <p:declare-step type="wf:trigger-workflow" xmlns:wf="http://example.com/ns/xproc-wf"> <p:input port="source"/> <p:option name="workflow-type" required="true"/> </p:declare-step> Usage: <p:declare-step xmlns:wf="http://example.com/ns/xproc-wf"> <p:input port="source"/> <p:import href="xproc-wf.xpl"/> <wf:trigger-wf workflow-type="translate"/> </p:declare-step>
  • 21. Integration on the I/O level Resource access in XProc is URI-based XProc processors should support file and http(s) Support for other URI schemes is implementation-defined Transparent support for additional storage models/systems p:load p:store Storage system
  • 22. Integration on the I/O Level - Example Pipeline that loads a document from a native XML database <p:declare-step> <p:output port="result"/> <p:load href="xhive:/books/book24.xml"/> </p:declare-step>
  • 23. Other Types of Integration XML data model integration Persistent DOM-based native XML databases Integration via other XML languages XSLT and XQuery extensions
  • 24. Conclusions XProc deals with composing XML processes Extensible by nature Easy to integrate with external world Declarative code easier to develop and maintain
  • 25. Questions and Answers Vojtech Toman toman_vojtech@emc.com http://www.emc.com http://developer.emc.com/xmltech