November 28, 2006

XProc?

I've been reading about XProc, new XML Pipeline language proposed by W3C.

Used to control and organize the flow of documents, the XProc language standardizes interactions, inputs and outputs for transformations for the large group of specifications such as XSLT, XML Schema, XInclude and Canonical XML that operate on and produce XML documents.

The "Proc" part stands for "Processing", so it's XML processing language. 

Here is a sample "validate and transform" pipeline just to give you a taste of what XProc is about:

 

Here is how it's expressed:

<p:pipeline name="fig2"
            xmlns:p="http://example.org/PipelineNamespace">
  <p:input port="doc" sequence="no"/>
  <p:output port="out" step="xform" source="result"/>

  <p:choose name="vcheck" step="fig2" source="doc">
    <p:when test="/*[@version &lt; 2.0]">
      <p:output name="valid" step="val1" source="result"/>
      <p:step type="p:validate" name="val1">
        <p:input port="document" step="fig2" source="doc"/>
        <p:input port="schema" href="v1schema.xsd"/>
      </p:step>
    </p:when>

    <p:otherwise>
      <p:output name="valid" step="val2" source="result"/>
      <p:step type="p:validate" name="val2">
        <p:input port="document" step="fig2" source="doc"/>
        <p:input port="schema" href="v2schema.xsd"/>
      </p:step>
    </p:otherwise>
  </p:choose>

  <p:step type="p:xslt" name="xform">
    <p:input port="document" step="vcheck" source="valid"/>
    <p:input port="stylesheet" href="stylesheet.xsl"/>
  </p:step>
</p:pipeline>

Syntax can spoil everything. We need visual XProc editor!

After all I think it's pretty damn good idea. I need it now. And we've got everything in .NET to implement it - XInclude, XSLT, validation, Canonical XML. So I'm going for this. This will be great addition to the Mvp.Xml project.

Here are some XProc resources to get you started:

  1. The XProc specification.
  2. XProc.org, the site tracking the progress of the XML Processing Model Working Group, maintained by Norman Walsh, chair of the WG. Lots of stuff, including XProc Wiki.
  3. public-xml-processing-model-comments mail list.
  4. Wikipedia article on the "XML pipeline"
  5. Norman Walsh's introductory essay on XProc, update.
  6. "Step By Step: Why XML Pipelines Make Sense" by Kurt Cagle.
  7. What people say about XProc - http://feeds.technorati.com/search/xproc
November 28, 2006 11:36 AM | #XML
Comments

Todd, your tool looks awesome. Too bad I'm not on Mac.

Posted by: Oleg Tkachenko at November 29, 2006 4:35 PM

Let me know when you want to get started. I am all about this one.

Posted by: Jeff Julian at November 29, 2006 2:16 AM

Are you on a Mac? I've just released a visual XML Pipeline editor in the form of Automator Actions:

Cocoatron.

Posted by: Todd Ditchendorf at November 28, 2006 7:12 PM

Yeah, this is great. Do you plan to update it for the XProc?

Posted by: Oleg Tkachenko at November 28, 2006 2:29 PM


Something like

http://www.stylusstudio.com/docs/v2007/d_pipeline6.html

Ciao
Ivan

Posted by: Ivan Pedruzzi at November 28, 2006 2:14 PM
Post a comment




Remember Me?