XML files imported into Assets are fully text-indexed. By default, the server will generate a color-coded xml-source preview that will be displayed in Assets.
Known formats
For some well-known formats like NewsML, the server already includes a preview XSLT that creates more readable HTML previews for those XML files.
Custom XML previews
If you have specific XML formats that you use often, you can add your own custom XSL transformations by placing them in the following folder:
/xml_previews
By placing XSL files in this folder you can customize the way XML files are previewed in Assets. The XSL file must generate a valid XHTML file that will be displayed in Assets when the XML file is previewed.
The custom XSL file is located using the name of the root element in the XML file. So an XML file with the following structure:
<?xml version="1.0" encoding="UTF-8"?>
<article>
...
</article>
Will be previewed using the XSL file:
xml_previews/article.xsl
If no custom XSL with the name of the root element is found, a default XSL is used that provides a simple indented and color coded "source" view of the XML file.
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.