Skip to content

Commit

Permalink
ARELLE 350: provide consistent message code prefixes for
Browse files Browse the repository at this point in the history
xmlSchema: (replacing xmlValidation: with xmlSchema:) and for
inline validation messages (replacing those not ix:... with ix:
prefixes).
  • Loading branch information
Herm Fischer authored and Herm Fischer committed Apr 21, 2015
1 parent b01e01a commit d723b1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion arelle/ModelDocument.py
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ def inlineXbrlDiscover(self, htmlElement):
elif ixNS != inlineElement.namespaceURI:
conflictingNSelts.append(inlineElement)
if conflictingNSelts:
self.modelXbrl.error("ix.3.1:multipleIxNamespaces",
self.modelXbrl.error("ix:multipleIxNamespaces",
_("Multiple ix namespaces were found"),
modelObject=conflictingNSelts)
self.ixNStag = ixNStag = "{" + ixNS + "}"
Expand Down
4 changes: 2 additions & 2 deletions arelle/XhtmlValidate.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,12 @@ def copyNonIxChildren(fromElt, toElt):
dtd = DTD(fh)
try:
if not dtd.validate( ixToXhtml(elt) ):
modelXbrl.error("xhmlDTD:elementUnexpected",
modelXbrl.error("ix:DTDelementUnexpected",
_("%(element)s error %(error)s"),
modelObject=elt, element=elt.localName.title(),
error=', '.join(e.message for e in dtd.error_log.filter_from_errors()))
except XMLSyntaxError as err:
modelXbrl.error("xmlDTD:error",
modelXbrl.error("ix:DTDerror",
_("%(element)s error %(error)s"),
modelObject=elt, element=elt.localName.title(), error=dtd.error_log.filter_from_errors())

6 changes: 3 additions & 3 deletions arelle/XmlValidate.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def validate(modelXbrl, elt, recurse=True, attrQname=None, ixFacts=False):
errElt = "{0} fact {1}".format(elt.elementQname, elt.qname)
else:
errElt = elt.elementQname
modelXbrl.error("xmlValidation:nilNonNillableElement",
modelXbrl.error("xmlSchema:nilNonNillableElement",
_("Element %(element)s fact %(fact)s type %(typeName)s is nil but element has not been defined nillable"),
modelObject=elt, element=errElt, fact=elt.qname, transform=elt.format,
typeName=modelConcept.baseXsdType if modelConcept is not None else "unknown",
Expand Down Expand Up @@ -159,11 +159,11 @@ def validate(modelXbrl, elt, recurse=True, attrQname=None, ixFacts=False):
typeName=modelConcept.baseXsdType if modelConcept is not None else "unknown",
value=XmlUtil.innerText(elt, ixExclude=True))
elif isAbstract:
modelXbrl.error("xmlValidation:abstractElement",
modelXbrl.error("xmlSchema:abstractElement",
_("Element %(element)s has abstract declaration, value: %(value)s"),
modelObject=elt, element=errElt, error=str(err), value=elt.text)
else:
modelXbrl.error("xmlValidation:valueError",
modelXbrl.error("xmlSchema:valueError",
_("Element %(element)s error %(error)s value: %(value)s"),
modelObject=elt, element=errElt, error=str(err), value=elt.text)
elt.sValue = elt.xValue = text = INVALIDixVALUE
Expand Down

0 comments on commit d723b1b

Please sign in to comment.