thekid/rfc — Issue #135: RFC 0135: Default callbacks for XSLT
Author: thekid
Created: 2011-10-09 15:19:44+00:00
State: open

Scope of Change
====
Since xp-framework/rfc #104 xml.DomXSLProcessor supports PHP callbacks from
within an XSL transformation.

Default callbacks which will be always available will be added
to provide some basic callbacks.

Rationale
====
Eg. string- and date-based operations and calculations cannot be
easily handled in XSL code; until now, programmers usually work
around that problem by appending pre-generated values into the
XML tree which bloat the data.

Functionality
====
Some standard functions will be provided by classes in the
to be introduced xml.xslt package.

The symbolic instance names will be in the "namespace" xp. The
string handling class registers as "xp.string", the date handling
class as "xp.date".

Security considerations
====
n/a

Speed impact
====
Slightly slower, as two more classes will need to be loaded each
time DomXSLProcessor is in use.

Dependencies
====
- xp-framework/rfc #115
by xml.xslt.XSLDateCallback, but only in parts

Related documents
====

Comments
====
- kiesel, Wed Aug 29 10:02:50 CEST 2007
As this RFC has been announced to be part of XP 5.6.0, all changes
that do not depend on xp-framework/rfc #115, have been committed and the status
changed to discussion.
As soon as xp-framework/rfc #115 has been implemented, the remaining parts of
this RFC will be committed, too, and the status be set to
implemented.