Home > Class Reference > HSLIB namespace > HS.Util.XSLTTransformer


class HS.Util.XSLTTransformer extends %Library.RegisteredObject

XSLT utility that will cache and compile transforms. It can either be used standalone or as a super class to an ensemble business host.

Property Inventory (Including Private)

Method Inventory (Including Private)


parameter LogTransformEnabled = 0;
parameter SETTINGS = XSLTDirectory,XSLTCallbackHandlerClass,XSLTErrorHandlerClass,XSLTCacheMode;

Properties (Including Private)

property CallbackHandler as %XML.XSLT.CallbackHandler [ InitialExpression = $$$NULLOREF ];
Instance of the callback handler for isc:evaluate() functions
Property methods: CallbackHandlerGet(), CallbackHandlerGetSwizzled(), CallbackHandlerIsValid(), CallbackHandlerNewObject(), CallbackHandlerSet()
property ClearCallbackVariables as %Boolean [ Private , InitialExpression = 0 ];
Internal flag to control clearing callback state variables
Property methods: ClearCallbackVariablesDisplayToLogical(), ClearCallbackVariablesGet(), ClearCallbackVariablesIsValid(), ClearCallbackVariablesLogicalToDisplay(), ClearCallbackVariablesNormalize(), ClearCallbackVariablesSet()
property DoHSTrace as %Boolean;
Controls sending HSTrace messages when extending Ensemble hosts. If not set by the caller, will look at the "TraceOperations" setting
Property methods: DoHSTraceDisplayToLogical(), DoHSTraceGet(), DoHSTraceIsValid(), DoHSTraceLogicalToDisplay(), DoHSTraceNormalize(), DoHSTraceSet()
property ErrorHandler as %XML.XSLT.ErrorHandler [ InitialExpression = $$$NULLOREF ];
Instance of the XSLT error handler
Property methods: ErrorHandlerGet(), ErrorHandlerGetSwizzled(), ErrorHandlerIsValid(), ErrorHandlerNewObject(), ErrorHandlerSet()
property Filenames as %String [ Private , MultiDimensional ];
Map of XSL locations to filenames Format : ..Filenames()= Example: ..Filenames("/sda/ccd-to-sda.xsl")="C:\Healthshare\CSP\xslt\SDA\CCD-to-SDA.xsl"
Property methods: FilenamesDisplayToLogical(), FilenamesGet(), FilenamesIsValid(), FilenamesLogicalToDisplay(), FilenamesLogicalToOdbc(), FilenamesNormalize(), FilenamesSet()
property Initialized as %Boolean [ Private , InitialExpression = 0 , Transient ];
Internal flag indicating if the class needs initialization (which is automatic)
Property methods: InitializedDisplayToLogical(), InitializedGet(), InitializedIsValid(), InitializedLogicalToDisplay(), InitializedNormalize(), InitializedSet()
property InternalTransformer as %RegisteredObject [ Private , Transient ];
The transformer object used as either XSLT1 or XSLT2 transformer
Property methods: InternalTransformerGet(), InternalTransformerGetSwizzled(), InternalTransformerIsValid(), InternalTransformerNewObject(), InternalTransformerSet()
property Timestamps as %String [ Private , MultiDimensional ];
Map of filenames to last-modified timestamps (as a UTC integer value) Format : ..Timestamps()= Example: ..Timestamps("c:\healthshare\csp\xslt\sda\ccd-to-sda.xsl")=5334833340
Property methods: TimestampsDisplayToLogical(), TimestampsGet(), TimestampsIsValid(), TimestampsLogicalToDisplay(), TimestampsLogicalToOdbc(), TimestampsNormalize(), TimestampsSet()
property UseXSLT2 as %Boolean [ InitialExpression = 0 ];
The boolean to indicate whether XSLT2.0 engine is used (1 = XSLT 2.0; 0 = XSLT 1.0)
Property methods: UseXSLT2DisplayToLogical(), UseXSLT2Get(), UseXSLT2IsValid(), UseXSLT2LogicalToDisplay(), UseXSLT2Normalize(), UseXSLT2Set()
property XSLTCacheMode as %String (DISPLAYLIST = ",Always,Timestamp,Never", VALUELIST = ",A,T,N") [ InitialExpression = "T" ];
How stylesheets should be cached
  • Always - The stylesheet is loaded and compiled once
  • Timestamp - The stylesheet is loaded if file modification time is after the load time
  • Never - The stylesheet is never cached (desirable during development) NOTE: Currently, timestamps are checked only for file transforms, not XData or URLs
    Property methods: XSLTCacheModeDisplayToLogical(), XSLTCacheModeGet(), XSLTCacheModeIsValid(), XSLTCacheModeLogicalToDisplay(), XSLTCacheModeLogicalToOdbc(), XSLTCacheModeNormalize(), XSLTCacheModeSet()
  • property XSLTCallbackHandlerClass as Ens.DataType.Class;
    XSLT transformer callback class name Defaults to HS.Util.XSLTHelper
    Property methods: XSLTCallbackHandlerClassDisplayToLogical(), XSLTCallbackHandlerClassGet(), XSLTCallbackHandlerClassIsValid(), XSLTCallbackHandlerClassLogicalToDisplay(), XSLTCallbackHandlerClassLogicalToOdbc(), XSLTCallbackHandlerClassNormalize(), XSLTCallbackHandlerClassSet()
    property XSLTDirectory as Ens.DataType.Directory;
    Location for file transforms (defaults to %install dir%/csp/xslt)
    Property methods: XSLTDirectoryDisplayToLogical(), XSLTDirectoryGet(), XSLTDirectoryIsValid(), XSLTDirectoryLogicalToDisplay(), XSLTDirectoryLogicalToOdbc(), XSLTDirectoryNormalize(), XSLTDirectorySet()
    property XSLTErrorHandlerClass as Ens.DataType.Class;
    XSLT error handler callback class name, if any
    Property methods: XSLTErrorHandlerClassDisplayToLogical(), XSLTErrorHandlerClassGet(), XSLTErrorHandlerClassIsValid(), XSLTErrorHandlerClassLogicalToDisplay(), XSLTErrorHandlerClassLogicalToOdbc(), XSLTErrorHandlerClassNormalize(), XSLTErrorHandlerClassSet()

    Methods (Including Private)

    method CanonicalizeStream(pInput As %Stream.Object, Output pOutput As %Stream.Object) as %Status [ Language = objectscript ]
    Canonicalize an XML stream
    classmethod GetXSLTDirectory() as %String [ Language = objectscript ]
    method ImportObject(pInput, Output pObject As %XML.Adaptor, pClassname As %String = "", pXMLName As %String = "", pCanonicalize As %Boolean = 0) as %Status [ Language = objectscript ]
    Import an object from a stream, optionally canocalizing the stream before import
    method Initialize() as %Status [ Language = objectscript ]
    Setup default values
    method Transform(pInput="", pLocation As %String = "", ByRef pOutput, ByRef pParameters="", pDisableCache=0) as %Status [ Language = objectscript ]
    Transform a string or stream
    method TransformFile(pInput="", pLocation As %String = "", pOutput As %String = "", ByRef pParameters="", pDisableCache=0) as %Status [ Language = objectscript ]
    Transform a file
    method TransformFromObject(pInput As %XML.Adaptor, pLocation As %String = "", ByRef pOutput, ByRef pParameters="", ByRef pXMLName As %String, pAsStream As %Boolean = 1) as %Status [ Language = objectscript ]
    Transform an object into a string or stream
    method TransformIntoObject(pInput, pLocation As %String = "", Output pOutput As %XML.Adaptor, ByRef pParameters="", pClassname As %String = "", pXMLName As %String = "", pCanonicalize As %Boolean = 0, pTempStream As %Stream.Object) as %Status [ Language = objectscript ]
    Transform a string or stream into an object
    method TransformObjects(pInput As %XML.Adaptor, pLocation As %String = "", ByRef pOutput As %XML.Adaptor, ByRef pParameters="", pClassname As %String = "", pXMLName As %String = "", pCanonical As %Boolean = 0, pTempStream As %Stream.Object) as %Status [ Language = objectscript ]
    Transform an object into another object
    classmethod debugParams(ByRef pParams="") as %Stream.GlobalCharacter [ Language = objectscript ]
    Dump parameters out to a stream
    private method getFilename(pLocation As %String, Output pFilename As %String = "") as %Status [ Language = objectscript ]
    Get the filename for a location, defaulting directory if not absolute
    method getLastModified(pFilename As %String) as %Integer [ Language = objectscript ]
    Return last modified time for file as an integer
    private method getParameters(ByRef pParameters, Output pParams, pLocation="") as %Status [ Language = objectscript ]
    Prepare parameters for transformation pParameters: a %ListOfDataTypes or multi-dimensional array pParams: Output multidimensional array If values are not surrounded by single quotes they will be added if XLST 1.0 is used. Any leading/trailing quotes will be stripped will be stripped if XSLT 2.0 us used.
    private method getStyleSheet(pLocation As %String = "", Output pXSL As %XML.XSLT.CompiledStyleSheet) as %Status [ Language = objectscript ]
    Lookup a stylesheet from the cache, load if missing or expired

    Inherited Members

    Inherited Methods (Including Private)