Exemplo n.º 1
0
    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"
Exemplo n.º 2
0
    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"
Exemplo n.º 3
0
 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()
Exemplo n.º 4
0
 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()