Validate with XPaths¶
Colectica Designer allows you to perform custom validation using XPaths.
Follow these steps to validate against a list of XPaths.
Navigate to an item.
Click the Validate with XPaths button on the ribbon.
Choose the file that lists the XPaths to check.
Colectica will check for content that matches any XPaths in the file you specified.
If any matches are found, a report will be opened in your web browser.
XPath File Format¶
The file that lists the XPaths must be a plain text file with one XPath per line.
The XPaths must select elements that are considered invalid.
Here are some sample XPaths to perform various validations.
Ensure all studies have a citation with a title¶
The first XPath selects any StudyUnit elements that do not have a Citation. The second XPath selects any Citation elements that do not have a Title.
Ensure all citations have a subtitle in English¶
Find any variables without any label¶
Find any variables that do not have labels in both English and Norwegian¶
//l:Variable/r:Label[not(child::r:Content[@xml:lang="en-US"] and child::r:Content[@xml:lang="no"])]