Re: Ideas for future XProc versions

Hi Tony,

I what like to know what you think for the following idea.

We - the users - might define a sort of shorthand syntax and use an XSLT 
stylesheet to translate it into the normative XProc syntax. It would 
certainly be very simple to write such XSLT. We might consider adding a 
new namespace, something like xmlns:ps="http://xproc-shorthand.org" and 
making sure that the information content is so precisely defined that 
our shorthand is a truely equivalent representation (in terms of 
information content, I mean). This way also some experience can be 
gained and exchanged among developers.

Summing up: to have two syntaxes, the normative one and the shorthand 
one, and being able to switch between them back and forth at the push of 
a buttom, or a command line invocation.

With kind regards,
-- Hans-Juergen


Am 10.03.2011 17:04, schrieb Tony R.:
> Hello everyone!
>
>
> There seems to be a consensus that XProc could use some syntactic 
> sugar.  It could generally just be a little more human-friendly to read.
>
> I just whipped up a few examples of what I often wish was possible 
> when I'm working with XProc.
>
> Feel free to throw comments, criticisms, rotten fruit and vegetables, 
> and money…
>
> …or maybe even throw some of your own example code!  :)
>
>
> *****
> <!--
>     ALTERNATE SYNTAX FOR p:pipe (pipe() FUNCTION)
> ================================================================= -->
> *<input *port = "source" href = "pipe('step-name','port-name')" */> *
> ***<!--    defaults to primary output    -->* **
> ****<input * port = "source"  href = "pipe('step-name')" */> *
> *
>
> <!--
>     ALTERNATE SYNTAX FOR p:empty (empty() FUNCTION)
> ================================================================= -->
> *<input *  port = "source"   href = "empty()" */> *
> <!--    …or…    -->
> *<input *  port = "source"   empty = "true" */> *
>
>
> <!--
>     GROUPING FOR IMPORTS
>     (Code reuse good.  Overwhelming wall of text for imports bad.)
> ================================================================= -->
> *<imports> *
> *<import *href = "…" */> *
> *<import *href = "…" */> *
> *<import *href = "…" */> *
> *</imports> *
> <!--    …or space-separated URI list…    -->
> *<import *href = "
>     import1.xpl
>     import2.xpl
> http://another/import.xpl"
> */> *
>
>
> <!--
>     GROUPING FOR I/O PORTS
> ================================================================= -->
> *<ports> *
> *<input *  port = "source"   href = "…" */> *
> *<input *  port = "blah"     href = "blah.xml" */> *
> *<output *port = "result" */> *
> *<output *port = "alt-result" */> *
> *</ports> *
> ****** *
> *
> *
> *
> *
> *—Tony *

Received on Monday, 14 March 2011 08:53:36 UTC