Is there a way to implement feedback loops in XProc?

Hi Folks,

The spec says [1] that no feedback loops are allowed in an XProc pipeline:

    It is a static error (err:XS0001) if there 
    are any loops in the connections between 
    steps: no step can be connected to itself 
    nor can there be any sequence of connections 
    through other steps that leads back to itself.

So how are recursive structures processed?

As a simple example, suppose "Section" is defined recursively:

Section = Title | Title Section

If XProc supported feedback loops I would create a step in the pipeline that processes the content of a Section and the output is the nested Section, which is is fed back around to the step:

---> Step (process Section content) ----------
^                                                       		|
|					|
-------<--------<------------------<-----------<----
                  (nested Section)

Since feedback loops are not allowed, how is this type of thing accomplished in XProc? Note: I need to implement this using XProc and not simply hand it off to XSLT to implement the recursive processing.

/Roger

[1] http://www.w3.org/XML/XProc/docs/langspec.html#connections

Received on Wednesday, 1 May 2013 19:36:04 UTC