コード例 #1
0
ファイル: ModelDtsObject.py プロジェクト: marado/Arelle
 def attributes(self):
     try:
         return self._attributes
     except AttributeError:
         self._attributes = {}
         attrs, attrGroups = XmlUtil.schemaAttributesGroups(self)
         for attrRef in attrs:
             attrDecl = attrRef.dereference()
             if attrDecl is not None:
                 self._attributes[attrDecl.qname] = attrDecl
         for attrGroupRef in attrGroups:
             attrGroupDecl = attrGroupRef.dereference()
             if attrGroupDecl is not None:
                 for attrRef in attrGroupDecl.attributes.values():
                     attrDecl = attrRef.dereference()
                     if attrDecl is not None:
                         self._attributes[attrDecl.qname] = attrDecl
         return self._attributes
コード例 #2
0
 def attributes(self):
     try:
         return self._attributes
     except AttributeError:
         self._attributes = {}
         attrs, attrGroups = XmlUtil.schemaAttributesGroups(self)
         for attrRef in attrs:
             attrDecl = attrRef.dereference()
             if attrDecl is not None:
                 self._attributes[attrDecl.qname] = attrDecl
         for attrGroupRef in attrGroups:
             attrGroupDecl = attrGroupRef.dereference()
             if attrGroupDecl is not None:
                 for attrRef in attrGroupDecl.attributes.values():
                     attrDecl = attrRef.dereference()
                     if attrDecl is not None:
                         self._attributes[attrDecl.qname] = attrDecl
         return self._attributes