chrome URIs / chrome registry
The DTD file is referenced by a chrome URI, e.g. "chrome://communicator/locale/openLocation.dtd".
All chrome URIs have the form of chrome://<package>/{content|locale|skin}/<path-to-file>.
To which file on disk (or in a .jar package) this URI resolves, is determined by the chrome registry:
The chrome registry knows which locales (e.g. en-US, de-AT, it-IT) are installed for which packages
(e.g. communicator, navigator, messenger), and which locale is selected for those packages.
As a side note, the chrome registry stores the same information for themes as well.
Example directory tree with files
- mozilla
- chrome
- comm
- en-US.jar
- locale
- en-US
- communicator
- openLocation.dtd
- openLocation.properties
- global
- brand.dtd
- brand.properties
- navigator
- de-AT.jar
- communicator
- openLocation.dtd
- openLocation.properties
- global
- brand.dtd
- brand.properties
- navigator
Sample chrome registry (main chrome.rdf + profile's chrome.rdf)
- ...
- <RDF:Seq about="urn:mozilla:package:root">
- <RDF:li resource="urn:mozilla:package:communicator"/>
- <RDF:li resource="urn:mozilla:package:global"/>
- ...
- </RDF:Seq>
- <RDF:Description about="urn:mozilla:package:communicator" c:baseURL="resource:/chrome/comm/content/communicator/" c:localeVersion="1.3b" ...>
- <c:selectedLocale resource="urn:mozilla:locale:de-AT:communicator"/>
- </RDF:Description>
- <RDF:Description about="urn:mozilla:package:global" c:baseURL="jar:resource:/chrome/toolkit.jar!/content/global/" c:localeVersion="1.3b" ...>
- <c:selectedLocale resource="urn:mozilla:locale:de-AT:global"/>
- </RDF:Description>
- <RDF:Seq about="urn:mozilla:locale:root">
- <RDF:li resource="urn:mozilla:locale:de-AT"/>
- <RDF:li resource="urn:mozilla:locale:AT"/>
- <RDF:li resource="urn:mozilla:locale:en-US"/>
- <RDF:li resource="urn:mozilla:locale:US"/>
- </RDF:Seq>
- <RDF:Description about="urn:mozilla:locale:en-US:communicator" c:baseURL="jar:resource:/chrome/en-US.jar!/locale/en-US/communicator/" c:localeVersion="1.3b">
- <c:package resource="urn:mozilla:package:communicator"/>
- </RDF:Description>
- <RDF:Description about="urn:mozilla:locale:en-US:global" c:baseURL="jar:resource:/chrome/en-US.jar!/locale/en-US/global/" c:localeVersion="1.3b">
- <c:package resource="urn:mozilla:package:global"/>
- </RDF:Description>
- <RDF:Description about="urn:mozilla:locale:de-AT:communicator" c:baseURL="jar:resource:/chrome/de-AT.jar!/communicator/" c:localeVersion="1.3b">
- <c:package resource="urn:mozilla:package:communicator"/>
- </RDF:Description>
- <RDF:Description about="urn:mozilla:locale:de-AT:global" c:baseURL="jar:resource:/chrome/de-AT.jar!/global/" c:localeVersion="1.3b">
- <c:package resource="urn:mozilla:package:global"/>
- </RDF:Description>