I try to made my js script using the model in the flow directory and
your exemple.
I've got this (I haven't test it yet) :
var XMLFlow2XMLFile = {};
XMLFlow2XMLFile.saveXMLfile = function (pipeline, bizdata,
destination_path) {
var result = OBL_XML.processPipeline(pipeline, bizdata);
var document = OBL_XML.loadFromString(result);
var parts = document.getNodeList(document,"/fd:form/class/");
for(var i = 0; i < parts.length; i++)
{
// serialize your xml node and write it where you want
}
}
But some questions :
- The pipeline might be the cocoon pipeline which will give me the XML
flow to serialize
- But what is the bizadata parameter for the processPipeline function?
(I already bizdata but it was an association array (parameter name /
value).
Thanks
Eric
Jean-Christophe Kermagoret a écrit :
Eric,
The best way to achieve your goal is to write a cocoon flowscript that
will get your result xml, parses it and writes as many results you
want.
Look at the blocks/core/common/resources/flow/OBL_XML.js to find xml
helpers.
You should finally have sth like this :
var result = OBL_XML.processPipeline();
var document = OBL_XML.loadFromString();
var parts = document.getNodeList(document,"/xpath/to/your/parts");
for(var i = 0; i < parts.length; i++) {
// serialize your xml node and write it where you want
}
Jean-Christophe
Eric Cambray wrote:
Hello,
I would like to dynamicaly create the file use to describe the form in
openbluelab. I will need to create 1 and more file from a single XML
transformation, so how I have to proceed? Some xsl function? Cocoon
capability? Flowscript?
Thanks
Eric
_______________________________________________
Dev mailing list
Dev-kLhUZmsHnZGtty4zx9zaK0B+6BGkLq7r@xxxxxxxxxxxxxxxx
http://mlm.triglyphe.com/mailman/listinfo/dev
|
_______________________________________________
Dev mailing list
Dev-kLhUZmsHnZGtty4zx9zaK0B+6BGkLq7r@xxxxxxxxxxxxxxxx
http://mlm.triglyphe.com/mailman/listinfo/dev
|