The majority of the time content is stored in a format that isn't suitable for rendering. Content transformers allow the results from the string query service, key/value service, structured queries or the data store to be transformed into a different format (eg: HTML) before being returned.
Transformers can be written using either XSLT or XQuery. XSLT transformers will be passed the content as the context node and XQuery based transformers can access the content via a
$content external variable. Neither XSLT or XQuery transformers can perform any updates to the database. Doing so will raise an error.
Stores a transform to the given name. This name is then used in various services via the
applyTransform paramater. If a transformer already exists with this name, it's overwritten with the new transformer.
To get a list of all the transformers that are configured, make a GET request to:
Returns the transformer that is stored under the given name.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> … </body> </html> </xsl:template> </xsl:stylesheet>
Removes the transformer.
When it comes to errors in the XSLT, is it checked for well-formedness or validity as XSLT? Checks that it's well-formed and in the XSLT namespace. If not, you get a 400 error.
If there's an XSLT parse error will it be described in the 400 response body? Hope so. Should verify.
Is the transformer name limited to alphanumeric without a leading decimal? Nope, can be anything that doesn't contain a forward slash. Probably we should apply the same rules as for other names.
Should include sample XSLT and XQuery transformers.