Module Expr Str Import alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Expr Str Assign NameStore Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr CompareIn AttributeLoad NameLoad attr TupleLoad Str Str If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If CompareIn NameLoad TupleLoad Str Str body Return FunctionDef arguments args NameParam NameParam defaults body For TupleStore NameStore NameStore NameStore NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword BoolOpOr NameLoad AttributeLoad NameLoad attr keyword NameLoad If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If CompareNotEq NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad If CompareNotIn AttributeLoad NameLoad attr Set Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str body Raise Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad orelse If BoolOpAnd AttributeLoad NameLoad attr CompareNotIn AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str orelse If CompareNotIn NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad orelse If UnaryOpNot Call NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str Call NameLoad Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body For NameStore Call AttributeLoad NameLoad attr body If BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr If CompareEq NameLoad Str body Expr Call NameLoad NameLoad TupleLoad TupleLoad Str NameLoad AttributeLoad NameLoad attr NameLoad TupleLoad Str NameLoad AttributeLoad NameLoad attr NameLoad TupleLoad Str NameLoad AttributeLoad NameLoad attr NameLoad orelse If CompareEq NameLoad Str body Expr Call NameLoad NameLoad TupleLoad TupleLoad Str NameLoad AttributeLoad NameLoad attr NameLoad TupleLoad Str NameLoad AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad decorator_list Expr Call NameLoad NameLoad decorator_list
N/A N/A 
Created on Apr 10, 2013

@author: Mark V Systems Limited
(c) Copyright 2013 Mark V Systems Limited, All rights reserved.
 N/A time arelle ModelXbrl XbrlConst XmlValidate arelle.ModelObject ModelObject arelle.ModelDtsObject ModelAttribute ModelConcept ModelType arelle.ModelValue qname arelle.Locale format_string lxml etree N/A XMLSchemaURI http://www.w3.org/2001/XMLSchema.xsd validate N/A N/A modelDocument schemaElement targetNamespace N/A N/A N/A modelXbrl N/A modelDocument modelXbrl N/A modelManager N/A modelXbrl modelManager N/A 
    if not hasattr(modelManager, "xmlSchemaSchema"):
        if getattr(modelManager, "modelXmlSchemaIsLoading", False):
            return
        startedAt = time.time()
        modelManager.modelXmlSchemaIsLoading = True
        priorValidateDisclosureSystem = modelManager.validateDisclosureSystem
        modelManager.validateDisclosureSystem = False
        modelManager.xmlSchemaSchema = ModelXbrl.load(modelManager, XMLSchemaURI, _("validate schema"))
        modelManager.validateDisclosureSystem = priorValidateDisclosureSystem
        '''
        filePath = modelManager.cntlr.webCache.getfilename(XMLSchemaURI)
        modelManager.showStatus(_("lxml compiling XML Schema for Schemas"))
        modelManager.xmlSchemaSchema = etree.XMLSchema(file=filePath)
        '''
        modelXbrl.info("info:xmlSchemaValidator", format_string(modelXbrl.modelManager.locale, 
                                            _("schema for XML schemas loaded into lxml %.3f secs"), 
                                            time.time() - startedAt),
                                            modelDocument=XMLSchemaURI)
        modelManager.showStatus("")
        del modelManager.modelXmlSchemaIsLoading
    '''
    #startedAt = time.time()
    #validationSuccess = modelManager.xmlSchemaSchema.validate(schemaElement)
    #modelXbrl.info("info:xmlSchemaValidator", format_string(modelXbrl.modelManager.locale, 
    #                                    _("schema validated in %.3f secs"), 
    #                                    time.time() - startedAt),
    #                                    modelDocument=modelDocument)
    if not validationSuccess:
        for error in modelManager.xmlSchemaSchema.error_log:
            modelXbrl.error("xmlSchema:syntax",
                    _("%(error)s, %(fileName)s, line %(line)s, column %(column)s, %(sourceAction)s source element"),
                    modelObject=modelDocument, fileName=modelDocument.basename, 
                    error=error.message, line=error.line, column=error.column, sourceAction=("xml schema"))
        modelManager.xmlSchemaSchema._clear_error_log()
    '''
     N/A declaredNamespaces N/A set N/A N/A doc targetNamespace N/A N/A doc docRef N/A N/A N/A modelDocument referencesDocument items N/A N/A docRef referenceType N/A include import N/A targetNamespace N/A N/A N/A N/A declaredNamespaces add targetNamespace N/A N/A targetNamespace N/A http://www.w3.org/2001/XMLSchema http://www.w3.org/XML/1998/namespace N/A N/A resolvedQnames N/A N/A elt qnDefs N/A N/A N/A N/A attrName attrType mdlObjects isQualifiedForm qnDefs N/A N/A attr N/A N/A elt get attrName N/A N/A attr None N/A N/A N/A N/A qnValue N/A N/A elt schemaNameQname attr isQualifiedForm N/A isQualifiedForm N/A elt isQualifiedForm prefixException ValueError N/A N/A N/A qnValue namespaceURI N/A XbrlConst xsd N/A N/A N/A attrType ModelType N/A N/A N/A ValueError N/A N/A {0} can not have xml schema namespace format attrName N/A N/A N/A qnValue localName N/A anySimpleType anyType string boolean float double decimal duration dateTime time date gYearMonth gYear gMonthDay gDay gMonth hexBinary base64Binary anyURI QName NOTATION normalizedString token language IDREFS ENTITIES NMTOKEN NMTOKENS NCName ID IDREF integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger N/A N/A N/A ValueError N/A N/A {0} qname {1} not recognized format attrName attr N/A N/A N/A N/A qnValue namespaceURI N/A N/A qnValue namespaceURI declaredNamespaces N/A N/A N/A ValueError Namespace is not defined by an import or include element N/A N/A N/A qnValue mdlObjects N/A N/A N/A ValueError N/A N/A {0} is not defined format attrName N/A N/A N/A N/A isinstance N/A mdlObjects N/A qnValue attrType N/A N/A N/A ValueError N/A N/A {0} not resolved to expected object type format attrName N/A N/A N/A ValueError N/A err N/A N/A N/A N/A modelXbrl error xmlSchema:valueError N/A _ Element attribute %(typeName)s value error: %(value)s, %(error)s modelObject elt typeName attrName value attr error err N/A checkSchemaElements N/A N/A parentElement N/A N/A N/A elt N/A N/A parentElement iterchildren N/A N/A N/A N/A isinstance elt ModelObject N/A N/A elt namespaceURI N/A XbrlConst xsd N/A N/A ln N/A elt localName N/A N/A ln element N/A N/A N/A resolvedQnames elt N/A N/A ref ModelConcept N/A modelXbrl qnameConcepts False N/A substitutionGroup ModelConcept N/A modelXbrl qnameConcepts True N/A type ModelType N/A modelXbrl qnameTypes True N/A N/A N/A ln attribute N/A N/A N/A resolvedQnames elt N/A N/A ref ModelAttribute N/A modelXbrl qnameAttributes False N/A type ModelType N/A modelXbrl qnameTypes True N/A N/A checkSchemaElements elt N/A N/A N/A checkSchemaElements schemaElement N/A