XML processing model use cases

All,

Please find below a first series of use cases. Most are expressed in
fairly broad terms, but a few are a little more concrete.

I also thought about a rough categorization of use cases based on the
type of execution environment:

o "Command-line" and "batch" environments.

o "Web" environment, where a process retrieves some data (possibly
   based on parameters), and then generates something like HTML, XHTML,
   XSL-FO, etc. following a series of transformations.

o "Service" environment, where an XML request is received, and a
   process uses the XML request to perform a series of tasks, and
   finally returns an XML response. XForms in particular yields many
   such use caes.

"Web" and "service" types of environments are obviously of great
importance given the current direction of the web (XForms submissions,
Ajax, web services in general).

-Erik

Simple use cases
----------------

o Simple transformation service (e.g. responding to XForms
   submission):

   o extract XML document (XForms instance) from an HTTP request body
   o execute XSLT transformation on that document
   o call persistence service with resulting document
   o return XML document from persistence service (new XForms instance)
     to HTTP response body

o Ajax server

   o receive XML request with word to complete
   o call sub-pipeline that retrieves list of completions for that word
   o format resulting document with XSLT
   o serialize response to XML

o Dynamic query

   o dynamically create XQuery query using XSLT, based on input XML
     document
   o execute XQuery query on XML database
   o construct XHTML result page based on returned data
   o serialize result to HTML

o Read and write non-XML file

   o Read CSV file and convert it to XML
   o Process document with XSLT
   o Convert result back to CSV file using Text serialization

o Single-file command-line document processing

   o read DocBook document
   o validate document
   o process it with XSLT
   o convert document to XHTML
   o validate resulting XHTML
   o save HTML file using HTML serialization

o XInclude processing

   o provide XML document containing XInclude instructions
   o provide documents to be XIncluded
   o execute XInclude inclusion
   o return single resulting document

o Document aggregation

   o provide several XML documents to aggregate
   o perform the aggregation under a new root element
   o serialize result as XML

Use cases involving conditionals
--------------------------------

o Conditional database access logic (select / update / insert)

   o receive XML document to save on pipeline input
   o call sub-pipeline to try to retrieve existing document from db
   o if document exists, call "update" sub-pipeline
   o if document does not exist, call "insert" sub-pipeline

o Content-dependent transformations

   o receive document to format
   o if document is XHTML, apply theme XSLT stylesheet and serialize to
     HTML
   o if document is XSL-FO, run XSL-FO to PDF converter
   o otherwise, just serialize as XML

o Configuration-dependent transformations (1)

   o receive document to format on first input
   o receive configuration on second input
   o if configuration is "desktop browser", run first XSLT
     transformation and serialize as HTML
   o if configuration is "mobile browser", run second XSLT
     transformation and serialize as XHTML

o Configuration-dependent transformations (2)

   o receive document in Atom 1.0 format on first input
   o receive configuration on second input
   o if configuration is "Atom 1.0", leave document as is
   o if configuration is "RSS 1.0", run XSLT transformation to convert
     to RSS 1.0
   o if configuration is "RSS 2.0", run XSLT transformation to convert
     to RSS 2.0
   o serialize result to XML

o Respond to XML-RPC request

   o receive XML-RPC request
   o validate XML-RPC request with RNG schema
   o depending on content of /methodCall/methodName, dispatch to
     different individual sub-pipelines
   o format response of sub-pipeline with XSLT to XML-RPC
   o validate XML-RPC response with W3C schema
   o return XML-RPC response

Use cases involving iterations
------------------------------

o Multiple-file command-line document generation

   o read list of source documents (in config XML file or by getting a
     directory listing)
   o for each document in list
     o read source document
     o perform series of XSLT transformations
     o serialize each transformed document to disk
   o OR, alternatively, aggregate all resulting documents and serialize
     a single resulting document

o Database import

   o read list of source documents
   o for each document in list
     o validate document
     o call sub-pipeline performing insertion into relational or XML
       database

o Ingestion process

   o receive directory name as XML parameter
   o produce list of files in directory, as XML document
   o iterate through each file listed in XML document
     o create iTQL query on the fly with XSLT
     o query repository to check if file has been loaded (update
       vs. insert)
     o load file
     o inspect file to check metadata type
     o transform document
     o make SOAP call to ingest document

o Metadata retrieval process

   o call SOAP service with metadata format as parameter
   o create iTQL query on the fly with XSLT
   o query repository for XML document
   o load list of XSLT transformation from config file
   o recursively or iteratively execute XSLT transformations
   o serialize result to HTTP

--

Received on Wednesday, 21 December 2005 23:05:23 UTC