We use two specialty DTDs in the Docs Project, "rpm-info.dtd" and "entities.dtd". Using SGML, these DTDs define the elements and attributes allowed in an XML file which subscribes to them. When you declare a document type using an XML DTD, you must provide a URI for that DTD, either using the SYSTEM or PUBLIC type. A SYSTEM type declaration is always a file local to your system, and that's the kind we've made use of for our "rpm-info" and "entities" specialty files in the Docs Project. A typical DTD in one of our "rpm-info.xml" files might look like this: <!DOCTYPE rpm-info SYSTEM "../../docs-common/packaging/rpm-info.dtd"> But what happens when docs-common is located somewhere different on another contributor's system? This can now happen since we have different module targets for CVS, such as "release-notes" or "release-notes-devel" or "release-notes-devel-dir". Enter the PUBLIC type declaration. The PUBLIC type is used for a DTD that's available, well, publicly. :-) Things like DocBook XML use PUBLIC DTDs because you can find the DTD on the web in several locations, including: http://www.docbook.org/xml/4.4/docbookx.dtd http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd A PUBLIC DTD always has a "formal public identifier" (FPI) that sets that DTD apart from all others, but allows the same DTD to be published in many different places without any confusion. For instance, the DocBook XML 4.4 is always: "-//OASIS//DTD DocBook XML 4.4//EN" ...no matter whether it's published at www.docbook.org, www.oasis-open.org, or available locally on your Fedora system in your /usr/share/sgml/docbook/xml-dtd-4.4-1.0-30.1/ folder. It's perfectly permissible to make your own FPIs as long as you don't use another DTD's FPI. (And of course you should play nice and not make it hard for people to tell it's yours.) I've recently made the following FPIs for our rpm-info and entities DTD files: "-//Fedora//DTD Docs RPM-INFO V1.0//EN" "-//Fedora//DTD Docs ENTITIES V1.0//EN" I'm also publishing them at the following URLs, respectively: http://docs.fedoraproject.org/dtds/rpm-info.dtd http://docs.fedoraproject.org/dtds/entities.dtd This means that all our rpm-info and entities documents can start using those URIs to avoid pesky validation errors when your docs-common/ directory ends up in a different place than it was when the rpm-info or entities XML was first written. If you have an XML-aware editor that's net-savvy, it will automatically retrieve the DTD over the network and validate using it. -- Paul W. Frields, RHCE http://paul.frields.org/ gpg fingerprint: 3DA6 A0AC 6D58 FEC4 0233 5906 ACDB C937 BD11 3717 Fedora Project: http://fedoraproject.org/wiki/PaulWFrields irc.freenode.net: stickster @ #fedora-docs, #fedora-devel, #fredlug
Attachment:
signature.asc
Description: This is a digitally signed message part
-- fedora-docs-list mailing list fedora-docs-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-docs-list