InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IXSLServices Class Referenceabstract

#include <IXSLServices.h>

Inheritance diagram for IXSLServices:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IXSLSERVICES }
 
typedef std::vector< std::pair
< PMString, PMString > > 
Params
 

Public Member Functions

virtual bool16 Transform (IIDXMLDOMDocument *srcDOM, IPMStream *srcXSLT, const Params &params, IIDXMLDOMDocument *resultDOM)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Class responsible for XSL Transformation.

Member Function Documentation

virtual bool16 IXSLServices::Transform (IIDXMLDOMDocumentsrcDOM,
IPMStreamsrcXSLT,
const Params & params,
IIDXMLDOMDocumentresultDOM 
)
pure virtual

Transform from a DOM source to a DOM result using an XSL stream. The result is a new DOM document.

Apply the stylesheet provided as an XSL stream to the input DOM document and write the transformation result to the provided DOM document, document fragment, or element.

This signature of transform is useful for transforming a single DOM source tree into another DOM tree, when the stylesheet is most conveniently input as a stream.

XSL Output Error Since the output to the resultDOM must be well-formed XML, any xsl stylesheet that only outputs text nodes to a resultDOM that does not already contain a root element will cause an error.

Parameters
srcDOMDOM document to transform. Must not be nil.
srcXSLTXSL stylesheet stream to use in the transformation. Must not be nil.
resultDOMAn output parameter that will contain the result of the transformation. This can be the same as the srcDOM. Must not be nil.
Returns
Returns 'kTrue' if the transformation successfully completed, otherwise 'kFalse' and 'resultDOM' is left unchanged.