Skip to content

Commit

Permalink
inline nonFraction (textblock) content:
Browse files Browse the repository at this point in the history
inline 1.1 exclude
encode nested attribute content (amp and quote)
block spurious nested IX facts
  • Loading branch information
Herm Fischer authored and Herm Fischer committed Jun 14, 2015
1 parent 9e2f8e8 commit 6686e17
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arelle/XmlUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def innerTextNodes(element, ixExclude, ixEscape, ixContinuation):
for child in element.iterchildren():
if isinstance(child,ModelObject) and (
not ixExclude or
(child.localName != "exclude" and child.namespaceURI != "http://www.xbrl.org/2008/inlineXBRL")):
not (child.localName == "exclude" and child.namespaceURI in XbrlConst.ixbrlAll)):
firstChild = True
for nestedText in innerTextNodes(child, ixExclude, ixEscape, ixContinuation):
if firstChild and ixEscape:
Expand All @@ -188,13 +188,16 @@ def innerTextNodes(element, ixExclude, ixEscape, ixContinuation):
yield contText

def escapedNode(elt, start, empty):
if elt.namespaceURI in XbrlConst.ixbrlAll:
return '' # do not yield XML for nested facts
s = ['<']
if not start and not empty:
s.append('/')
s.append(str(elt.qname))
if start or empty:
for n,v in elt.items():
s.append(' {0}="{1}"'.format(qname(elt,n),v))
s.append(' {0}="{1}"'.format(qname(elt,n),
v.replace("&","&amp;").replace('"','&quot;')))
if not start and empty:
s.append('/')
s.append('>')
Expand Down

0 comments on commit 6686e17

Please sign in to comment.