本文整理汇总了Python中arelle.XmlValidate.validateFacet方法的典型用法代码示例。如果您正苦于以下问题:Python XmlValidate.validateFacet方法的具体用法?Python XmlValidate.validateFacet怎么用?Python XmlValidate.validateFacet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类arelle.XmlValidate
的用法示例。
在下文中一共展示了XmlValidate.validateFacet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: constrainingFacets
# 需要导入模块: from arelle import XmlValidate [as 别名]
# 或者: from arelle.XmlValidate import validateFacet [as 别名]
def constrainingFacets(self, facetValues=None):
facetValues = facetValues if facetValues else {}
for facetElt in XmlUtil.schemaFacets(self, (
"{http://www.w3.org/2001/XMLSchema}length", "{http://www.w3.org/2001/XMLSchema}minLength",
"{http://www.w3.org/2001/XMLSchema}maxLength",
"{http://www.w3.org/2001/XMLSchema}pattern", "{http://www.w3.org/2001/XMLSchema}whiteSpace",
"{http://www.w3.org/2001/XMLSchema}maxInclusive", "{http://www.w3.org/2001/XMLSchema}maxExclusive", "{http://www.w3.org/2001/XMLSchema}minExclusive",
"{http://www.w3.org/2001/XMLSchema}totalDigits", "{http://www.w3.org/2001/XMLSchema}fractionDigits")):
XmlValidate.validateFacet(self, facetElt)
facetName = facetElt.localName
if facetName not in facetValues:
facetValue = XmlValidate.validateFacet(self, facetElt)
if facetValue:
facetValues[facetName] = facetValue
if "enumeration" not in facetValues:
for facetElt in XmlUtil.schemaFacets(self, ("{http://www.w3.org/2001/XMLSchema}enumeration",)):
facetValues.setdefault("enumeration",set()).add(facetElt.get("value"))
typeDerivedFrom = self.typeDerivedFrom
if typeDerivedFrom is not None:
typeDerivedFrom.constrainingFacets(facetValues)
return facetValues