XProc integration API - representing input/output data

Hello, I have two questions about dealing with inputs/outputs in the XProc integration API: 1. The APIs are URL-based. Does that mean that the results of running the pipeline must always be saved somewhere (for instance, as temporary documents in /tmp) by the implementation of XProcTransformerInterface? 2. I don't understand how sequence outputs are supported in the API. The XProcInputPortInterface interface uses an array for specifying the URLs for a given input port. Similar to input ports that can take sequences of documents, output ports can also produce sequences - but the XProcOutputPortInterface contains only the getUrl() method. Do I understand it correctly that after the pipeline has finished, the XProc integration code is supposed to store the result data for the output ports to the URL provided by the corresponding getUrl() methods? If so, how does this work with sequences? And what is the method showInSequenceView() meant for? Regards, Vojtech -- Vojtech Toman Principal Software Engineer EMC Corporation toman_vojtech@emc.com http://developer.emc.com/xmltech

Hi Vojtech, 1. No, if you use the resolver provided those URIs will be resolved to the content of the editor. 2. For Calabash we append all the documents in the provided location. Note that the number of documents in a sequence is not constant in general and the user cannot provide a binding for each document in the sequence. A possible solution is to use a pattern to output each document in the sequence - for example you can use for Calumet the output binding as the base name and add a counter to each document in the sequence. oXygen presents the content of the ouput ports that have the "Show in transformation results view" option set in the XProc transformation scenario. Those are the ports that the transform method should return results. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Toman_Vojtech@emc.com wrote:
Hello,
I have two questions about dealing with inputs/outputs in the XProc integration API:
1. The APIs are URL-based. Does that mean that the results of running the pipeline must always be saved somewhere (for instance, as temporary documents in /tmp) by the implementation of XProcTransformerInterface?
2. I don't understand how sequence outputs are supported in the API. The XProcInputPortInterface interface uses an array for specifying the URLs for a given input port. Similar to input ports that can take sequences of documents, output ports can also produce sequences - but the XProcOutputPortInterface contains only the getUrl() method. Do I understand it correctly that after the pipeline has finished, the XProc integration code is supposed to store the result data for the output ports to the URL provided by the corresponding getUrl() methods? If so, how does this work with sequences? And what is the method showInSequenceView() meant for?
Regards, Vojtech
-- Vojtech Toman Principal Software Engineer EMC Corporation toman_vojtech@emc.com http://developer.emc.com/xmltech _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

1. No, if you use the resolver provided those URIs will be resolved to the content of the editor.
OK, I see.
2. For Calabash we append all the documents in the provided location. Note that the number of documents in a sequence is not constant in general and the user cannot provide a binding for each document in the sequence. A possible solution is to use a pattern to output each document in the sequence - for example you can use for Calumet the output binding as the base name and add a counter to each document in the sequence.
oXygen presents the content of the ouput ports that have the "Show in transformation results view" option set in the XProc transformation scenario. Those are the ports that the transform method should return results.
I am still not sure I understand completely. So, the XProcOutputPortInterface just tells the integration code which output ports to use when populating the result Map in the transform() method? Regards, Vojtech -- Vojtech Toman Principal Software Engineer EMC Corporation toman_vojtech@emc.com http://developer.emc.com/xmltech

Hi Vojtech, The array of XProcOutputPortInterface contain the information set in the XProc scenario. On transform() the XProc engine will perform the transformation. If a port has the showInSequenceView() return false then its data should not be in the result of the transform method - that means the user decided that he does not want to see the result on that port in the oXygen results - it may be enough for example to have the document on that port saved in a file. So, the array of XProcOutputPortInterface tells the processor what output bindings where made in the XProc scenario and also what ports should be returned. Note that if a port is not present in the array of XProcOutputPortInterface then its result should be returned. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Toman_Vojtech@emc.com wrote:
1. No, if you use the resolver provided those URIs will be resolved to the content of the editor.
OK, I see.
2. For Calabash we append all the documents in the provided location. Note that the number of documents in a sequence is not constant in general and the user cannot provide a binding for each document in the sequence. A possible solution is to use a pattern to output each document in the sequence - for example you can use for Calumet the output binding as the base name and add a counter to each document in the sequence.
oXygen presents the content of the ouput ports that have the "Show in transformation results view" option set in the XProc transformation scenario. Those are the ports that the transform method should return results.
I am still not sure I understand completely. So, the XProcOutputPortInterface just tells the integration code which output ports to use when populating the result Map in the transform() method?
Regards, Vojtech
-- Vojtech Toman Principal Software Engineer EMC Corporation toman_vojtech@emc.com http://developer.emc.com/xmltech _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

On transform() the XProc engine will perform the transformation. If a port has the showInSequenceView() return false then its data should not be in the result of the transform method - that means the user decided that he does not want to see the result on that port in the oXygen results - it may be enough for example to have the document on that port saved in a file.
So, the array of XProcOutputPortInterface tells the processor what output bindings where made in the XProc scenario and also what ports should be returned. Note that if a port is not present in the array of XProcOutputPortInterface then its result should be returned.
I see, thanks for clarifying. Regards, Vojtech
participants (2)
-
George Cristian Bina
-
Toman_Vojtech@emc.com