Functions
XML Transform

Functions

int mdlXSL_create (XslStylesheetRef *pStylesheetRef)
 Creates an XML Transform. More...
 
int mdlXSL_createWithDOM (XslStylesheetRef *pStylesheetRef, XmlDomRef *sourceDomRef, XmlDomRef *styleDomRef)
 Creates an XML Transform. More...
 
int mdlXSL_createWithFiles (XslStylesheetRef *pStylesheetRef, WChar const *pSourceFilename, WChar const *pStylesheetFilename)
 Creates an XML Transform. More...
 
int mdlXSL_free (XslStylesheetRef stylesheetRef)
 Frees an XML Transform. More...
 
int mdlXSL_getSourceDom (XmlDomRef *pSourceDomRef, XslStylesheetRef stylesheetRef)
 Returns the source DOM for the given XML Transform Class. More...
 
int mdlXSL_setSourceDom (XslStylesheetRef stylesheetRef, XmlDomRef sourceDomRef)
 Sets the Source XML Dom for the given XML Transform Class. More...
 
int mdlXSL_setSourceFilename (XslStylesheetRef stylesheetRef, WChar const *sourceFilenameP)
 Sets the source filename for the given XML Transform Class. More...
 
int mdlXSL_getSourceFilename (WChar *sourceFilenameP, long maxFilenameLength, XslStylesheetRef stylesheetRef)
 Gets the source filename for the given XML Transform Class. More...
 
int mdlXSL_getStylesheetDom (XmlDomRef *pStylesheetDomRef, XslStylesheetRef stylesheetRef)
 Returns the stylesheet DOM for the given XML Transform Class. More...
 
int mdlXSL_setStylesheetDom (XslStylesheetRef stylesheetRef, XmlDomRef stylesheetDomRef)
 Sets the Stylesheet XML Dom for the given XML Transform Class. More...
 
int mdlXSL_setStylesheetFilename (XslStylesheetRef stylesheetRef, WChar const *stylesheetFilenameP)
 Sets the stylesheet filename for the given XML Transform Class Returns the stylesheet DOM for the given XML Transform Class. More...
 
int mdlXSL_getStylesheetFilename (WChar *stylesheetFilenameP, long maxFilenameLength, XslStylesheetRef stylesheetRef)
 Gets the stylesheet filename for the given XML Transform Class. More...
 
int mdlXSL_getOutputMethodType (XslStylesheetRef stylesheetRef)
 Gets the output method for the given XML Transform Class. More...
 
int mdlXSL_setOutputMethodType (XslStylesheetRef stylesheetRef, int outputMethodType)
 Sets the output method for the given XML Transform Class. More...
 
int mdlXSL_addParameter (XslStylesheetRef stylesheetRef, WChar const *pParameterName, WChar const *pParameterValue)
 Adds a parameter and its value to given XML Transform Class. More...
 
int mdlXSL_resetTransform (XslStylesheetRef stylesheetRef)
 Resets a XSLT Transform for the given XML Transform Class. More...
 
int mdlXSL_transformToDom (XmlDomRef *pOutDomRef, XslStylesheetRef styleSheetRef)
 Transforms the given XML Transform Class and returns the results as an XML DOM. More...
 
int mdlXSL_transformToTextFile (XslStylesheetRef styleSheetRef, WChar const *pFileSpec, bool bOverwrite)
 Transforms the given XML Transform Class and saves the results to the give file. More...
 
int mdlXSL_transformToXmlFile (XslStylesheetRef styleSheetRef, int fileSpecType, WChar const *pFileSpec, WChar const *pStorageSpec, WChar const *pStreamSpec, WChar const *pEncoding, bool bCompress, bool bOverwrite, bool bFormat)
 Transforms the given Style Sheet Class to given file spec. More...
 
int mdlXSL_getTransformString (XslStylesheetRef styleSheetRef, WCharP pOutputString)
 Gets the previously transformed string. More...
 
long mdlXSL_transformToString (XslStylesheetRef styleSheetRef)
 Transforms the given Style Sheet Class to a string. More...
 
int mdlXSL_getTransformError (XslStylesheetRef styleSheetRef)
 Gets the last Transform Error. More...
 

Detailed Description

Function Documentation

int mdlXSL_addParameter ( XslStylesheetRef  stylesheetRef,
WChar const *  pParameterName,
WChar const *  pParameterValue 
)

Adds a parameter and its value to given XML Transform Class.

