info on DPML batch processing

Poster Content
nk4um User
Posts: 42
August 6, 2009 14:17Feedback
Tony,

I''ll try to give feedback when more documentation becomes available.

Paul

nk4um Moderator
Posts: 485
August 6, 2009 14:15
Hi Paul,

now I know what you are talking about ;-)

The documentation for DPML 2.0 on NK4 is still in a state of ongoing development. We plan to have much more detail and examples than there is at the moment.

That said there is currently no equivalent to the while tag in DPML 1.0 that enables this iteration. That isn''t because it''s hard to emulate but that approach always seemed a bit awkward. We are looking at a better approach using some kind of forEach functionality. If you have any thoughts your input would be appreciated.

Cheers,
Tony
nk4um User
Posts: 42
August 6, 2009 11:59
Hi Tony,

Sorry should have been posted in NK4 Preview forum

This is the NK3 doc

==================================================================

   Below is a dpml batch process. It contains detailed comments which will allow you to adapt it to your needs. Here we''ll summarize the 3 stages and suggest ways that this pattern can be modified.

Prepare resource list
Any batch process requires a list of resources to process. In the example we use the fls accessor to provide a document which lists the system.xml files below a root directory. You can change the root and filter to suit your system. Alternatively you could supply a hand crafted source document with the URI''s of the files you want to process as elements. Note since NetKernel provides a URI resolver infrastructure you can source resources from anywhere not just the local filesystem so, for example, you could use this pattern as the basis for a web-bot...

Iterate over resource list
The example process iterates over the resource list generated by fls. Each URI element in the source document is used as the target resource in the inner batch process. In our example we perform an xquery operation to count the elements. We''ve used an XML process by way of example, you could do anything at all here, your resource could even be non-XML. A useful example is to use the XHTMLTidy to batch convert html files to valid XHTML files.   


Hope this helps.
nk4um Moderator
Posts: 485
August 6, 2009 11:45Resource List?
Hi Paul,

I''m a little unsure what you mean by "resource list". Can you give me a bit more detail and I''ll try and help.

Cheers,
Tony
nk4um User
Posts: 42
August 6, 2009 10:12info on DPML batch processing
I didn''t succeed yet finding any info on how to prepare a resource list and how to iterate over it.

Any pointers?