Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The entity "nbsp" was referenced, but not declared #58

Closed
FabioBo opened this issue Nov 29, 2017 · 7 comments
Closed

The entity "nbsp" was referenced, but not declared #58

FabioBo opened this issue Nov 29, 2017 · 7 comments

Comments

@FabioBo
Copy link

FabioBo commented Nov 29, 2017

Hi, i've a xbrl file that contain this row:
....
<font size="2" face="Times New Roman"><span style="font-size: 11.0pt"> </span></font>
....
when we execute Instance.FromFile(....) we have this error:The entity "nbsp" was referenced, but not declared.
Have you any suggestion fir this issue?
Thank you

@dgm9704
Copy link
Owner

dgm9704 commented Nov 30, 2017 via email

@FabioBo
Copy link
Author

FabioBo commented Nov 30, 2017

Hi, thank you for your quick answer.
Our file is (i mean) a normal xbrl, the problem is in the keyword CommentoDisponibilitaUtilizzoPatrimonioNetto
How could i send you a sample xbrl file?
Thank you

@dgm9704
Copy link
Owner

dgm9704 commented Nov 30, 2017 via email

@dgm9704
Copy link
Owner

dgm9704 commented Nov 30, 2017

Silly me, I was answering from my phone and didn't realize that you can attach file here to the issue. (provided that it doesn't contain anything sensitive)

@dgm9704
Copy link
Owner

dgm9704 commented Nov 30, 2017

I got the file now thank you.
The problem is that Diwen.Xbrl sees the content of fact which is html and tries to process it like it was part of the xbrl.
That is the reason for the error you see, and you would see countless others once you got past that.
Options for getting around this:

  • encode any content (not part of the xbrl) that is markup (html) with function such as HTMLEncode ?
  • enclose any markup content in CDATA section ?
  • check if the specifications for the specific taxonomy / reporting framework have some clues as how to handle this content (component has only been tested with EBA and EIOPA ITS and some SBR)
  • modify Diwen.Xbrl to better understand that specific type of XBRL reporting ?
    I need to spend a few hours on my day job, but will get back to this.

@FabioBo
Copy link
Author

FabioBo commented Nov 30, 2017 via email

@FabioBo
Copy link
Author

FabioBo commented Nov 30, 2017

Hi, currently we have "replaced" &nbsp from html portion of text because of we are only interested on a few reporting information and not in this text.
Here is our "workaround":
var first = Instance.FromFile(document); String xmlString = System.IO.File.ReadAllText(document); xmlString = xmlString.Replace("&nbsp", ""); var first = Instance.FromXml(xmlString);
we have removed "&nbsp" from original document and replace Instance.FromFile with Instance.FromXml
Thank you

@FabioBo FabioBo closed this as completed Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants