NFO files XSD or DTD - kodi

I'm writing a tool that modifies metadata of existing NFO files and adds new metadata. Unfortunately I cannot find XSD or DTD defining the format of NFO files.
Where can I find such an XSD / DTD please ?

Related

Eclipse associating *.mod files with DTD, validation fails for Jetty mod file

I recently brought an existing maven project into Eclipse 2020-03. The project contains a jetty folder which itself contains a file:
modules/somefile.mod
The *.mod file pattern seems to be associated with the DTD content type, and this association is "locked". Because my file is not a DTD, it fails the validation.
Eclipse's Bugzilla lists a 7-year old bug, Bug 420688, which describes this problem, but the workarounds there don't seem to work for me.
The validation error I get is
The markup declarations contained or pointed to by the document type declaration must be well-formed.
Is there a way to
Disable the validation of this particular file, or preferably
Disassociate it from the DTD content type?
Thanks for any advice or direction.

Eclipse plugin to automatically generate a template TLD file

Is there and Eclipse plugin to automatically generate a template TLD file (.tld) when writing custom tags?
Thanks to nitind answer :
Eclipse:
You can create one using the New XML File wizard; the DTD and schema files for tag libraries should be in the built-in catalog.
If you're building .tag files, you won't need one.

How to add a DTD to XML Catalog in Eclipse?

I try to add a DTD created by myself to the XML Catalog in Eclipse.
Which values do I have to enter into the fields?
Where do I have to locate the DTD in best case?
I have multiple Java projects in my Eclipse IDE. So what would be the best practice to make the DTD accessible for all projects?
I tried to use Window-->Preferences-->XML-->XML Catalog-->Add to get a catalog entry under User Specified Entries.
Currently it looks like this:
Entry element: System
Location: cc-utils-test-db-3.1-SNAPSHOT/src/main/resources/cc_dataset.dtd
URI: platform:/resource/cc-utils-test-db-3.1-SNAPSHOT/src/main/resources/cc_dataset.dtd
Key type: System ID
Key: dataset file:////services/utils/test-db/src/main/resources/cc_dataset.dtd
Referencing the DTD in the XML file, Eclipse complains:
No grammar constraints (DTD or XML Schema) referenced in the document.
and
The file cannot be validated as the XML definition "C:\develop\Projects\...\ws\services\utils\test-db\src\main\resources\globaltestdata\cc\cc_dataset.dtd (The system can't find the specified file)" that is specified as describing the syntax of the file cannot be located.
(I have partially translated from German into English.)
How do I have to make the XML Catalog entry that the DTD can be referenced (in best case over all projects in Eclipse IDE) to validate the XML file when using
<!DOCTYPE dataset SYSTEM "cc_dataset.dtd">
in it.
Where should be to DTD located (in the filesystem) to make it best accessible?
I changed my XMLC atalog entry:
Entry element: System
Location: cc-utils-test-db-3.1-SNAPSHOT/src/main/resources/cc_dataset.dtd
URI: platform:/resource/cc-utils-test-db-3.1-SNAPSHOT/src/main/resources/cc_dataset.dtd
Key type: System ID
Key: ccdataset
The reference in the XML file:
<!DOCTYPE dataset SYSTEM "ccdataset">
Eclipse's reaction:
The file cannot be validated as the XML definition "C:\develop\Projects\EOBR\ws\services\utils\test-db\src\main\resources\globaltestdata\cc\ccdataset (Das System kann die angegebene Datei nicht finden)" that is specified as
describing the syntax of the file cannot be located.
cc_dataset.dtd is located at C:\develop\Projects\EOBR\ws\services\utils\test-db\src\main\resources\ i don't know why Eclipse extends this to the path of the XML file with the declaration.

How Eclipse download and store XSD external files?

When I open XSD file in Eclipse( in XSD Editor), it download all xsd:import's are contained in file. But if I don't have internet, editor cannot download, it's obvious. In preferences(Window -> Preferences) is XML-> XML Catalog. Is possible add my xsd:import (xsd files) to catalog and Eclipse will use it in offline mode?
Yes you can add your xsd/dtd file to the catalog.
I did it like this (for test) and eclipse does not complain:
Entry element: URI
Location: C:\Users\me\Desktop\log4j.dtd
URI: file:///C:/Users/me/Desktop/log4j.dtd
Key type: URI
Key: http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd
I used the native URL in my log4j.xml afterwards
<!DOCTYPE log4j:configuration SYSTEM "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
I suppose this should also work with xsd files.
This comes from another answer from me.

Any way to get the file path to the source file of an embedded resource at runtime?

I am working on a VirtualPathProvider which will let me load embedded resources (ER) (such as .js or .css files) from a referenced assembly. I would like to be able to change the .js files and .css files at runtime and have the changes reflected without having to refresh the whole page. I can do this if I have the path to the resource file as I can use that as the source instead of the ER.
Is there any way to extract the source code location of an assemblies csproj or an embedded resource at runtime, perhaps from the .pdb file, and if so, how would I do it in c#? Thanks!