Validate metadata

You can check whether your metadata will pass BigPicture’s validation before you upload, using xmllint and the official BigPicture metadata schemas (metaflex). This applies to the XML files in the METADATA, LANDING_PAGE, and PRIVATE folders.

Install xmllint

xmllint ships with libxml2.

Install libxml2 (which provides xmllint):

choco install xsltproc

If you don’t use Chocolatey, the libxml2 binaries are also available from the libxml2 Windows builds.

brew install libxml2
sudo apt-get install -y libxml2-utils
Verify
xmllint --version

You should see a libxml2 version string printed (your version may differ).

Download the schemas (XSDs)

Download the XSD files for the metadata version you target. They are available directly from the metaflex repository (v1 / v2), or you can fetch them all at once with this script, which places them in an xsd-files/ folder:

version=v2  # replace with v1 for metadata version 1
mkdir -p xsd-files

curl -H "Accept: application/vnd.github.v3+json" \
  https://api.github.com/repos/imi-bigpicture/bigpicture-metaflex/contents/src?ref=$version.0.0 | jq -r '.[] | .download_url' |
while IFS= read -r url; do
    xsd_name=$(basename "$url")
    curl -o "xsd-files/${xsd_name%\?*}" -J -L "$url" >/dev/null 2>&1
done
Verify
ls xsd-files/

You should see a set of BP.*.xsd files, one per metadata type (for example BP.dataset.xsd, BP.image.xsd, BP.sample.xsd).

Validate each XML file

For each metadata file, validate it against the matching schema:

xmllint --noout --schema xsd-files/BP.<filename>.xsd <filename>.xml

For example, to check dataset.xml:

xmllint --noout --schema xsd-files/BP.dataset.xsd METADATA/dataset.xml
Verify

A file that passes prints:

METADATA/dataset.xml validates

If you see schema errors instead, fix the reported lines and re-run before moving on — these are the same checks BigPicture applies on its side.

Once every metadata file validates, continue to Upload (sda-cli).