User's Guide: CPE Validator

Release 1.0 (RC_01)

Contents:

  1. Overview
  2. Using the Validator
  3. Running Scripts

This is a work-in-progress and capabilities are subject to change.

Overview

Functionality

The Validator is intended to be used during the pre-processing of a Common Media Manifest (CMM) file. When validating a manifest with this tool, the user may select what level of validation checks will be applied. The options are, in increasing level of rigor:

  1. Schema: Validation of compliance with the CMM Schema (i.e., does the Manifest XML comply with the schema XSD).
  2. Constraints: Validation of conformance with all constraints and requirements specified in the full specification. This includes checking the internal consistency of the manifest to verify that all internal references are valid (e.g., if a PictureGroupID is referenced by an Experience then a PictureGroup with that ID value is also defined). Checks of external references (i.e., URLs of content staged on a CDN) are considered out of scope for the Validator and are not tested.
  3. Best Practices: Validation of compliance with the recommended Best Practices for Interactivity.

Validation of a manifest's conformance to a specific Profile will be performed automatically when the 'Constraints' option is enabled and a specific profile has been specified (see Step #4 of Selecting Processing Options for details).

User Interface

Figure 1: Validator UI

The user interface is shown in Figure 1. From top to botton, the main components are:
  • Menus, of which the primary one is the "Processing" menu. This allows the user to select the types of validation checks to be performed and the level of logging output desired.
  • The Control Panel, which is used for:
    • selection of one or more manifest files to be validated,
    • selection of the schema version it must comply with,
    • selection of a Interactivty (i.e., UX) Profile the manifest(s) are intended to support, and
    • selection of a folder to write any output files to
  • The Logging panel used to display and filter the messages resulting from the validation process

Using the Validator

Selecting Processing Options

  1. The first step is to select the types of validation tests to be performed. This is done via the check boxes in the Processing/Validation menu (Fig 2).
  2. Figure 2: Validation Criteria Menu

  3. The next step is to select which CMM files will be validated. A left-click on the 'Source' text area will pop open a File Chooser dialog. If a directory is selected, all manifest files found in the directory will be processed. Alternatively a single file may be selected. NOTE: if the selected source is a directory containing multiple CMM files, then all files will be validated against the same set of options
  4. Next you must identify which version of the CMM Schema the manifest(s) must comply with. The current release of the Validator supports the use of either version 1.4 or 1.5.
  5. The final step is optional and allows the user to identify an Intertactivity Profile that the manifest is intended to support. Selecting the none option indicates that this step is to be skipped. NOTE: At this time, the only officially supported profile is IP-01.

Running the Validator and Interpreting Output

Once all validation options have been set, the validation process may be executed via the RUN button. When the validation process completes, the results will be displayed in the Logging panel (see Figure 3).

Figure 3: Validation Results

The navigation pane on the left side allows the user to select a sub-set of messages to be displayed on the right side. Messages are grouped first by the Manifest they apply to, then by the severity (i.e., Warning, Error, etc.), and finally by the type of validation check resulting in the message (e.g., Best Practices).

By right-clicking on the message display pane, a pop-up menu may be accessed (see Figure 4). Available actions are:

  • clear the entire contents of the message log
  • save to a file the currently displayed group of messages in CSV format

Figure 4: Message Log Pop-up Menu

Running Scripts

Functionality

Validation of multiple Manifests may be performed using scripts that can specify any of same options and settings available thru the user interface. A script may easily be used to process a set of manifests with specified sub-sets being handled using different options. All results are automatically displayed in the GUI's log display but the script engine supports the option of also writting the log to a file.

Writing Command Scripts

A script file is written using the JSON syntax. The structure for a validation script is as follows:

  • Command: should be specified as validate . The validation command has three OPTIONAL sub-elements followed by a list of Manifests to process.

    • Options in the following sub-elements wil apply to all Manifest files that will be processed. These are:
      • pathPrefix : [OPTIONAL] a root folder for locating all Manifest files. The path may be absolute or relative. If relative, the location of the script file is the starting point for resolving the full path to each Manifest file or folder.

      • checks : [OPTIONAL] boolean values indicating which validation tests will be performed. Schema validation is MANDATORY and can not be changed. Constraint validation and Best Practice validation are both optional. Best Practice validation may only be performed when Constraint validation is also enabled. Constraint validation is also required when profile-based validation tests are to be performed. Defaults for both options when not explicitly set are 'Y'. This property value is case-sensitive and must be specified as either Y or N

      • logging :

        • level : [OPTIONAL] the minimum level of messages to be included in the output log. Allowed values are:
          { "Verbose", "Warning", "Error", "Info"}
          The default when not specified is Warning .

        • output : [OPTIONAL] file to write the log to. If not specified, the log is not saved. The path may be absolute or relative. If relative, the location of the script file is the starting point for resolving the full path.

    • A set of Manifest files to be processed. These are specified as a JSON Array. Properties are:

      • file : [REQUIRED] Path to a either a manifest file or a directory containing one or more manifest files. If relative, the starting point for resolving the full path is the pathPrefix .

      • schema : [REQUIRED] Version of the Common Media Manifest (CMM) schema to use.

      • profile : [OPTIONAL] Defaults to none . This property is ignored when constraint validation has been disabled.

The following is an example of script that validates two Manifest files plus any Manifests found in a specific folder and then saves the message log in an output file:

	{  
  "validate":{  
    "pathPrefix":"./MediaManifests/",
    "checks":{  
      "contraints":"Y",
      "bestPrac":"N"
    },
    "logging":{  
      "level":"Warning",
      "output":"./scriptLog01.xml"
    },
    "manifests":[  
      {  
        "file":"si_tests/CMM_BBB_v0.1.xml",
        "schema":"1.5",
        "profile":"DemVal"
      },
      {  
        "file":"si_tests/CMM_Sita_v0.1.xml",
        "schema":"1.4",
        "profile":"none"
      },
      {  
        "file":"studio",
        "schema":"1.4",
        "profile":"IP-1"
      }
    ]
  }
}
	

User Interface

Selection and execution of a script is via the Run Script.. menu entry. Once a script file has been selected the execution is automatic. It is recommended that the contents of the log display be cleared prior to executing a script. Failure to do so will result in any previous messages being included in the saved log file.

Figure : Script Selection and Execution