Parameters
[in]stylesheetRefReference to XML Transform class
[in]pParameterNameName of parameter to set
[in]pParameterValueValue of parameter to set
Returns
SUCCESS or ERROR
int mdlXSL_create ( XslStylesheetRef pStylesheetRef)

Creates an XML Transform.

Parameters
[out]pStylesheetRefNewly Created XML Transform class
Returns
SUCCESS or ERROR
Remarks
pStylesheetRef must be freed by calling mdlXSL_free
See also
mdlXSL_free
int mdlXSL_createWithDOM ( XslStylesheetRef pStylesheetRef,
XmlDomRef sourceDomRef,
XmlDomRef styleDomRef 
)

Creates an XML Transform.

Parameters
[out]pStylesheetRefNewly Created XML Transform class
[in]sourceDomRefReference to source DOM class
[in]styleDomRefReference to style DOM class
Returns
SUCCESS or ERROR
Remarks
pStylesheetRef must be freed by calling mdlXSL_free
See also
mdlXSL_free
int mdlXSL_createWithFiles ( XslStylesheetRef pStylesheetRef,
WChar const *  pSourceFilename,
WChar const *  pStylesheetFilename 
)

Creates an XML Transform.

Parameters
[out]pStylesheetRefNewly Created XML Transform class
[in]pSourceFilenamesource filename
[in]pStylesheetFilenamestylesheet filenmame
Returns
SUCCESS or ERROR
Remarks
pStylesheetRef must be freed by calling mdlXSL_free
See also
mdlXSL_free
int mdlXSL_free ( XslStylesheetRef  stylesheetRef)

Frees an XML Transform.

Parameters
[in]stylesheetRefReference to XML Transform class
Returns
SUCCESS or ERROR
int mdlXSL_getOutputMethodType ( XslStylesheetRef  stylesheetRef)

Gets the output method for the given XML Transform Class.

Parameters
[in]stylesheetRefReference to XML Transform class
Returns
XSLOUTPUT_NOTSPECIFIED, XSLOUTPUT_XML, XSLOUTPUT_HTML, XSLOUTPUT_TEXT
Remarks
This function is currently not in use, it is reserved for future use
int mdlXSL_getSourceDom ( XmlDomRef pSourceDomRef,
XslStylesheetRef  stylesheetRef 
)

Returns the source DOM for the given XML Transform Class.

Parameters
[out]pSourceDomRefReturned Source XML DOM
[in]stylesheetRefReference to XML Transform class
Returns
SUCCESS or ERROR
Remarks
pSourceDomRef must be freed using mdlXMLDom_free
See also
mdlXMLDom_free
int mdlXSL_getSourceFilename ( WChar *  sourceFilenameP,
long  maxFilenameLength,
XslStylesheetRef  stylesheetRef 
)

Gets the source filename for the given XML Transform Class.

Parameters
[in,out]sourceFilenamePReturned source filename
[in]maxFilenameLengthMax length of filename to return
[in]stylesheetRefReference to XML Transform class
Returns
SUCCESS or ERROR
int mdlXSL_getStylesheetDom ( XmlDomRef pStylesheetDomRef,
XslStylesheetRef  stylesheetRef 
)

Returns the stylesheet DOM for the given XML Transform Class.

Parameters
[out]pStylesheetDomRefReturned Source XML DOM
[in]stylesheetRefReference to XML Transform class
Returns
SUCCESS or ERROR
Remarks
pStylesheetDomRef must be freed using mdlXMLDom_free
See also
mdlXMLDom_free
int mdlXSL_getStylesheetFilename ( WChar *  stylesheetFilenameP,
long  maxFilenameLength,
XslStylesheetRef  stylesheetRef 
)

Gets the stylesheet filename for the given XML Transform Class.

Parameters
[out]stylesheetFilenamePReturned stylesheet filename
[in]maxFilenameLengthMax length of filename to return
[in]stylesheetRefReference to XML Transform class
Returns
SUCCESS or ERROR
int mdlXSL_getTransformError ( XslStylesheetRef  styleSheetRef)

Gets the last Transform Error.

Parameters
[in]styleSheetRefReference to XML Style Sheet Class
Returns
SUCCESS or ERROR
See also
mdlXSL_transformToXmlFile
mdlXSL_transformToTextFile
mdlXSL_transformToDom
mdlXSL_transformToString
int mdlXSL_getTransformString ( XslStylesheetRef  styleSheetRef,
WCharP  pOutputString 
)

Gets the previously transformed string.

