November 28, 2006

Speaking of RELAX NG...

ISO published RELAX NG standard (also "Compact Syntax") for free at the "Freely Available Standards" page. Hmmm, since when ISO provides free standard downloads?

Also:  Schematron, NVDL and more.

[Via Rick Jelliffe]

...

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
...