Class TXmlTransform
TXmlTransform class
TXmlTransform uses the PHP's XSL extension to perform XSL transformations using the libxslt library. To associate an XML style sheet with TXmlTransform set the TransformPath property to the namespace or path to the style sheet or set the TransformContent property to the XML style sheet data as a string. To associate the XML data to be transformed set the DocumentPath property to the namespace or path to the XML document or set the DocumentContent property to the XML data as a string. To add additional parameters to the transformation process you can use the Parameters property.
Constants Inherited From TControl |
AUTOMATIC_ID_PREFIX,
CLIENT_ID_SEPARATOR,
CS_CHILD_INITIALIZED,
CS_CONSTRUCTED,
CS_INITIALIZED,
CS_LOADED,
CS_PRERENDERED,
CS_STATE_LOADED,
ID_FORMAT,
ID_SEPARATOR,
IS_CHILD_CREATED,
IS_CREATING_CHILD,
IS_DISABLE_THEMING,
IS_DISABLE_VIEWSTATE,
IS_ID_SET,
IS_SKIN_APPLIED,
IS_STYLESHEET_APPLIED,
RF_ADAPTER,
RF_AUTO_BINDINGS,
RF_CHILD_STATE,
RF_CONTROLS,
RF_CONTROLSTATE,
RF_DATA_BINDINGS,
RF_EVENTS,
RF_NAMED_CONTROLS,
RF_NAMED_CONTROLS_ID,
RF_NAMED_OBJECTS,
RF_SKIN_ID,
|
Constructor Summary |
public |
Constructor
|
Method Summary |
string
|
|
string
|
|
TAttributeCollection
|
Returns the list of parameters to be applied to the transform.
|
string
|
|
string
|
|
void
|
Performs XSL transformation and render the output.
|
void
|
|
void
|
|
void
|
|
void
|
|
Methods Inherited From TControl |
TControl::addedControl(), TControl::addParsedObject(), TControl::addToPostDataLoader(), TControl::applyStyleSheetSkin(), TControl::autoBindProperty(), TControl::autoDataBindProperties(), TControl::bindProperty(), TControl::broadcastEvent(), TControl::bubbleEvent(), TControl::clearChildState(), TControl::clearControlState(), TControl::clearNamingContainer(), TControl::clearViewState(), TControl::convertUniqueIdToClientId(), TControl::createChildControls(), TControl::createControlCollection(), TControl::dataBind(), TControl::dataBindChildren(), TControl::dataBindProperties(), TControl::ensureChildControls(), TControl::findControl(), TControl::findControlsByID(), TControl::findControlsByType(), TControl::focus(), TControl::getAdapter(), TControl::getAllowChildControls(), TControl::getAttribute(), TControl::getAttributes(), TControl::getChildControlsCreated(), TControl::getClientID(), TControl::getControls(), TControl::getControlStage(), TControl::getControlState(), TControl::getCustomData(), TControl::getEnabled(), TControl::getEnableTheming(), TControl::getEnableViewState(), TControl::getHasAdapter(), TControl::getHasAttributes(), TControl::getHasChildInitialized(), TControl::getHasControls(), TControl::getHasInitialized(), TControl::getHasLoaded(), TControl::getHasLoadedPostData(), TControl::getHasPreRendered(), TControl::getID(), TControl::getNamingContainer(), TControl::getPage(), TControl::getParent(), TControl::getRegisteredObject(), TControl::getSkinID(), TControl::getSourceTemplateControl(), TControl::getTemplateControl(), TControl::getUniqueID(), TControl::getViewState(), TControl::getVisible(), TControl::hasAttribute(), TControl::initRecursive(), TControl::isDescendentOf(), TControl::isObjectRegistered(), TControl::loadRecursive(), TControl::loadState(), TControl::loadStateRecursive(), TControl::onDataBinding(), TControl::onInit(), TControl::onLoad(), TControl::onPreRender(), TControl::onUnload(), TControl::preRenderRecursive(), TControl::raiseBubbleEvent(), TControl::registerObject(), TControl::removeAttribute(), TControl::removedControl(), TControl::render(), TControl::renderChildren(), TControl::renderControl(), TControl::saveState(), TControl::saveStateRecursive(), TControl::setAdapter(), TControl::setAttribute(), TControl::setChildControlsCreated(), TControl::setControlStage(), TControl::setControlState(), TControl::setCustomData(), TControl::setEnabled(), TControl::setEnableTheming(), TControl::setEnableViewState(), TControl::setID(), TControl::setPage(), TControl::setSkinID(), TControl::setTemplateControl(), TControl::setViewState(), TControl::setVisible(), TControl::trackViewState(), TControl::traverseChildControls(), TControl::unbindProperty(), TControl::unloadRecursive(), TControl::unregisterObject(), TControl::__get()
|
Methods Inherited From TComponent |
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()
|
Constructor Details |
__construct
Constructor
Initializes the TXmlTransform object and ensure that the XSL extension is available
Throws:
TConfigurationException If XSL extension is not available
|
Method Details |
getDocumentContent
public string getDocumentContent |
() |
Output |
string
| XML data |
Exception |
|
getDocumentPath
public string getDocumentPath |
() |
Output |
string
| The path to the XML document. It must be in namespace format. |
Exception |
|
getParameters
Returns the list of parameters to be applied to the transform.
|
getTransformContent
public string getTransformContent |
() |
Output |
string
| XML style sheet as string |
Exception |
|
getTransformPath
public string getTransformPath |
() |
Output |
string
| The path to the XML style sheet. |
Exception |
|
render
Performs XSL transformation and render the output.
Input |
THtmlWriter | $writer | The writer used for the rendering purpose |
Output |
Exception |
|
setDocumentContent
public void setDocumentContent |
(string $value ) |
Input |
string | $value | XML data. If not empty, it takes precedence over DocumentPath. |
Output |
Exception |
|
setDocumentPath
public void setDocumentPath |
(string $value ) |
Input |
string | $value | Namespace or path to XML document |
Output |
Exception |
throws | TInvalidDataValueException |
|
setTransformContent
public void setTransformContent |
(string $value ) |
Input |
string | $value | XML style sheet as string |
Output |
Exception |
|
setTransformPath
public void setTransformPath |
(string $value ) |
Input |
string | $value | The path to the XML style sheet. It must be in namespace format. |
Output |
Exception |
|
Constant Details |
EXT_XML_FILE
Type:
string
Value:
'.xml'
|
EXT_XSL_FILE
Type:
string
Value:
'.xsl'
|
|