Browse Source

----------------------------------------------------------------------

Modified Files:
        XMLSchema.py -- added couple convenience methods, and marked
           AnonymousSimpleType as Local.
 ----------------------------------------------------------------------
main
Joshua Boverhof 20 years ago
parent
commit
83e580fcb6
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      XMLSchema.py

+ 8
- 1
XMLSchema.py View File

@@ -2697,6 +2697,12 @@ class SimpleType(XMLSchemaComponent,\
self.annotation = None self.annotation = None
self.content = None self.content = None


def getAttributeBase(self):
return XMLSchemaComponent.getAttribute(self, 'base')

def getTypeDefinition(self, attribute='base'):
return XMLSchemaComponent.getTypeDefinition(self, attribute)

def getSimpleTypeContent(self): def getSimpleTypeContent(self):
for el in self.content: for el in self.content:
if el.isSimple(): return el if el.isSimple(): return el
@@ -2815,7 +2821,8 @@ class SimpleType(XMLSchemaComponent,\


class AnonymousSimpleType(SimpleType,\ class AnonymousSimpleType(SimpleType,\
SimpleMarker):
SimpleMarker,\
LocalMarker):
"""<simpleType> """<simpleType>
parents: parents:
attribute, element, list, restriction, union attribute, element, list, restriction, union


Loading…
Cancel
Save