I'm not sure what's going on with InfoStudio, but you ought to be able to do 
that with http://marklogic.github.io/recordloader/ and a content module. The 
documentation for CONTENT_FACTORY_CLASSNAME explains how that interface works, 
and provides sample code that you could modify.

Or you could write a simple HTTP endpoint and POST your file to it. That could 
be a REST extension, or not.

-- Mike

On 17 Jun 2014, at 04:59 , Ed Outhwaite <[email protected]> wrote:

> Hi,
> 
> I'm loading some text files that have fixed length fields via Information 
> Studio in MarkLogic 7.
> 
> It uses an XQuery transform that should split the records via calls to 
> fn:substring and generate a document for each row via xdmp:document-insert, 
> however the only documents that are being inserted are the original text 
> files.
> 
> Running a slightly different version of the XQuery script - replacing:
> 
>        let $doc := fn:doc( $cpf:document-uri )
>        for $inline in fn:tokenize( $doc , "\n")
> 
> with:
> 
>        for $inline in fn:tokenize( doc("/BS1.txt") , "\n")
> 
> splits the loaded file and inserts the rows as documents correctly.
> 
> Am I somehow falling over the "action modules should only modify the document 
> being processed" guideline ?
> 
> ...and is there a better way to handle this type of data source ?
> 
> Thanks,
> Ed
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to