Library Specifications
Image and Attachment (link) libraries are exposed as XML documents that XStandard reads from the CMS. Implementation of these libraries is provided below:
For testing, you may use the following URLs:
Should you need to build your own implementation, below you will find the technical specifications.
Request
XStandard makes calls to the library via HTTP GET. The library can be a server-side script or a static XML document. With each request, XStandard sends the relative path to sub-folders in the query string which can be read from PHP like this: $_GET['x-cms-library-path'].
Response
The library response is an XML document as show in the screen shot below.
<?xml version="1.0" encoding="ISO-8859-1"?><library><containers><container><objectName>folder1</objectName><path>path1/path2</path><label>Folder 1</label><baseURL>http://localhost/path1/path2/folder1/</baseURL><empty>false</empty><icon>folder</icon><metadata /><options>0</options></container></containers><objects><object><objectName>image1.gif</objectName><path>path1/path2</path><label>Image 1</label><icon>image</icon><metadata /><options>0</options><attrs><attr><name>src</name><value>http://localhost/path1/path2/image1.gif</value></attr><attr><name>width</name><value>100</value></attr><attr><name>height</name><value>200</value></attr></attrs><props><prop><name>decorative</name><value>false</value></prop><prop><name>size</name><value>2099</value></prop><prop><name>date</name><value>2005-05-15 10:15:01</value></prop></props></object></objects></library>
Download library.xml
Library Response XML Description| Element | Description |
|---|
| containers / container / objectName | Folder name. |
| containers / container / path | Path to parent folder in the library. |
| containers / container / label | Friendly name. |
| containers / container / baseURL | URL to this folder. |
| containers / container / empty | Flag indicating if the container is empty. Possible values are true and false. This value is not currently used. |
| containers / container / icon | ID of an icon defined in XStandard's icons.xml file. |
| containers / container / metadata | Reserved for future use. |
| containers / container / options | Reserved for future use. Set value to 0 in the meantime. |
| objects / object / objectName | File name. |
| objects / object / path | Path to parent folder in the library. |
| objects / object / label | Friendly name. |
| objects / object / icon | ID of an icon defined in XStandard's icons.xml file. |
| objects / object / metadata | Reserved for future use. |
| objects / object / options | Reserved for future use. Set value to 0 in the meantime. |
| objects / object / attrs | A collection of attributes for this object. XStandard will create markup from these attributes. |
| objects / object / attrs / attr / name | Attribute name. This value must conform to the naming conventions of XML attributes. |
| objects / object / attrs / attr / value | Attribute value. |
| objects / object / props | A collection of properties for this object. XStandard will use this metadata to provide additional information about the object. |
| objects / object / props / prop / name | Property name. Possible values are: size, date, newWindow, decorative |
| objects / object / props / prop / value | Property value. |