Re: No-XML inputs

On Fri, 2014-08-22 at 17:08 -0400, Wendell Piez wrote:
> Hi,
> 
> So somewhere between xmlcalabash-1.0.3-94 and 1.0.18-95, my XProcs
> stopped working. I now get an error about a p:document failing to
> load. From the command line, the system even hangs. On breaking it I
> can see in the tb:
> 
> SEVERE: It is a dynamic error if the resource referenced by a
> p:document element does not exist, cannot be accessed, or is not a
> well-formed XML document.
> 
> Admittedly these are very rude creatures, these XProcs. They call in
> non-XML input by accepting a runtime option (a string) they can hand
> to Saxon, which is then invited to use unparsed-text() to read them.
> 
> The XProc itself never sees anything but XML - the front end of its
> input stream is given as a literal in the XProc:
> 
> <p:input port="source">
>   <p:inline><document><!-- dummy document</document</p:inline>
> </p:input>
> <p:with-param name="file" select="$fileOption"/>
> 

I find it works with well-formed XML in p:inline.

<p:input port="source">
  <p:inline><document><!-- dummy document--></document></p:inline>
</p:input>

Regards,
--Paul

> Then Saxon does unparsed-text($file) to get at the data.
> 
> It's still working in oXygen, btw -- even though it has 1.0.18-95.
> Whatever is in the way preventing Saxon from getting the file in
> Calabash (and then parsing it), isn't intruding in oXygen.
> 
> So I am wondering what is wrong and how to fix it. (In the meantime I
> am not throwing away my old Calabash. Being able to parse and wf-check
> LMNL syntax from the cl is too important to me to lose.)
> 
> In general, what is the recommended practice currently when the
> primary input is not XML? I think I was playing hooky the day that was
> discussed.
> 

One way is to use p:data
(http://www.w3.org/TR/2010/REC-xproc-20100511/#p.data).

Calabash 1.0.18 had a known problem reading plain text input with
p:data, but that has been fixed in 1.0.19-b1
(https://github.com/ndw/xmlcalabash1/issues/154). However, just now I
encountered a different problem trying to use p:data/p:with-option.

Regards,
--Paul


> Thanks for your thoughts --
> Wendell
> 
> 

Received on Sunday, 24 August 2014 19:34:13 UTC