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”>
...
...
</p:pipeline>

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.

<p:input
name = ncname
infoset? = ncname
schema-uri? = uri-reference
schema-href? = uri-reference />

An input element should have a name. It is optional to have the other attributes like infoset, schema-uri, and schema-href. There can be any number of p:input elements within the p:pipeline element as its children. No two p:input elements can be the same name but an p:input and p:output can have the same name. The p:input element should occur before any element in the XPL program. The attributes schema-uri, and schema-href are used to validate the XML infosets associated with the input.

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.

<p:output
name = ncname
infosetref = infoset-reference
schema-uri? = uri-reference
schema-href? = uri-reference />

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/

 


SetApp - 100 Apps for everything you ever wanted to do on Mac

FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

_______________________________________







FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.

 

 

Add to My Yahoo!

Visit XML Training Material Guide Homepage

 

 

“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”

Copyright - © 2004 - 2019 - All Rights Reserved.