classes/phing/filters/XsltFilter.php
\XSLTParam
Class that holds an XSLT parameter.
- package
- phing.filters
Properties
Methods

getExpression(
)
:
stringReturns expression value -- performs lookup if expr is registerslot.
| Type | Description |
|---|---|
| string |

getValue(
)
:
Gets expression value (alias to the getExpression()) method.
- see
- \getExpression()

setExpression(
string $expr
)
:
Sets expression value.
| Name | Type | Description |
|---|---|---|
| $expr | string |

setListeningExpression(
\RegisterSlot $expr
)
:
Sets expression to dynamic register slot.
| Name | Type | Description |
|---|---|---|
| $expr | \RegisterSlot |
\XsltFilter
Applies XSL stylesheet to incoming text.
Uses PHP XSLT support (libxslt).
- Extends from
- \BaseParamFilterReader
- Implements
- \ChainableReader
- see
- \FilterReader
- author
- Hans Lellelid
- author
- Yannick Lecaillez
- author
- Andreas Aderhold
- copyright
- © 2003 seasonfive. All rights reserved
- package
- phing.filters
- version
- $Id: XsltFilter.php 557 2009-08-29 13:54:38Z mrook $
Properties

$html= 'false'
Whether to use loadHTML() to parse the input XML file.
falseDetails- Type

boolean
$processed= 'false'
Whether XML file has been transformed.
falseDetails- Type
- boolean

bool
$resolveDocumentExternals= 'false'
Whether to resolve entities in the XML document (see {@link http://www.php.net/manual/en/class.domdocument.php#domdocument.props.resolveexternals} for more details).
falseDetails- Type
- bool
- since
- 2.4

bool
$resolveStylesheetExternals= 'false'
Whether to resolve entities in the stylesheet.
falseDetails- Type
- bool
- since
- 2.4
Methods

chain(
\Reader $reader
)
:
\ReaderCreates a new XsltFilter using the passed in
Reader for instantiation.
| Name | Type | Description |
|---|---|---|
| $reader | \Reader | A Reader object providing the underlying stream. Must not be |
| Type | Description |
|---|---|
| \Reader |

createParam(
)
:
\XSLTParamCreate new XSLT Param object, to handle the nested element.
| Type | Description |
|---|---|
| \XSLTParam |

getHtml(
)
:
booleanWhether to use HTML parser for the XML.
This is supported in libxml2 -- Yay!
| Type | Description |
|---|---|
| boolean |

getParams(
)
:
arrayReturns the XSLT params set for this class.
This is used to "clone" this class, in the chain() method.
| Type | Description |
|---|---|
| array |

process(
string $xml, string $xsl
)
:
Try to process the XSLT transformation
| Name | Type | Description |
|---|---|---|
| $xml | string | XML to process. |
| $xsl | string | XSLT sheet to use for the processing. |
- throws
- On XSLT errors

read(
$len
=
null
)
:
stringReads stream, applies XSLT and returns resulting stream.
| Name | Type | Description |
|---|---|---|
| $len |
| Type | Description |
|---|---|
| string |
- throws
- - if XSLT support missing, if error in xslt processing

setHtml(
boolean $b
)
:
Whether to use HTML parser for XML.
| Name | Type | Description |
|---|---|---|
| $b | boolean |

setParams(
array $params
)
:
Sets the XSLT params for this class.
This is used to "clone" this class, in the chain() method.
| Name | Type | Description |
|---|---|---|
| $params | array |

setResolveDocumentExternals(
bool $resolveExternals
)
:
Whether to resolve entities in document.
| Name | Type | Description |
|---|---|---|
| $resolveExternals | bool |
- since
- 2.4

setResolveStylesheetExternals(
bool $resolveExternals
)
:
Whether to resolve entities in stylesheet.
| Name | Type | Description |
|---|---|---|
| $resolveExternals | bool |
- since
- 2.4