Introduction to XML Pipeline Language - XPL
The XML Pipeline Language (XPL) is a vocabulary for describing the processing model for the XML components. This vocabulary is in the draft stage and has been submitted to the W3C for discussion.
An XPL program is a well formed XML document conforming to the namespaces in XML Recommendation. Moreover the XPL program should also conform to the XPL specification.
An orchestrated sequence of operations is performed on XML Information Sets known as Infosets in an XPL program. Production, consumption, and transformation are the operations that can be performed on the Infosets by the XPL program.
Unconditional operations, conditions, loops and change of control are all supported in an XPL program. XPL addresses the problem of interoperability of the specifications from the point of view of the Infosets that are produced by the different specifications which can operate on the XML documents.
Before we get into the syntax of the XPL we should know that an XML processor is a component of an XPL program and an XML processor is identified by its QName. QName is shorter to write than the full URIs. It allows for logical grouping of the XML processors and is consistent with the other specifications like XSLT 2.0 Working Draft.
An XPL program consists of input and output parameters and a sequence of statements. Input parameters are those that provide XML Infoset to the XPL program and the output parameters are those that produces XML Infoset. It is possible for an XPL program to have no input or output.
The syntax for XPL is always organized into modules. The basic framework of the XPL consists of the Pipeline module and the Processor module. An XPL program always starts with an p:pipeline element. It is the root element in the XML document which has the XPL program. The p:pipeline element has a compulsory version attribute. At present the version attribute should have a value of “1.0”. The following code shows how the pipeline element looks like,
<p:pipeline version = “1.0”>
The p:input and the p:output elements define the inputs and the outputs to the XPL program. An p:input element will look as given below.
The p:output element defines one XPL program output. The name and the infosetref attributes are mandatory in the p:output element. The output element will look as given below. It can be within a p:pipeline element.
The processor element p:processor identifies the single XML processor instance and it comes in the Processor Module. The processor element can have p:input and p:output elements within it. The p:choose element is used to execute different sequences of statements depending on the conditions. Branching within the XPL program is done using the p:when and p:otherwise elements.
The statements within the p:when element is executed if the expression in the test attribute is true. The p:otherwise element is always a child element of the p:choose element. To execute a sequence of statement multiple times you can use a p:for-each element.
The processing model for the XPL is unlike the other programming languages. In this processing model the results to be produced are first determined and then the processing order is chosen to determine what statements should be executed.
During the initialization phase of the XML Processor execution if there is no declared output the execution of the processor terminates with the initialization phase. For more information on the processing model and the future improvements that can be done to this XPL you can visit the link http://www.w3.org/Submission/xpl/
“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”Copyright - © 2004 - 2019 - All Rights Reserved.