A presentation by Robin Upton ( ) Latest version at Attribution – NonCommercial - ShareAlike Recommended Pre-requisite: FF8: Messages V1.0.0 FF : Filters 9
Filters Filter XSL stylesheet Output Input Unlike services, filters are not requested, but applied automatically. Filters are XSLT-based transforms that affect data within soft nodes.
Filter Positions services /f2f/etc/example-node service reqs exec thread mess ages bottom top Top & bottom positions affect messages. The exec position affects servicereqs Filters may assume one of 3 positions: top bottom
Filters have a separate down and up components, which apply to data flows in different directions: Filter Components Plain text description of the filter here <down src="../../core/filters/demo.down.xslt" * Although required, the F2F namespace is omitted for brevity. src references the XSL transform. Optional processing directives have their customary meanings
Multiple filters may occupy the same position in the same soft node. Filter Step Up filters are applied in reverse order. Down filters are applied in sequential order.
Like ordinary threads, message filters... Message (Top/Bottom) Filter Processing XSL stylesheet XSL stylesheet FILTER thread XSL stylesheet FILTER However... but stop as soon as the top level is processed.... have unique and persistent addresses.... use the servicereq processing model....they do not keep processing until they run out of s, thread
All processing occurs in one thread... Exec filters are pure XSLT; they can read system parameters & callout to f2f:core... Exec Filter Processing Since their thread is ephemeral, exec filters cannot receive data. but cannot process items. thread Raw Output Pre - processed Input servicereq Raw Input servicereq Post- processed Final Output XSL stylesheet custom...output... FILTER XSL stylesheet FILTER XSL stylesheet FILTER XSL stylesheet XSL stylesheet
Filters may use attributes to limit their applicability: Selective Application of Filters check-xsd-not... this schema does not match it. Attribute: Apply if a look at the data shows... There are matching checks for the exception stream: exceptions-xpath, exceptions-xsd, exceptions-xsd-not check-xsd... this schema matches it. check-xpath... this Xpath evaluates to true XPATH
Selective Application of Exec filters The component of exec filters may specify subfilter= “1” to limit filter applicability to cases where the component applied. This filter logs any output of any requests for the ‘example’ service which threw soft- exceptions. This allows easy combination of the up and down conditions. This specifies a ‘dummy’ filter which has no effect on the data
Summary F2F filters use XSLT scripts to automatically modify either messages or servicereqs. Recommended Follow-up: FF10: Access Control Message filters have position top or bottom & can use any servicereqs. Servicereq filters have position exec & can only use core callouts. F2F filters build on the servicereq model, to increase its possibilities.