W3C home > Mailing lists > Public > xproc-dev@w3.org > September 2008

possible bug in p:iteration select

From: James Garriss <james@garriss.org>
Date: Tue, 30 Sep 2008 13:20:18 -0400
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <C507D812.BDC%james@garriss.org>
Using Calabash 0.6.3:

I have folder with XML files.  I use p:directory-list to get a list of the

<p:directory-list path="./albums"/>

It returns a list as expected:

<c:directory xmlns:c="http://www.w3.org/ns/xproc-step" name="albums">
<c:file name="beautiful_new.xml"/>
<c:file name="considering_lily.xml"/>
<c:file name="i_2_(EYE).xml"/>

So I add a p:for-each with a p:iteration-source to enable me to process each
XML file:

        <p:output port="result"/>

        <p:iteration-source select="//c:file/@name"/>

(The p:identity is a temp placeholder; it will be replaced by p:xslt in a
bit.)  This code produces an interesting error:

Pipeline failed: org.xproc.XProcException:
net.sf.saxon.s9api.SaxonApiException: Cannot create an attribute node (name)
whose parent is a document node

It seems that XProc is trying to *create* an attribute instead of *reading*
the value of the attribute.

Is that a bug?

James Garriss

PS:  Here's my entire pipeline:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
    <p:input port="source">
    <p:output port="result"/>

    <p:directory-list path="./albums"/>
        <p:output port="result"/>

        <p:iteration-source select="//c:file/@name"/>
Received on Tuesday, 30 September 2008 17:21:05 UTC

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