RE: XD0016 Error

Hi,

The problem is with this line:

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

It basically tells p:for-each to loop over attribute nodes, which is not
supported. The following small change should make it work:

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

Regards,
Vojtech

--
Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
vojtech.toman@emc.com
http://developer.emc.com/xmltech


> -----Original Message-----
> From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On
Behalf Of
> Betty Harvey
> Sent: Tuesday, August 10, 2010 6:09 PM
> To: xproc-dev@w3.org
> Subject: XD0016 Error
> 
> I am using Calabash in Oxygen.  I am getting the following error:
> 
> Description: XD0016 : XD0016 It is a dynamic error if the select
> expression on a p:input returns atomic values or anything other than
> element or document nodes (or an empty sequence).
> 
> I haven't been able to find the problem.  I have a feeling that the
> directory listing isn't being passed to the <p:for-each> statement.
> If I comment out the <p:for-each> statement.  I am able to see the
> file listing.
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
> xmlns:c="http://www.w3.org/ns/xproc-step" name="p1" version="1.0">
>     <p:input port="source" sequence="true"/>
>     <p:output port="result" sequence="true"/>
> 
>     <p:directory-list name="list" include-filter=".*\.xml" path="1"/>
> 
> 
>     <p:for-each name="loop-files">
> 
> 
>         <p:output port="result">
>             <p:pipe port="result" step="write2file"/>
>         </p:output>
> 
>         <p:iteration-source select="/c:directory/c:file/@name"/>
> 
>         <p:variable name="file" select="/c:directory/c:file/@name"/>
> 
>         <p:load>
>             <p:with-option name="href" select="$file"/>
>         </p:load>
> 
>         <p:xslt name="xslt">
>             <p:input port="stylesheet">
>                 <p:document href="../ConvertARC-To-ACE.xsl"/>
>             </p:input>
>             <p:input port="parameters">
>                 <p:empty/>
>             </p:input>
>         </p:xslt>
> 
> 
>         <p:store name="write2file">
>             <p:with-option name="href" select="'../SampleACE/1/',
$file)"/>
>             <p:input port="source"/>
>         </p:store>
> 
>     </p:for-each>
> </p:declare-step>
> 
> File listing when <p:for-each> statement commented out.
> 
> <c:directory name="1"
> xml:base="file:/M:/Projects/NARA/Arc-to-ACE/allRecords/1/">
>    <c:file name="Collection_1000.xml"/>
>    <c:file name="Collection_1001.xml"/>
>    <c:file name="Collection_1002.xml"/>
>    <c:file name="Collection_1003.xml"/>
>    <c:file name="Collection_1004.xml"/>
>    <c:file name="Collection_1005.xml"/>
>    <c:file name="Collection_1006.xml"/>
>    <c:file name="Collection_1007.xml"/>
>    <c:file name="Collection_1008.xml"/>
>    ...
> </c:directory>
> 
> TIA!
> 
> Betty
> 
> 
> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
> Betty Harvey                         | Phone: 410-787-9200 FAX: 9830
> Electronic Commerce Connection, Inc. |
> harvey@eccnet.com                    | Washington,DC XML Users Grp
> URL:  http://www.eccnet.com          | http://www.eccnet.com/xmlug/
> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/
> Member of XML Guild (www.xmlguild.org)
> 
> 

Received on Thursday, 12 August 2010 16:37:38 UTC