1from pyxb.bundles.common.raw.xhtml1 import * 2import pyxb.bundles.common.raw.xhtml1 as _raw 3 4# The order of elements in an XHTML document is information that is 5# not reflected in the schema information model. For XHTML complex 6# types replace the global validation configuration with one where the 7# content list is strictly obeyed when generating documents. 8 9DefaultValidationConfig = pyxb.GlobalValidationConfig.copy() 10"""The validation configuration that applies to complex types in this namespace.""" 11 12DefaultValidationConfig._setContentInfluencesGeneration(DefaultValidationConfig.ALWAYS) 13DefaultValidationConfig._setOrphanElementInContent(DefaultValidationConfig.RAISE_EXCEPTION) 14DefaultValidationConfig._setInvalidElementInContent(DefaultValidationConfig.RAISE_EXCEPTION) 15 16def _setValidationConfig (): 17 import inspect 18 import sys 19 import pyxb.binding.basis 20 21 for (n, v) in inspect.getmembers(_raw): 22 if inspect.isclass(v) and issubclass(v, pyxb.binding.basis._TypeBinding_mixin): 23 v._SetValidationConfig(DefaultValidationConfig) 24 25_setValidationConfig() 26