Parameters
[in]styleSheetRefReference to XML Tranform Class
[in,out]pOutputStringBuffer to get the previously transformed string
Returns
SUCCESS or ERROR
Remarks
pOutputString must be adequately sized, get size from mdlXSL_transformToString
See also
mdlXSL_transformToString
int mdlXSL_resetTransform ( XslStylesheetRef  stylesheetRef)

Resets a XSLT Transform for the given XML Transform Class.

Parameters
[in]stylesheetRefReference to XML Transform class
Returns
SUCCESS or ERROR
int mdlXSL_setOutputMethodType ( XslStylesheetRef  stylesheetRef,
int  outputMethodType 
)

Sets the output method for the given XML Transform Class.

Parameters
[in]stylesheetRefReference to XML Transform class
[in]outputMethodTypeXSLOUTPUT_NOTSPECIFIED, XSLOUTPUT_XML, XSLOUTPUT_HTML, XSLOUTPUT_TEXT
Returns
SUCCESS or ERROR
Remarks
This function is currently not in use, it is reserved for future use
int mdlXSL_setSourceDom ( XslStylesheetRef  stylesheetRef,
XmlDomRef  sourceDomRef 
)

Sets the Source XML Dom for the given XML Transform Class.

Parameters
[in]stylesheetRefReference to XML Transform class
[in]sourceDomRefReference to DOM class
Returns
SUCCESS or ERROR
int mdlXSL_setSourceFilename ( XslStylesheetRef  stylesheetRef,
WChar const *  sourceFilenameP 
)

Sets the source filename for the given XML Transform Class.

Parameters
[in]stylesheetRefReference to XML Transform class
[in]sourceFilenamePsource filename to set
Returns
SUCCESS or ERROR
int mdlXSL_setStylesheetDom ( XslStylesheetRef  stylesheetRef,
XmlDomRef  stylesheetDomRef 
)

Sets the Stylesheet XML Dom for the given XML Transform Class.

Parameters
[in]stylesheetRefReference to XML Transform class
[in]stylesheetDomRefReference to DOM class
Returns
SUCCESS or ERROR
int mdlXSL_setStylesheetFilename ( XslStylesheetRef  stylesheetRef,
WChar const *  stylesheetFilenameP 
)

Sets the stylesheet filename for the given XML Transform Class Returns the stylesheet DOM for the given XML Transform Class.

Parameters
[in]stylesheetRefReference to XML Transform class
[in]stylesheetFilenamePstylesheet filename to set
Returns
SUCCESS or ERROR
int mdlXSL_transformToDom ( XmlDomRef pOutDomRef,
XslStylesheetRef  styleSheetRef 
)

Transforms the given XML Transform Class and returns the results as an XML DOM.

Parameters
[in]pOutDomRefReturned XML DOM after Tranformation
[in]styleSheetRefReference to XML Tranform Class
Returns
SUCCESS or ERROR
long mdlXSL_transformToString ( XslStylesheetRef  styleSheetRef)

Transforms the given Style Sheet Class to a string.

Parameters
[in]styleSheetRefReference to XML Tranform Class
Returns
size of transformed string
Remarks
Retrieve the transformed string by calling mdlXSL_getTransformString
See also
mdlXSL_getTransformString
int mdlXSL_transformToTextFile ( XslStylesheetRef  styleSheetRef,
WChar const *  pFileSpec,
bool  bOverwrite 
)

Transforms the given XML Transform Class and saves the results to the give file.

Parameters
[in]styleSheetRefReference to XML Tranform Class
[in]pFileSpecFull file spec save transformation to
[in]bOverwritetrue to overwrite existing file, false to error when file already exists
Returns
SUCCESS or ERROR
int mdlXSL_transformToXmlFile ( XslStylesheetRef  styleSheetRef,
int  fileSpecType,
WChar const *  pFileSpec,
WChar const *  pStorageSpec,
WChar const *  pStreamSpec,
WChar const *  pEncoding,
bool  bCompress,
bool  bOverwrite,
bool  bFormat 
)

Transforms the given Style Sheet Class to given file spec.

Parameters
[in]styleSheetRefReference to XML Tranform Class
[in]fileSpecTypemust be FILESPEC_LOCAL
[in]pFileSpecFull file spec to generate
[in]pStorageSpecStorage (like directory)
[in]pStreamSpecStream (like file)
[in]pEncodingEncoding
[in]bCompressReserved for future use, zip after saving?
[in]bOverwritetrue to overwrite existing file, false to fail if file already exists
[in]bFormatPretty Print (add indentation newlines) as saving
Returns
SUCCESS or ERROR

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.