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

Trying to parse us-gaap taxonomy xsd, parser throws "namespace for prefix 'xlink' has not been declared" #37

Closed
ramonchu opened this issue Dec 12, 2021 · 1 comment

Comments

@ramonchu
Copy link

The official US accounting standard XSD schema can't be parsed.
You can download schema on: https://xbrl.fasb.org/us-gaap/2021/us-gaap-2021-01-31.zip

At run time, the parser throws:

java.lang.RuntimeException: Namespace for prefix 'xlink' has not been declared.
at java.xml/com.sun.org.apache.xml.internal.serializer.SerializerBase.getNamespaceURI(SerializerBase.java:784)
at java.xml/com.sun.org.apache.xml.internal.serializer.SerializerBase.addAttribute(SerializerBase.java:379)
at java.xml/com.sun.org.apache.xml.internal.serializer.ToUnknownStream.addAttribute(ToUnknownStream.java:269)
at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:199)
at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:92)
at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:712)
at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:774)
at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:370)
at org.xmlet.xsdparser.xsdelements.XsdAbstractElement.xsdRawContentParse(XsdAbstractElement.java:369)

@lcduarte
Copy link
Member

Hello,

I've identified the issue, it was related with namespace awareness being disabled by default. I've tried to parse the entire/us-gaap-entryPoint-all-2021-01-31.xsd and it worked. I've deployed a new version, 1.2.0, with the fix.

Thanks for using the library, sometimes it's unexpected to see how this is being used.

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