Weird error with p:http-request (XProc)

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Zearin
Posts: 107
Joined: Mon Jul 30, 2007 11:31 pm
Location: College Park, MD, United States

Weird error with p:http-request (XProc)

Post by Zearin » Mon Nov 29, 2010 7:22 pm

Aside: This is for a school project and I thought I was doing reasonably well, but now I'm really against the wall, and trying not to freak out. :)

I had a pipeline that was working which used the p:http-request step.

Yesterday I ran this pipeline again and got a very strange error. I have absolutely no idea what it means.
SystemID: /Users/amrogers/Developer/Projects/oXygen_workspace/edu.umd/terpconnect/model/documents/201008/INFM298I/Final Project/xproc.xpl
Engine name: Calabash XProc
Severity: error
Description: net.sf.saxon.s9api.SaxonApiException: org.apache.commons.httpclient.HttpException: 404 Not Found for: http://www.w3.org/TR/xhtml11/DTD/xhtml-datatypes-1.mod 404 Not Found for: http://www.w3.org/TR/xhtml11/DTD/xhtml-datatypes-1.mod
My pipeline is 1 main file + 1 library file. Here is the main file:

Code: Select all

<?xml version='1.0' encoding='UTF-8’?>
<p:pipeline
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
xmlns:cx="http://xmlcalabash.com/ns/extensions"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:local="#empty"
version="1.0">


<p:serialization
port="result"
encoding="UTF-8"
indent="true"
method="xml"
omit-xml-declaration="false"
/>


<p:import href="library.xpl" />


<!--
Get results of forum HTTP requests
-->
<local:get-each-url name="get-forums-data">
<p:input port="source">
<p:inline>
<links xml:base="http://us.battle.net/sc2/en/forum/">
<link href="40568/" title="general" />
<!--<link href="13432/" title="wol-campaign" />
<link href="13433/" title="terran" />
<link href="13434/" title="protoss" />
<link href="13435/" title="zerg" />
<link href="13436/" title="multiplayer-and-esports" />
<link href="13437/" title="custom-maps" />-->
</links>
</p:inline>
</p:input>
</local:get-each-url>

<p:identity>
<p:input port="source">
<p:pipe step="get-forums-data" port="result" />
</p:input>
</p:identity>
</p:pipeline>
And here is my library:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<p:library
xmlns:c="http://www.w3.org/ns/xproc-step"
xmlns:cx="http://xmlcalabash.com/ns/extensions"
xmlns:local="#empty"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:p="http://www.w3.org/ns/xproc"
version="1.0">


<!--<p:import href="http://xmlcalabash.com/extension/steps/library-1.0.xpl" />-->
<p:import href="/Users/amrogers/Developer/lib/org.exproc/library-1.0.xpl" />


<!--
get-each-url
-->
<p:declare-step type="local:get-each-url">
<p:input port="source" primary="true" kind="document"/>
<p:output port="result" primary="true" />

<p:make-absolute-uris match="//@href">
<p:with-option name="base-uri" select="/links/@xml:base" />
</p:make-absolute-uris>

<p:for-each>
<p:iteration-source select="//link" />

<p:rename
match="//link"
new-name="c:request"
/>

<!-- Build up the c:request -->
<p:group>
<p:insert match="c:request" position="first-child">
<p:input port="insertion">
<p:inline>
<c:header name="Cookie" value="forumView=advanced"/>
</p:inline>
</p:input>
</p:insert>
<p:insert match="c:request" position="first-child">
<p:input port="insertion">
<p:inline>
<c:header>
<p:with-option
name="Date"
select="format-dateTime(
dateTime(),
'[FNn,*-3], [D01] [Mn,*-3] [Y] [H01]:[m01]:[s01] [z]' ,
'en'
)"
/>
</c:header>
</p:inline>
</p:input>
</p:insert>

<p:add-attribute match="c:request" attribute-name="method" attribute-value="GET"/>
<p:add-attribute match="c:request" attribute-name="detailed" attribute-value="true"/>
<p:namespace-rename apply-to="all" from="#empty" to=""/>
<p:delete match="//@title"/>
</p:group>

<!-- FIXME: Why doesn’t this work??? -->
<!-- Print request for debugging -->
<!--<cx:message>
<p:with-option name="message" select="/*" />
</cx:message>-->


<p:http-request/>
</p:for-each>

<p:wrap-sequence wrapper="c:results”/>
</p:declare-step>
</p:library>
-- Zearin

adrian
Posts: 2659
Joined: Tue May 17, 2005 4:01 pm

Re: Weird error with p:http-request (XProc)

Post by adrian » Tue Nov 30, 2010 2:02 pm

Hi,

I see you've got your answer on the xproc-dev discussion list.
I hope you don't mind if I post a link here to that discussion.

For future reference, if anyone else stumbles upon this, the discussion can be found here:
http://lists.w3.org/Archives/Public/xpr ... /0094.html

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Post Reply