[oXygen-user] Strange XProc/Oxygen Issue

Betty Harvey
Mon Aug 16 12:51:07 CDT 2010


Problem solved!  Basically I forgot to take the 'xsl:result-document' out
of the XSLT on the second machine. The error message was telling me 0
output documents.  I feel like an idiot.  I only copied the XProc document
to the second machine but forgot that I had made a modification to remove
the 'xsl:result-document' statement from the original XSLT.

Thanks George - your response sparked me my memory of modifying the XSLT.

Thanks again!

Betty

> Dear Betty,
>
> One thing that you should do is to get also the latest Calabash
> connector, see
> http://lists.w3.org/Archives/Public/xproc-dev/2010Jul/0024.html
>
> I made a complete working sample based on your file [1]. Please let me
> know if you encounter difficulties running this sample on any of your
> machines.
>
> [1] Sample files - all the files should be placed in a folder without
> any other files
>
> test.xpl
>
> <?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" version="1.0">
>      <p:input port="source" />
>      <p:output port="result" sequence="true"/>
>
>      <p:directory-list name="list" include-filter=".*\.xml" path="."/>
>
>
>      <p:for-each>
>          <p:output port="result">
>              <p:pipe port="result" step="write2file"/>
>          </p:output>
>
>          <p:iteration-source select="/c:directory/c:file"/>
>
>          <p:variable name="file" select="/c:file/@name"/>
>
>          <p:load>
>              <p:with-option name="href" select="$file"/>
>          </p:load>
>
>
>          <p:xslt name="xsd-flatten">
>              <p:input port="source"/>
>              <p:input port="stylesheet">
>                  <p:document href="convert.xsl"/>
>              </p:input>
>
>              <p:input port="parameters">
>                  <p:empty/>
>              </p:input>
>          </p:xslt>
>
>
>          <p:store name="write2file">
>              <p:with-option name="href"
>                  select="concat('results/', $file,'.xml')"/>
>              <p:input port="source"/>
>          </p:store>
>
>      </p:for-each>
>
> </p:declare-step>
>
>
> x.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <test>
>
> </test>
>
> convert.xsl
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>      xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
>      exclude-result-prefixes="xd"
>      version="1.0">
>      <xd:doc scope="stylesheet">
>          <xd:desc>
>              <xd:p><xd:b>Created on:</xd:b> Aug 16, 2010</xd:p>
>              <xd:p><xd:b>Author:</xd:b> george</xd:p>
>              <xd:p></xd:p>
>          </xd:desc>
>      </xd:doc>
>      <xsl:template match="node() | @*">
>          <xsl:copy>
>              <xsl:apply-templates select="node() | @*"/>
>          </xsl:copy>
>      </xsl:template>
>
> </xsl:stylesheet>
>
> The output should be found in a results subfolder.
>
> Best Regards,
> George
> --
> George Cristian Bina
> <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
> http://www.oxygenxml.com
>
> On 8/13/10 11:59 PM, Betty Harvey wrote:
>> I have an XProc script (copied below) that works on oXygen on my Laptop.
>> When I tried running the script on my desktop computer I get the
>> following
>> error:
>>
>> "SystemID: C:\Projects\NARA\Arc-to-ACE\allRecords\1\test.xpl
>> Engine name: Calabash XProc
>> Severity: error
>> Description: XD0006 : 0 documents appear on the 'source' port. If
>> sequence
>> is not specified, or has the value false, then it is a dynamic error
>> unless exactly one document appears on the declared port.
>> URL: http://www.w3.org/TR/xproc/#err.D0006"
>>
>> On the desktop I was running from an external disk but copied the
>> environment to the same environment (C drive) on my desktop and had
>> the same errors.
>>
>> Laptop Computer Configuration (works):
>>          Oxygen 11.2, build 2010041213
>>          Windows Vista/Service Pack 2
>>          4 GB
>>          64 Bit Operating System
>> Desktop Computer Configuration (does not work):
>>          Oxygen 11.2, build 2010080212 (downloaded new copy today)
>>          Windows Visa/Service Pack 2
>>          3 GB
>>          32 bit Operating System
>>
>> I am not sure where to look for answers at this point.  Thanks!
>>
>>
>> <?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" version="1.0">
>>      <p:input port="source" />
>>      <p:output port="result" sequence="true"/>
>>
>>      <p:directory-list name="list" include-filter=".*\.xml" path="."/>
>>
>>
>>      <p:for-each>
>>          <p:output port="result">
>>              <p:pipe port="result" step="write2file"/>
>>          </p:output>
>>
>>          <p:iteration-source select="/c:directory/c:file"/>
>>
>>          <p:variable name="file" select="/c:file/@name"/>
>>
>>          <p:load>
>>              <p:with-option name="href" select="$file"/>
>>          </p:load>
>>
>>
>>          <p:xslt name="xsd-flatten">
>>              <p:input port="source"/>
>>              <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="concat('../../SampleACE/1/', $file,'.xml')"/>
>>              <p:input port="source"/>
>>          </p:store>
>>
>>      </p:for-each>
>>
>> </p:declare-step>
>>
>> Betty
>>
>>
>>
>>
>>
>>
>> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
>> Betty Harvey                         | Phone: 410-787-9200 FAX: 9830
>> Electronic Commerce Connection, Inc. |
>>                     | Washington,DC XML Users Grp
>> URL:  http://www.eccnet.com          | http://www.eccnet.com/xmlug/
>> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/
>> Member of XML Guild (www.xmlguild.org)
>> _______________________________________________
>> oXygen-user mailing list
>> 
>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>


/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Betty Harvey                         | Phone: 410-787-9200 FAX: 9830
Electronic Commerce Connection, Inc. |
                    | Washington,DC XML Users Grp
URL:  http://www.eccnet.com          | http://www.eccnet.com/xmlug/
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/
Member of XML Guild (www.xmlguild.org)



More information about the oXygen-user mailing list