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

MBS FileMaker Plugin Example Databases

Saxon Validate

All examples are included with download of MBS FileMaker Plugin.

Saxon Validate.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
10 fields defined, 2 records
Saxon XSLT

Fields

Table Name: Saxon XSLT - 10 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
                                              Schema 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
                                                  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
                                                            Messages 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

                                                                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::Schema
                                                                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

                                                                Field Name: Saxon XSLT::Messages
                                                                Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                • Top: 407 pt
                                                                • Left: 680 pt
                                                                • Bottom: 612 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

                                                                Buttons

                                                                Button Properties Coordinates Script/Script Step
                                                                  Type:
                                                                • Text: Validate
                                                                  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 Validate” ]

                                                                Scripts:


                                                                Script Hierarchy

                                                                Load Saxon
                                                                Run Validate
                                                                Clear

                                                                Next Script: [Run Validate]
                                                                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:"libsaxon-eec-12.5.0.dylib" ]
                                                                  • Else If [ MBS("IsWindows") ]
                                                                  • Set Variable [ $path; Value:"libsaxon-eec-12.5.0.dll" ]
                                                                  • Else If [ MBS("IsLinux") ]
                                                                  • Set Variable [ $path; Value:"libsaxon-eec-12.5.0.so" ]
                                                                  • 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” ]
                                                                  • Else [ ]
                                                                  • Show Custom Dialog [ Title: "saxon loaded"; Message: MBS("Saxon.Version"); Default Button: “OK”, Commit: “Yes” ]
                                                                  • 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 Validate
                                                                                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 [ $Schema; Value:Saxon XSLT::Schema ]
                                                                                  • Set Variable [ $Schema; Value:Substitute($Schema; Char(13); Char(10)) ]
                                                                                  • Set Variable [ $r; Value:MBS( "Saxon.Validate"; Saxon XSLT::XML; $Schema; 2 ) ]
                                                                                  • Set Field [ Saxon XSLT::Result; $r ]
                                                                                  • Set Field [ Saxon XSLT::Messages; MBS("Saxon.ValidationReport") ]
                                                                                  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 Validate]
                                                                                        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 ]
                                                                                            • Replace Field Contents [ Saxon XSLT::Messages; 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 Validate

                                                                                                    Used functions: