xmlclass/xsdschema.py
changeset 1826 91796f408540
parent 1782 5b6ad7a7fd9d
child 1846 14b40afccd69
equal deleted inserted replaced
1825:bcb50e736a46 1826:91796f408540
    20 #
    20 #
    21 # You should have received a copy of the GNU General Public License
    21 # You should have received a copy of the GNU General Public License
    22 # along with this program; if not, write to the Free Software
    22 # along with this program; if not, write to the Free Software
    23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    24 
    24 
       
    25 
       
    26 from __future__ import print_function
    25 import os
    27 import os
    26 import re
    28 import re
    27 import datetime
    29 import datetime
    28 from xml.dom import minidom
    30 from xml.dom import minidom
    29 from types import *
    31 from types import *
  1080             if element is not None:
  1082             if element is not None:
  1081                 self.Namespaces[self.TargetNamespace][name] = element
  1083                 self.Namespaces[self.TargetNamespace][name] = element
  1082         if element is None:
  1084         if element is None:
  1083             if name in self.CurrentCompilations:
  1085             if name in self.CurrentCompilations:
  1084                 if self.Debug:
  1086                 if self.Debug:
  1085                     print "Warning : \"%s\" is circular referenced!" % element_name
  1087                     print("Warning : \"%s\" is circular referenced!" % element_name)
  1086             else:
  1088             else:
  1087                 raise ValueError("\"%s\" isn't defined!" % element_name)
  1089                 raise ValueError("\"%s\" isn't defined!" % element_name)
  1088         if element_type is not None and element["type"] != element_type:
  1090         if element_type is not None and element["type"] != element_type:
  1089             raise ValueError("\"%s\" isn't of the expected type!" % element_name)
  1091             raise ValueError("\"%s\" isn't of the expected type!" % element_name)
  1090         return element
  1092         return element