W3C home > Mailing lists > Public > xproc-dev@w3.org > October 2011

Re: XProc Usability (was Re: New to Xproc Question : conditionnal "output port" definition?)

From: Romain Deltour <rdeltour@gmail.com>
Date: Wed, 12 Oct 2011 17:37:31 +0200
Message-Id: <201BDC5E-68D9-43D6-BC76-376944D6B896@gmail.com>
To: XProc Dev <xproc-dev@w3.org>
While we're at it, there could also be a couple syntactic shortcuts  
for simple port connections:

<p:input port="name" href="document.xml"/>
<p:input port="name" empty="yes"/>
<p:output port="name" pipe-step="other-step" pipe-port="name"/>

It admittedly doesn't save a lot, but can reduce the number of lines  
and make the pipeline more readable.

Oh, and I definitely second AVTs.


Le 12 oct. 11 à 16:48, Geert Josten a écrit :

> Just jumping in and out in the middle, regarding compactness..
> It would already help a lot if the specs could be tuned such that  
> you can rely more on default behavior, or could write things with  
> less characters:
> - You would not need the p:with-option stuff if attribute value  
> templates were supported from the start.
> - Things like generating empty input taking up 5 lines (p:identity  
> with p:input with p:empty inside), can't that be done shorter?
> - Maybe something specific to XMLCalabash, but why can't I just do  
> p:variable with a p:pipe connecting to parameters port? It complains  
> about context, forcing me to pipe the parameters through a  
> p:parameters first, and rerouting input around the p:parameters as  
> well.
> - Lot's of extensions don't produce output, but do take input  
> without doing much with that (most notably the file io extensions  
> for example). Why not just let them do identity transform as well,  
> making it much easier to do a large sequence of such steps..
> Just a few cents..
> Kind regards,
> Geert
>>>    *deep breath*
>>>    Going back to my earlier comparison: if XProc is like XSD, then
>>>    tools like XMLSH are like Relax-NG. Both XMLSH and RNG (or RNC)
>>>    solve the same goals as W3C specs, and they both do it with a
>>>    very significantly lower learning curve.
>> Would a non-XML syntax for XProc help?
>> I have one. I presented it as a "PechaKucha" lightning talk at XML
>> Summer School.
>> XML Syntax:
>> <p:pipeline xmlns:p="http://www.w3.org/ns/xproc"
>>            version='1.0'>
>> <p:serialization port="result"
>>                 method="xhtml" indent="true"/>
>> <p:xinclude/>
>> <p:xslt>
>>  <p:input port="stylesheet">
>>    <p:document href="dbslides.xsl"/>
>>  </p:input>
>> </p:xslt>
>> </p:pipeline>
>> "Compact" syntax:
>> pipeline {
>>  serialization "result" with method="xhtml", indent="true"
>>  xinclude
>>  xslt {
>>    input "stylesheet" {
>>      document "dbslides.xsl"
>>    }
>>  }
>> }
>> What struck me most after writing it is that it's not really much  
>> more
>> compact than the XML syntax. Jeni Tennison took up the challenge to
>> produce a more natural compact syntax. I'm having trouble getting
>> JavaCC to swallow it, but I'll get there eventually, I expect.
Received on Wednesday, 12 October 2011 15:38:12 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:09 UTC