Domanda

I'm currently working to build an app on top of a MarkLogic database of XML documents. These are news articles in NEWSML-G2 format. I'm using a REST API that I created in the Information Studio to access the database. Using the /search API call, I can retrieve a set of documents matching with the keyword. I would like to apply an XSLT and display these as a list, with the title of each article being shown. I've looked through the MarkLogic documentation and elsewhere, but could not find relevant material. Any help is greatly appreciated. Thanks!

È stato utile?

Soluzione

Krishna:

If you're using MarkLogic 7, you can do the following:

First, Create query options that extract the title of each document:

http://docs.marklogic.com/guide/rest-dev/appendixb#id_94425

http://docs.marklogic.com/REST/PUT/v1/config/query/%5B%27default%27-or-name%5D

Then, install your XSLT transform on the REST server:

http://docs.marklogic.com/REST/PUT/v1/config/transforms/%5Bname%5D

Finally, specify your query options and your XSLT transform to modify the search response:

http://docs.marklogic.com/REST/GET/v1/search

Hoping that helps,

Erik Hennum

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top