def validate(self, inputTree, xsdTree): XsValBase.validate(self, inputTree, xsdTree) self._initInternalAttributes(self.inputRoot) self._updateLookupTables(self.inputRoot, self.xsdLookupDict) self._includeAndImport(self.inputTree, self.inputTree, self.xsdIncludeDict, self.xsdLookupDict) if not self.errorHandler.hasErrors(): # IDs must be unique within a schema file self.xsdIdDict = {} self._checkSchemaSecondLevel() # FIXME: Wellknown schemas are not included in the input tree although the internal attribute has been set! # Better solution required than this workaround! self.inputRoot["__WellknownSchemasImported__"] = "false"
def validate (self, inputTree, xsdTree): XsValBase.validate(self, inputTree, xsdTree) self._initInternalAttributes (self.inputRoot) self._updateLookupTables (self.inputRoot, self.xsdLookupDict) self._includeAndImport (self.inputTree, self.inputTree, self.xsdIncludeDict, self.xsdLookupDict) if not self.errorHandler.hasErrors(): # IDs must be unique within a schema file self.xsdIdDict = {} self._checkSchemaSecondLevel() # FIXME: Wellknown schemas are not included in the input tree although the internal attribute has been set! # Better solution required than this workaround! self.inputRoot["__WellknownSchemasImported__"] = "false"
def _validateXmlInput(self, xmlInputFile, inputTreeWrapper, xsdTreeWrapperList): self._verbosePrint("Validating %s..." % (xmlInputFile)) xsvInputFile = XsValBase(self.xmlIf, self.errorHandler, self.verbose) xsvInputFile.validate(inputTreeWrapper, xsdTreeWrapperList) xsvInputFile.unlink() self.errorHandler.flushOutput()
def _validateXmlInput (self, xmlInputFile, inputTreeWrapper, xsdTreeWrapperList): self._verbosePrint ("Validating %s..." %(xmlInputFile)) xsvInputFile = XsValBase (self.xmlIf, self.errorHandler, self.verbose) xsvInputFile.validate(inputTreeWrapper, xsdTreeWrapperList) xsvInputFile.unlink() self.errorHandler.flushOutput()