Looking for a Java Web Start JNLP 1.5 DTD?
Thursday, October 21st, 2004Sun has created a DTD for the JNLP file format, but it’s only posted inside a PDF file on the associated JSR-56 page (on pages 62 to 75). Also, it contains a syntax error. So, I’ve extracted and fixed it using pdftohtml, and I’ve posted it on my website.
I have made the JNLP DTD available at http://kano.net/dtd/jnlp-1.5.dtd. To use it in your JNLP files, the beginning of your JNLP file should look like this:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Discriptor 1.1//EN" "http://kano.net/dtd/jnlp-1.5.dtd"> <jnlp ...
You might have noticed that Sun spelled “descriptor” as “discriptor.” I didn’t change this in my version because I don’t want to introduce any incompatibility if Sun posts the DTD themselves.
The PDF file I mentioned before suggests this incorrect DOCTYPE declaration:
<!DOCTYPE jnlp-discriptor PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Discriptor 1.1"//EN">
This declaration doesn’t make sense because the root element of a JNLP File is <jnlp>, not <jnlp-discriptor>. Anyway, this DOCTYPE declaration should not be used.
Bug 4404764 on the Java Bug Parade, called “DTD is not available on java.sun.com”, is marked “Fixed,” indicating that the official DTD is posted on Sun’s site. However, the bug lists several URL’s where they thought it might go, but it does not exist at any of those URL’s. This is why I’ve posted it myself.