예제 #1
0
 def createMetaDictionaryXsd(self):
     self.createMetaDictionaryDtd()
     # Convert DTD-dict to XSD-dict
     try:
         self.dictionary = convert.dtdDict2metaXsdDict( self.dictionary )
     except:
         print 'Failed to convert information from a StGermain Meta DTD to a StGermain Meta XSD'
         raise
예제 #2
0
 def createMetaDictionaryXsd(self):
     self.createMetaDictionaryDtd()
     # Convert DTD-dict to XSD-dict
     try:
         self.dictionary = convert.dtdDict2metaXsdDict(self.dictionary)
     except:
         print 'Failed to convert information from a StGermain Meta DTD to a StGermain Meta XSD'
         raise
예제 #3
0
def main():
    dtd = testData.stgMetaDtdDict()
    xsd = convert.dtdDict2metaXsdDict(dtd)

    pprint.pprint(xsd)

    test = testData.stgMetaXsdDict()
    pprint.pprint(test)

    if test == xsd:
        print 'Passed'
    else:
        print 'Failed'
def main():
	dtd = testData.stgMetaDtdDict()
	xsd = convert.dtdDict2metaXsdDict( dtd )

	pprint.pprint( xsd )

	test = testData.stgMetaXsdDict()
	pprint.pprint( test )

	if test == xsd:
		print 'Passed'
	else:
		print 'Failed'
예제 #5
0
파일: stg.py 프로젝트: wzhang1994/gale
    def loadXML(filename):
        xml_file = file(filename)
        xml_lines = xml_file.readlines()
        xml_text = ""
        for l in xml_lines:
            xml_text += str(l)

        try:
            dtdDict = stgDtd.readXML(xml_text)
        except:
            print 'Failed to parse as a StGermain DTD'
            raise
        try:
            return convert.dtdDict2metaXsdDict(dtdDict)
        except:
            print 'Failed to convert information from a StGermain Meta DTD to a StGermain Meta XSD'
            raise
예제 #6
0
파일: scons.py 프로젝트: eandbsoftware/gale
def loadXML( filename ):
	xml_file = file( filename )
	xml_lines = xml_file.readlines()
	xml_text = ""
	for l in xml_lines:
	        xml_text += str(l)

	try:
		dtdDict = stgDtd.readXML( xml_text )
	except:
		print 'Failed to parse as a StGermain DTD'
		raise
	try:
		return convert.dtdDict2metaXsdDict( dtdDict )
	except:
		print 'Failed to convert information from a StGermain Meta DTD to a StGermain Meta XSD'
		raise