I don't think you can point Content Pump's -transform_module directly at an XSLT. I think it expects an xQuery module (cf. https://docs.marklogic.com/guide/ingestion/content-pump#id_82518).
You should be able to set up such a custom transform xQuery module and call your XSLT transform from in there via an xdmp:xslt-invoke() on the $content map that Content Pump passes in (cf. http://docs.marklogic.com/xdmp:xslt-invoke). You would then set -transform_module to point to that custom transfer xQuery module rather than directly calling the XSL transform. Note that if you use -input_file_type aggregates, as in your example, your custom transform will be applied to each fragment as defined per $splittag. So the incoming $content map will be the fragment you're splitting (and transforming) on. Markus On Sun, Sep 27, 2015 at 3:40 PM, Tahiliani, Vishal <[email protected] > wrote: > I am using MarkLogic Content Pump to ingest XML documents. I would like to > transform these xml documents in the mlcp ingestion process using > “-tranform module and -transform namespace” option. I have already created > the XSLT for the transformation and also loaded it into ML “modules" > database. But mlcp is not accepting xslt file and throwing error: > > COMMAND: > mlcp.sh import \ > -username $username -password $passwd \ > -host $host -port $port \ > -input_file_path $inpath \ > -input_compressed true \ > -input_file_type aggregates \ > -aggregate_record_element $splittag \ > -aggregate_uri_id $uriid \ > -aggregate_record_namespace "http://www.fda.gov/cdrh/gudid" \ > -output_collections $collection \ > -output_permissions my-app-role,read,my-app-role,update \ > -output_uri_suffix .xml \ > -transform_module > /marklogic.rest.transform/xml-transform-xsl/assets/transform.xsl \ > -transform_namespace " > http://marklogic.com/rest-api/transform/xml-transform-xsl" \ > -transform_function transform > > > Below error is thrown > ERROR: > 15/09/27 15:34:19 WARN mapreduce.ContentWriter: XDMP-MODNOTTEXT: Module > /marklogic.rest.transform/fda-transform-xsl/assets/transform.xsl is not a > text document > > > I would like to know whether xslt transformation is accepted by mlcp? If > not then what is the alternative.? > > > Thanks > Vishal > > > _______________________________________________ > General mailing list > [email protected] > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general > -- Markus Flatscher Consultant | Avalon Consulting, LLC [email protected] LinkedIn: http://www.linkedin.com/company/avalon-consulting-llc Google+: http://www.google.com/+AvalonConsultingLLC Twitter: https://twitter.com/avalonconsult
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
