Using custom XPath expressions to validate metadata elements (Production Mapping)

There may be situations where you need to evaluate the contents of your metadata in a more precise manner than what can be accomplished using the Metadata check's predefined content expressions. This could include the need to determine whether a metadata element is populated with a specific value, such as the Contact Person Name is equal to "John Smith" or that the Organization Title is equal to "City of Redlands". You may need to compare the value of two different metadata elements to ensure they are consistent. This could include comparing the Last Update date against the Planned Update date to ensure that these dates are consistent.

Once an expression has been created, it can be saved to disk for reuse in other Metadata checks or shared among different people in your organization to minimize duplication of effort in creating these sometimes complex queries and to standardize how metadata quality control is conducted.

Once you have defined the criteria for the check, you can configure the notes and a severity rating. The notes allow you to provide a more specific description for the feature that has been written to the Reviewer table and are copied to the Notes field in the Reviewer table. The severity rating allows you to indicate how important the results from a check are in terms of your quality assurance/quality-control processes. The lower the number, the greater the priority the check's results have.

AttentionAttention :

Before running the Metadata check, the metadata on your data must be updated using one of the following to ensure that the check results are complete.

  • The Description tab in ArcCatalog
  • The Description tab on the Item Description dialog box, which can be opened through the Catalog window in ArcMap
  • The Upgrade Metadata geoprocessing tool

Etapes :
  1. Start ArcMap.
  2. On the main menu, click Customize > Toolbars > Data Reviewer.
  3. Click the Reviewer Batch Job Manager button Reviewer Batch Job Manager on the Data Reviewer toolbar.

    The Reviewer Batch Job Manager dialog box appears.

  4. Create a batch job.
  5. Right-click a group in the batch job, then click Add Check > Advanced Checks > Metadata Check.

    The Metadata Check Properties dialog box appears.

    Metadata Check Properties dialog box
  6. If necessary, type a unique name for the check in the Check Title text box.
    RemarqueRemarque :

    The check title can be used to describe the type, metadata standard, and conditions you are evaluating with the check. This is useful when you have a combination of mandatory and optional metadata elements and resources to be evaluated.

  7. In the Check Options area, check the Validate Metadata Standard check box.
  8. Click Configure to configure metadata element expressions.

    The Metadata Content Validation dialog box appears.

    The Metadata Content Validation dialog box
  9. In the Element Expressions area, choose the Custom Expression option.
  10. Click the Custom Expression drop-down arrow and choose Create Custom Expression.
    AstuceAstuce:

    You can also edit a previously saved expression by choosing it from the Custom Expression drop-down list and clicking Edit to open the Edit Custom Expression dialog box to update the query.

  11. In the Edit Custom Expression area, type a descriptive name for the query in the Check Name text box.
    RemarqueRemarque :

    The check name can be used to describe the elements being evaluated and the error conditions you are looking for with the custom expression. It is also what is listed in the Create Custom Expression drop-down list once the query is saved to disk.

  12. In the Edit Custom Expression area, type the custom XPath 1.0 expression in the XPath Expression text box.
  13. In the Edit Custom Expression area, type a brief description of what the results of the query constitute in the Status text box.
    RemarqueRemarque :

    The text entered in the Status property is written to an error result's REVIEWSTATUS in the Reviewer table. A good description of the error conditions allows for better reporting and correction of the error later in your quality-control workflow.

    A complete custom expression in the Metadata Content Validation dialog box
  14. In the Edit Custom Expression area, click Verify to validate the syntax of the XPath expression.
  15. Once the query has been successfully verified, you can click Save to Disk to save the custom XPath expression for reuse.
    RemarqueRemarque :

    It is not necessary to save the expression in order to run the check you are configuring, but if you want to reuse the expression in a different Metadata check, you need to save it to make it available for use in other checks. Saved XPath expressions are stored as an XML-formatted text file and named based on the name defined in the Check Name text box. The resulting file is stored on disk in the User_Profile\My Documents\ESRI\Production<release>\Metadata\Queries directory.

  16. In the Element Expressions area, click Add Expression to add the metadata element or custom expression pair to the list in the Configured Expressions area.
    RemarqueRemarque :

    Each custom XPath expression configured for content evaluation is represented as a single row in the list in the Configured Expressions area.

  17. Click OK to close the Metadata Content Validation dialog box.
  18. If necessary, type descriptive text for the check results in the Notes text box in the Reviewer Remarks area.
  19. If necessary, click the Severity drop-down arrow and choose a value that indicates the priority of the check's results in the Reviewer Remarks area.

    The severity indicates the importance of the check result. The values range from 1 to 5, with 1 being the highest priority and 5 being the lowest.

  20. Cliquez sur OK.
  21. Save the batch job.
  22. Cliquez sur OK.

Thèmes connexes

4/26/2014