xsltApplyStylesheet

SYNOPSIS

xmlDoc xsltApplyStylesheet(xmlDoc doc, xsltStylesheet style
        [, string[] names, string[] values] )

Parameters:

  • doc - the XML document to you want to transform

  • style - the XSL stylesheet that will be used to transform the doc

  • names (optional) - an array of parameter names to pass in to the transformation

  • values (optional) - an array of parameter values that correspond to the names

Returns:

  • The output of the transformation as an xmlDoc


DESCRIPTION
xsltApplyStylesheet applies the stylesheet style to the XML document doc. The result is returned as an xmlDoc object, which can be printed or saved like any other XML document. Any number of name/value pairs of parameters may be passed in to the stylesheet, which it uses as needed. if names and values are arrays, they must have the same number items.

See the xmlTree10_XSL sample script for examples of using the XSL engine and using parameters.


EXAMPLE

<$result = (xsltApplyStylesheet($doc, $style))>
<$names = "lang">
<$values = "'EN'">
<$resultParam = (xsltApplyStylesheet($doc, $style,
          $name, $value))>


SEE ALSO
xsltParseStylesheetDoc, xsltParseStylesheetFile, xsltParseStylesheetString


Copyright © Thunderstone Software     Last updated: Oct 24 2023
Copyright © 2024 Thunderstone Software LLC. All rights reserved.