RE: Getting Dynamically generated error message within output file in p:catch

Hi Alex,

I must admit I am not entirely sure what exactly you want to do, but if
you want to access the error message in p:catch, you can refer to the
implicit "error" input port in p:catch. The port contains an XML
document that represents the error: the error code and optionally other
information such as detail message, line number etc.

<p:catch name="error">
  ...
  <p:identity>
    <p:pipe step="catch" port="error"/>
  </p:identity>
  ...
</p:catch>

Regards,
Vojtech

> -----Original Message-----
> From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On
Behalf Of
> Alex Muir
> Sent: Friday, January 01, 2010 7:50 PM
> To: XProc Dev
> Subject: Getting Dynamically generated error message within output
file in p:catch
> 
> Hi,
> 
> I have a series of XSLT transformation steps within a try catch
> statement. The process fails at one of the transformations and I want
> to output within the catch, a file with it's name and a message
> containing the error that was generated however after reading the
> xproc specs and searching the dev list I don't see a dynamic error
> message handling example so was hoping someone could help me out.
> 
> Currently I'm outputting into my xml output file within the catch:
> 
> <c:file xmlns:c="http://www.w3.org/ns/xproc-step"
> name="8x8IncDe_CIK0001023731.html"/>
> 
> 
>     <p:try>
>       <p:group>
> 
> ... XSLT transformations.
> 
>    </p:group>
> 
>   <p:catch>
>         <p:group name="output">
> 
>           <p:documentation> Store XML file Output </p:documentation>
>           <p:identity name="out_file"/>
>           <p:store name="store">
>             <p:with-option name="href"
> select="concat($exception-folder, $fileName, '.xml')">
>               <p:pipe step="out_file" port="result"/>
>             </p:with-option>
>           </p:store>
> 
> 
>           <p:documentation> Create result XML </p:documentation>
>           <p:identity>
>             <p:input port="source">
>               <p:pipe step="store" port="result"/>
>             </p:input>
>           </p:identity>
> 
>         </p:group>
>       </p:catch>
>     </p:try>
> 
> --
> 
> Regards and happy New Year
> 
> Alex
> https://sites.google.com/a/utg.edu.gm/alex
> 

Received on Monday, 4 January 2010 07:28:28 UTC