Retrieve XML from document, style and save to file

Retrieves an XML document formatted by an XSL process. This process can create a wide variety of results, from HTML, simple text, RTF, MS Word Document XML, and a wide variety of other outputs. This API call can be used to create CSV files or other reports on a document.

Example API call

/lcapi?target=interface&action=styles_interface&document_id=S1000DBIKE-AAA-D00-00-00-00AA-042A-A&style_name=text.xsl&output_name=out.txt&collection=1&book=1

Parameters

ParameterDescription
targetinterface
actionstyles_interface
document_idThe DOCID attribute on the <DOCUMENT/> envelope tag that wraps all documents in LiveContent, such as "5".
style_nameThe relative path to the XSL style that should be executed against the document. The path is relative to the styles directory for the current DTD or schema (etc/styles/s1000d for example) that is being used by the publication
output_nameThe file name that should be given to the result that was generated by the XSL process. This temporary name will be used on the server to save the resource.
collection The id of the collection, an integer, such as 1.
bookThe id of the publication, an integer, such as 1.

Returns

On success

The API call returns a file resource that is named after the output_name parameter. In a traditional web browser environment, the web browser will handle the mime-type of the resource and start the appropriate process or program.

<?xml version="1.0" encoding="ISO-8859-1"?>
<results>
  <status>success</status>
  <message/>
  <url>http://localhost:2245/lcapi/working/temp/out.txt</url>
</results>