# Attempt to prevent catastrophe by validating required settings
# and aborting on any subshell error
set -e
if [ -z "${PYXB_ROOT+notset}" ] ; then
  echo 1>&2 ERROR: PYXB_ROOT not set
  exit 1
fi

BUNDLE_TAG=common

. ${PYXB_ROOT}/maintainer/bundlesupport.sh

# Get a couple that we don't actually generate bindings for, but are nice to
# have around for reference.  (These are all built-ins, so don't need
# generation.)
test -f ${SCHEMA_DIR}/xml.xsd || wget -O ${SCHEMA_DIR}/xml.xsd http://www.w3.org/2001/03/xml.xsd
test -f ${SCHEMA_DIR}/XMLSchema.xsd || wget -O ${SCHEMA_DIR}/XMLSchema.xsd http://www.w3.org/2001/XMLSchema.xsd

( cat <<EOList
http://www.w3.org/2001/XMLSchema-hasFacetAndProperty xsd_hfp --allow-builtin-generation
http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd xhtml1 --allow-builtin-generation
http://www.w3.org/1999/xlink.xsd xlink
EOList
) | generateBindings

