Click or drag to resize

ItemapplyStylesheet Method

Performs XSL transformation of the item's DOM and returns the result of the transformation. IMPORTANT: Be very carefull when using slylesheets from untrusted urls, there's a possibility to use scripts in the stylesheets with the code that can cause damage. Make sure that the stylesheet doesn't contain intrader's script code before using.

Namespace:  Aras.IOM
Assembly:  IOM (in IOM.dll) Version: 14.0.20.39432
Syntax
public string applyStylesheet(
	string xslStylesheet,
	string type
)

Parameters

xslStylesheet
Type: SystemString
If type='text' then it's XML text for the stylesheet; if type='url' then it's URL of a stylesheet file.
type
Type: SystemString
The type argument is either 'text' or a 'url' (case insensitive).

Return Value

Type: String
String that represents XML of the item's DOM after XSL transformation.
Exceptions
ExceptionCondition
XmlExceptionFailed to load the xsl.
XsltCompileExceptionSpecified xsl does not conform to a valid stylesheet.
Remarks
  • If type='url' the xslStylesheet argument is interpreted as file URL. It means that user can pass to the method URLs like: "http://localhost/mystylesheets/stylesheet1.xslt" or "file:///c:/tmp/stylesheet2.xslt"; or absolute or relative path to the file, e.g. "c:/tmp/stylesheet2.xslt" or "../../stylesheet3.xslt".
  • The item itself is not modified by the method.
See Also