コード例 #1
0
ファイル: xsvalSchema.py プロジェクト: JoonasMelin/mavlink
    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"
コード例 #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"
コード例 #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()
コード例 #4
0
ファイル: pyxsval.py プロジェクト: christophior/WCDb
 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()