Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
XML.ApplyStylesheet
Apply the stylesheet to the document (XSLT transform).
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
XML | 8.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "XML.ApplyStylesheet"; XML; StyleSheet { ; Parameters } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
XML | The XML to process. Can be XML as text or the reference returned by XML.Parse function, so you can make several times changes to the XML without parsing it each time. |
"<test>Hello</test>" | |
StyleSheet | The XML of the style sheet. Can be XML as text or the reference returned by XML.Parse function, so you can make several times changes to the XML without parsing it each time. |
||
Parameters | The list of parameters to pass to the engine. Pass a list with key=value format. |
"id=123¶test=2" | Optional |
Result
Returns text or error.
Description
Apply the stylesheet to the document (XSLT transform).Performs a XSLT transformation on the input document.
The output may be a non-wellformed output XML wise!
Returns various errors if XML is not well formed or style sheet is invalid.
Based on LibXSLT, so it provides an implementation of XSLT 1.0, plus most of the EXSLT set of processor-portable extensions functions and some of Saxon's evaluate and expressions extensions.
Examples
Apply a stylesheet:
Set Variable [ $InputXML; Value:XSLT::InputXML ]
Set Variable [ $StyleSheet; Value:XSLT::StyleSheet ]
Set Variable [ $Output; Value:MBS("XML.ApplyStylesheet"; $InputXML; $StyleSheet) ]
Set Field [ XSLT::OutputXML; $Output ]
See also
Release notes
- Version 11.5
- Added XML.ApplyStylesheet2 function.
- Fixed error message reporting problem for XML.ApplyStylesheet function.
- Version 10.0
- Fixed XML.ApplyStylesheet to return empty string if result should be empty.
- Version 9.5
- Fixed a problem with XML.ApplyStylesheet only returned first block of text instead of full text.
- Version 8.4
- Added XML.ApplyStylesheet function.
Example Databases
Blog Entries
- Goodies 33: Custom context menu commands for FileMaker ScriptWorkspace
- New in version 11.5 of MBS FileMaker Plugin
- MBS FileMaker Plugin, version 11.5pr6
- MBS FileMaker Plugin, version 9.6pr2
- MBS FileMaker Plugin, version 9.5pr4
- Custom context menu commands for FileMaker ScriptWorkspace
- Neues MBS FileMaker Plugin 8.4 - Über 5400 Funktionen in einem Plugin
- MBS FileMaker Plugin 8.4 - More than 5400 Functions In One Plugin
- MBS FileMaker Plugin, version 8.4pr5
- Playing with LibXSLT
This function is free to use.
Created 22nd August 2018, last changed 2nd November 2021