Documentation Center

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 XHTML, 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

/servlets3/wietmsd?id=1508954655547&date=135132123123&target=interface&action=styles_interface&document_id=S1000DBIKE-AAA-D00-00-00-00-AA-041-A-A&style_name=text.xsl&output_name=out.txt&collection=DEFAULT&book=s1000d_bike_40

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.
idA session ID that is valid for this collection and publication combination.
collectionThe name of the collection that the publication is registered in, such as default.
book The name of the publication, such as s1000d_bike_41.
dateTo prevent browser-side caching of data, especially with AJAX requests, it is important to make a URL unique. The most effective technique to accomplish this is to include a time parameter that is based on the time at which the call is made.

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/servlets3/wietmsd/working/temp/out.txt</url>
</results>