PYXB_ROOT=${PYXB_ROOT:-/home/pab/pyxb/dev}
BUNDLE_ROOT=${PYXB_ROOT}/pyxb/bundles/opengis
SCHEMA_DIR=${BUNDLE_ROOT}/schemas

PYTHONPATH=${PYXB_ROOT}:.
PATH=${PYXB_ROOT}/scripts:/usr/bin:/bin
export PATH PYTHONPATH

failure () {
  echo "Failed: ${@}"
  exit 1
}

python demo.py || exit 1

# sosRegisterSensor.xml uses tml:tcfTrigger, but the element is really named tml:cfTrigger
# Skip testing it since it will fail to validate thereby confusing the viewer.
ls ${SCHEMA_DIR}/sos/1.0.0/examples/*.xml \
 | grep -v sosRegisterSensor \
 | xargs python check_sos.py \
|| exit 1

rm -f gmlapp.py raw/gmlapp.py
pyxbgen \
  --archive-path=${BUNDLE_ROOT}/raw \
  --schema-location=gmlapp.xsd --module=gmlapp \
  --write-for-customization
python testgml.py

#!/bin/sh

failure () {
  echo "Failed: ${@}"
  exit 1
}

python demo.py || exit 1

# sosRegisterSensor.xml uses tml:tcfTrigger, but the element is really named tml:cfTrigger
# Skip testing it since it will fail to validate thereby confusing the viewer.
if [ -d ${SCHEMAS_OPENGIS_NET:-/dev/null} ] ; then
  ls ${SCHEMAS_OPENGIS_NET}/sos/1.0.0/examples/*.xml \
    | grep -v sosRegisterSensor \
    | xargs python check_sos.py \
  || exit 1
fi

rm -f gmlapp.py raw/gmlapp.py
pyxbgen \
  --schema-location=gmlapp.xsd --module=gmlapp \
  --write-for-customization
python testgml.py || exit 1


Update to be independent of location
Update to be independent of location
