#NEWLINE# def final( val , conceptsUsed , * args , **kwargs ) : #NEWLINE# #INDENT# modelXbrl = val . modelXbrl #NEWLINE# for ( qname , modelType ) in modelXbrl . qnameTypes . items ( ) : #NEWLINE# #INDENT# if ( qname . namespaceURI not in val . disclosureSystem . baseTaxonomyNamespaces ) : #NEWLINE# #INDENT# facets = modelType . facets #NEWLINE# if facets : #NEWLINE# #INDENT# lengthFacets = ( _DICT_SET ( facets . keys ( ) ) & { 'minLength' , 'maxLength' , 'length' } ) #NEWLINE# if lengthFacets : #NEWLINE# #INDENT# modelXbrl . error ( 'SBR.NL.2.2.7.02' , _ ( 'Type %(typename)s has length restriction facets %(facets)s' ) , modelObject = modelType , typename = modelType . qname , facets = ', ' . join ( lengthFacets ) ) #NEWLINE# #UNINDENT# if ( ( 'enumeration' in facets ) and ( not modelType . isDerivedFrom ( XbrlConst . qnXbrliStringItemType ) ) ) : #NEWLINE# #INDENT# modelXbrl . error ( 'SBR.NL.2.2.7.04' , _ ( 'Concept %(concept)s has enumeration and is not based on stringItemType' ) , modelObject = modelType , concept = modelType . qname ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# ' removed RH 2011-12-23, corresponding use of nameWordsTable in ValidateFilingDTS\n    # build camelCasedNamesTable\n    self.nameWordsTable = {}\n    for name in modelXbrl.nameConcepts.keys():\n        words = []\n        wordChars = []\n        lastchar = ""\n        for c in name:\n            if c.isupper() and lastchar.islower(): # it\'s another word\n                partialName = \'\'.join(wordChars)\n                if partialName in modelXbrl.nameConcepts:\n                    words.append(partialName)\n            wordChars.append(c)\n            lastchar = c\n        if words:\n            self.nameWordsTable[name] = words\n    self.modelXbrl.profileActivity("... build name words table", minTimeToShow=1.0)\n    ' #NEWLINE# ordersRelationshipSet = modelXbrl . relationshipSet ( 'http://www.nltaxonomie.nl/2011/arcrole/linkrole-order' ) #NEWLINE# presLinkroleNumberURI = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# presLinkrolesCount = 0 #NEWLINE# for countLinkroles in ( True , False ) : #NEWLINE# #INDENT# for ( roleURI , modelRoleTypes ) in modelXbrl . roleTypes . items ( ) : #NEWLINE# #INDENT# for modelRoleType in modelRoleTypes : #NEWLINE# #INDENT# if ( XbrlConst . qnLinkPresentationLink in modelRoleType . usedOns ) : #NEWLINE# #INDENT# if countLinkroles : #NEWLINE# #INDENT# presLinkrolesCount += 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not ordersRelationshipSet ) : #NEWLINE# #INDENT# modelXbrl . error ( 'SBR.NL.2.2.3.06' , _ ( 'Presentation linkrole %(linkrole)s missing order number relationship set' ) , modelObject = modelRoleType , linkrole = modelRoleType . roleURI ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# order = None #NEWLINE# for orderNumRel in ordersRelationshipSet . fromModelObject ( modelRoleType ) : #NEWLINE# #INDENT# order = getattr ( orderNumRel . toModelObject , 'xValue' , '(noPSVIvalue)' ) #NEWLINE# if ( order in presLinkroleNumberURI ) : #NEWLINE# #INDENT# modelXbrl . error ( 'SBR.NL.2.2.3.06' , _ ( 'Presentation linkrole order number %(order)s of %(linkrole)s also used in %(otherLinkrole)s' ) , modelObject = modelRoleType , order = order , linkrole = modelRoleType . roleURI , otherLinkrole = presLinkroleNumberURI [ order ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# presLinkroleNumberURI [ order ] = modelRoleType . roleURI #NEWLINE# #UNINDENT# #UNINDENT# if ( not order ) : #NEWLINE# #INDENT# modelXbrl . error ( 'SBR.NL.2.2.3.06' , _ ( 'Presentation linkrole %(linkrole)s missing order number' ) , modelObject = modelRoleType , linkrole = modelRoleType . roleURI ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( countLinkroles and ( presLinkrolesCount < 2 ) ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# for ( arcroleURI , modelRoleTypes ) in modelXbrl . arcroleTypes . items ( ) : #NEWLINE# #INDENT# for modelRoleType in modelRoleTypes : #NEWLINE# #INDENT# if ( ( not arcroleURI . startswith ( 'http://xbrl.org/' ) ) and ( modelRoleType . modelDocument . targetNamespace not in val . disclosureSystem . baseTaxonomyNamespaces ) and ( ( not modelRoleType . genLabel ( lang = 'nl' ) ) or ( not modelRoleType . genLabel ( lang = 'en' ) ) ) ) : #NEWLINE# #INDENT# modelXbrl . error ( 'SBR.NL.2.2.4.02' , _ ( 'ArcroleType missing nl or en generic label: %(arcrole)s' ) , modelObject = modelRoleType , arcrole = arcroleURI ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# for domainElt in val . typedDomainElements : #NEWLINE# #INDENT# if ( domainElt . modelDocument . targetNamespace not in val . disclosureSystem . baseTaxonomyNamespaces ) : #NEWLINE# #INDENT# if ( not domainElt . genLabel ( fallbackToQname = False , lang = 'nl' ) ) : #NEWLINE# #INDENT# modelXbrl . error ( 'SBR.NL.2.2.8.01' , _ ( 'Typed dimension domain element %(concept)s must have a generic label' ) , modelObject = domainElt , concept = domainElt . qname ) #NEWLINE# #UNINDENT# if ( ( domainElt . type is not None ) and ( domainElt . type . localName == 'complexType' ) ) : #NEWLINE# #INDENT# modelXbrl . error ( 'SBR.NL.2.2.8.02' , _ ( 'Typed dimension domain element %(concept)s has disallowed complex content' ) , modelObject = domainElt , concept = domainElt . qname ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# modelXbrl . profileActivity ( '... SBR role types and type facits checks' , minTimeToShow = 1.0 ) #NEWLINE# for docs in modelXbrl . namespaceDocs . values ( ) : #NEWLINE# #INDENT# for doc in docs : #NEWLINE# #INDENT# for ( prefix , NS ) in doc . xmlRootElement . nsmap . items ( ) : #NEWLINE# #INDENT# if ( ( NS in val . namespacePrefix ) and ( prefix != val . namespacePrefix [ NS ] ) ) : #NEWLINE# #INDENT# modelXbrl . error ( 'SBR.NL.3.2.4.04' , _ ( 'The assigned namespace prefix %(assignedPrefix)s for the schema that declares the targetnamespace %(namespace)s, MUST be adhired by all other NT schemas, referencedPrefix: %(referencedPrefix)s' ) , modelObject = doc . xmlRootElement , namespace = countLinkroles , assignedPrefix = val . namespacePrefix . get ( NS , '' ) , referencedPrefix = prefix ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# labelsRelationshipSet = modelXbrl . relationshipSet ( ( XbrlConst . conceptLabel , XbrlConst . elementLabel ) ) #NEWLINE# standardXbrlSchmas = _DICT_SET ( XbrlConst . standardNamespaceSchemaLocations . values ( ) ) #NEWLINE# baseTaxonomyNamespaces = val . disclosureSystem . baseTaxonomyNamespaces #NEWLINE# for eltDef in modelXbrl . qnameConcepts . values ( ) : #NEWLINE# #INDENT# if ( ( not ( eltDef . isItem or eltDef . isTuple or eltDef . isLinkPart ) ) and ( eltDef . qname . namespaceURI not in baseTaxonomyNamespaces ) ) : #NEWLINE# #INDENT# eltDefHasDefaultLangStandardLabel = False #NEWLINE# for modelLabelRel in labelsRelationshipSet . fromModelObject ( eltDef ) : #NEWLINE# #INDENT# modelLabel = modelLabelRel . toModelObject #NEWLINE# role = modelLabel . role #NEWLINE# text = modelLabel . text #NEWLINE# lang = modelLabel . xmlLang #NEWLINE# if ( text and lang and val . disclosureSystem . defaultXmlLang and lang . startswith ( val . disclosureSystem . defaultXmlLang ) ) : #NEWLINE# #INDENT# if ( role in ( XbrlConst . standardLabel , XbrlConst . genStandardLabel ) ) : #NEWLINE# #INDENT# eltDefHasDefaultLangStandardLabel = True #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( not eltDefHasDefaultLangStandardLabel ) : #NEWLINE# #INDENT# modelXbrl . error ( 'SBR.NL.3.2.15.01' , _ ( 'XML nodes that can appear in instances MUST have standard labels in the local language: %(element)s' ) , modelObject = eltDef , element = eltDef . qname ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# del val . prefixNamespace , val . namespacePrefix , val . idObjects