Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

Saxon XQuery

All examples are included with download of MBS FileMaker Plugin.

Saxon XQuery.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 3
Value Lists 0
Custom Functions 0
Custom Menus 24
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Apex Blue
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields On
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Comments
Occurrences in Relationship Graph
Saxon XSLT
9 fields defined, 5 records
Saxon XSLT

Fields

Table Name: Saxon XSLT - 9 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
PrimaryKey Normal, Text Auto-Enter: Validation:
  • Only during data entry
  • Not empty
  • Unique
  • Strict validation
Storage:
  • Repetitions: 1
  • Indexing: Minimal
  • Automatically create indexes as needed
  • Index Language: Unicode Raw
Unique identifier of each record in this table
          CreationTimestamp Normal, Timestamp Auto-Enter:
          • Creation timestamp
          Validation:
          • Only during data entry
          • Strict data type: 4 digit year
          • Not empty
          • Strict validation
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
          Date and time each record was created
                  CreatedBy Normal, Text Auto-Enter:
                  • Creation account name
                  Validation:
                  • Only during data entry
                  • Not empty
                  • Strict validation
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                  Account name of the user who created each record
                          ModificationTimestamp Normal, Timestamp Auto-Enter:
                          • Modification timestamp
                          Validation:
                          • Only during data entry
                          • Strict data type: 4 digit year
                          • Not empty
                          • Strict validation
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                          Date and time each record was last modified
                                  ModifiedBy Normal, Text Auto-Enter:
                                  • Modification account name
                                  Validation:
                                  • Only during data entry
                                  • Not empty
                                  • Strict validation
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                  Account name of the user who last modified each record
                                          XML Normal, Text Auto-Enter:
                                          • Allow editing
                                          • Context table: Saxon XSLT
                                            Calculation: Let ( [ xmlFormatted = MBS("XML.Format"; Self); xmlFormatFailed = MBS("IsError"); xmlText = If(xmlFormatFailed; Self; xmlFormatted); result = MBS("XML.Colorize"; xmlText) ]; result ) // put this calculation into a field, so the field gets formated and colorized whenever the field is changed and the record gets commited.
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: None
                                          • Automatically create indexes as needed
                                          • Index Language: German
                                              Query Normal, Text Auto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                              • Indexing: None
                                              • Automatically create indexes as needed
                                              • Index Language: German
                                                  Result Normal, Text Auto-Enter:
                                                  • Allow editing
                                                  • Context table: Saxon XSLT
                                                    Calculation: Let ( [ xmlFormatted = If( Left(Self; 1) = "<"; MBS("XML.Format"; Self); Self); xmlFormatFailed = MBS("IsError"); xmlText = If(xmlFormatFailed; Self; xmlFormatted); result = MBS("XML.Colorize"; xmlText) ]; result ) // put this calculation into a field, so the field gets formated and colorized whenever the field is changed and the record gets commited.
                                                  Validation:
                                                  • Only during data entry
                                                  Storage:
                                                  • Repetitions: 1
                                                  • Indexing: None
                                                  • Automatically create indexes as needed
                                                  • Index Language: German
                                                      Description Normal, Text Auto-Enter:
                                                      • Allow editing
                                                      Validation:
                                                      • Only during data entry
                                                      Storage:
                                                      • Repetitions: 1
                                                      • Indexing: None
                                                      • Automatically create indexes as needed
                                                      • Index Language: German

                                                            Layout Objects: Saxon XSLT

                                                            Regular Fields

                                                            Field Name: Saxon XSLT::XML
                                                            Field Properties Coordinates Field Format Field Behavior Quick Find
                                                            • Top: 192 pt
                                                            • Left: 96 pt
                                                            • Bottom: 399 pt
                                                            • Right: 546 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: Default for Data Type
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: Saxon XSLT::Query
                                                            Field Properties Coordinates Field Format Field Behavior Quick Find
                                                            • Top: 406 pt
                                                            • Left: 96 pt
                                                            • Bottom: 612 pt
                                                            • Right: 546 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: Default for Data Type
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: Saxon XSLT::Result
                                                            Field Properties Coordinates Field Format Field Behavior Quick Find
                                                            • Top: 193 pt
                                                            • Left: 680 pt
                                                            • Bottom: 399 pt
                                                            • Right: 1128 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: Default for Data Type
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: Saxon XSLT::Description
                                                            Field Properties Coordinates Field Format Field Behavior Quick Find
                                                            • Top: 117 pt
                                                            • Left: 98 pt
                                                            • Bottom: 187 pt
                                                            • Right: 546 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: Default for Data Type
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Buttons

                                                            Button Properties Coordinates Script/Script Step
                                                              Type:
                                                            • Text: Apply Stylesheet
                                                              Additional Properties:
                                                            • Change to hand cursor over button
                                                            • Top: 619 pt
                                                            • Left: 96 pt
                                                            • Bottom: 665 pt
                                                            • Right: 254 pt
                                                            • Anchoring: Left, Top
                                                            Perform Script [ “Run XQuery” ]

                                                            Scripts:


                                                            Web Viewer Controls

                                                            Web Viewer Control Properties Coordinates Web Address
                                                              Additional Properties:
                                                            • Allow interaction with web viewer content
                                                            • Display progress bar
                                                            • Display status messages
                                                            • Automatically encode URL
                                                            • Top: 404 pt
                                                            • Left: 680 pt
                                                            • Bottom: 665 pt
                                                            • Right: 1127 pt
                                                            • Anchoring: Left, Top
                                                            If ( IsEmpty ( Saxon XSLT::Result ) ; "about:blank"; "data:text/html;charset=utf-8;base64," & Base64Encode ( Saxon XSLT::Result ) )

                                                            Script Hierarchy

                                                            Load Saxon
                                                            Run XQuery
                                                            Clear

                                                            Next Script: [Run XQuery]
                                                            Script Name Load Saxon
                                                            Run script with full access privileges Off
                                                            Siri Shortcut Visible Off
                                                            Include In Menu Yes
                                                            Layouts that use this script
                                                              Scripts that use this script
                                                              Script Definition
                                                              Script Steps
                                                              • Set Variable [ $path; Value:"" ]
                                                              • #you may need to put in your path or have the libraries in the folder for the plugin
                                                              • If [ MBS("IsMacOS") ]
                                                              • Set Variable [ $path; Value:"libsaxonc-core-ee.12.9.0.dylib" ]
                                                              • Else If [ MBS("IsWindows") ]
                                                              • Set Variable [ $path; Value:"saxonc-core-ee.dll" ]
                                                              • Else If [ MBS("IsLinux") ]
                                                              • Set Variable [ $path; Value:"libsaxonc-core-ee.so.12.9.0" ]
                                                              • End If
                                                              • Set Variable [ $r; Value:MBS( "Saxon.Load"; $Path ) ]
                                                              • If [ MBS("IsError") ]
                                                              • Show Custom Dialog [ Title: "Failed to load saxon library."; Message: $r; Default Button: “OK”, Commit: “Yes” ]
                                                              • Halt Script
                                                              • End If
                                                              Fields used in this script
                                                                Scripts used in this script
                                                                  Layouts used in this script
                                                                    Tables used in this script
                                                                      Table occurrences used by this script
                                                                        Custom Functions used by this script
                                                                          Custom menu set used by this script

                                                                            Previous Script: [Load Saxon] Next Script: [Clear]
                                                                            Script Name Run XQuery
                                                                            Run script with full access privileges Off
                                                                            Siri Shortcut Visible Off
                                                                            Include In Menu Yes
                                                                            Layouts that use this script
                                                                            Scripts that use this script
                                                                              Script Definition
                                                                              Script Steps
                                                                              • If [ MBS("Saxon.IsLoaded") = 0 ]
                                                                              • Perform Script [ “Load Saxon” ]
                                                                              • End If
                                                                              • Set Variable [ $r; Value:MBS( "Saxon.XQuery"; Saxon XSLT::XML; Saxon XSLT::Query ) ]
                                                                              • Set Field [ Saxon XSLT::Result; $r ]
                                                                              Fields used in this script
                                                                              Scripts used in this script
                                                                              Layouts used in this script
                                                                                Tables used in this script
                                                                                Table occurrences used by this script
                                                                                Custom Functions used by this script
                                                                                  Custom menu set used by this script

                                                                                    Previous Script: [Run XQuery]
                                                                                    Script Name Clear
                                                                                    Run script with full access privileges Off
                                                                                    Siri Shortcut Visible Off
                                                                                    Include In Menu Yes
                                                                                    Layouts that use this script
                                                                                      Scripts that use this script
                                                                                        Script Definition
                                                                                        Script Steps
                                                                                        • Replace Field Contents [ Saxon XSLT::Result; Replace with calculation: "" ] [ No dialog ]
                                                                                        Fields used in this script
                                                                                        Scripts used in this script
                                                                                          Layouts used in this script
                                                                                            Tables used in this script
                                                                                            Table occurrences used by this script
                                                                                            Custom Functions used by this script
                                                                                              Custom menu set used by this script

                                                                                                Download example: Saxon XQuery

                                                                                                Used functions: