question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lemminx not able to fetch my dtd file

See original GitHub issue

I am trying to use Lemminx to validate my fontconfig XML file. However, it keeps throwing the error that it cannot find the DTD file. fonts.dtd is a systemwide file on Linux machines and is located in /usr/share/xml/fontconfig/fonts.dtd. Is there any way I can tell Lemminx to recognize the fontconfig urn?

image

Could you please let me know how I can fix this?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
angelozerrcommented, Sep 4, 2022

Glad you fixed yoir issues.

Thnank you for your feedback and I hope you will continue to enjoy with lemminx.

1reaction
fbriconcommented, Sep 1, 2022

You need to define a catalog that maps urn:fontconfig:fonts.dtd to /usr/share/xml/fontconfig/fonts.dtd. So, first create a catalog.xml on your machine, containing:

<!DOCTYPE catalog
    PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
    "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
    <system systemId="urn:fontconfig:fonts.dtd" uri="/usr/share/xml/fontconfig/fonts.dtd" />
</catalog>

You then need to pass the following setting to lemminx:

"xml.catalogs": [ "/path/to/catalog.xml"]
Read more comments on GitHub >

github_iconTop Results From Across the Web

Outline for DTD file is messed up #226 - eclipse/lemminx
It seems it uses location, so it's not possible to display attributes after a given element as a tree. That's why I display...
Read more >
Hibernate error, possibly with DTD declaration
In a separate project where I am using the XML configuration file for Hibernate, I did the same migration, and it went fine....
Read more >
ServerTools (WTP) » Local DTD for web.xml
folder inside of my web-inf directory and placed the web-app_2_3.dtd file inside this folder. Then I change the uri for the dtd on...
Read more >
redhat-developer/vscode-xml
I would like to know how to validate my xml against an xsd ... we are working on it to provide a quick...
Read more >
How To Solve- org.testng.TestNGException - YouTube
How To Solve- org.testng.TestNGException: TestNG by default disables loading DTD from unsecured Urls.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found