Using Connexions XML Schemas
Suppose you wish to use Connexions's XML languages on your own system. If you have a Debian or Ubuntu system, it's pretty simple: add our repository to your APT sources list (edit /etc/apt/sources.list, or use synaptic, etc.):
deb http://rhaptos.org/debian binary/The Connexions Debian packages for our XML languages handle two important tasks:
- they get the various files (schemas, stylesheets, etc.) installed in the expected locations on the local filesystem; and
- they adjust your XML catalog to be able to resolve public and system identifiers and network URLs that refer to our XML files to point to your local copies of these files.
Thus, if you are running a system that cannot install Debian-style software packages in a fully-featured way, you will have to handle these tasks yourself when you install our XML languages. Fortunately, we provide two versions of the top-level schemas for both CNXML and CollXML: one version refers to the included component schema files via 'http://' URLs, which means that, unless your system has XML catalog entries to enable the resolution of these URLs to files on your local filesystem, your XML tools will retrieve the needed files over the network via HTTP from Connexions servers each time they need a schema or stylesheet component that is referred to by a 'http://' URL. The other version of the top-level schema, however, uses local filesystem URLs beginning with 'file:///usr/share/xml' to point to the component files. These stylesheets don't require that your XML catalog be able to resolve 'http://' URLs and system identifiers for our files; in fact, they don't require an XML catalog at all to function properly. They just require that the actual files be installed in the locations they point to. The stylesheets that use local filesystem URLs will have the string '-jing' in their filenames, since we use Jing for RNG validation but its released versions don't support OASIS XML catalogs. Use these files if you are validating without the benefit of XML catalog support.
There is a complication: the filesystem layout of the subversion checkouts of our XML languages does not correspond to the layout of the XML files installed in their install destinations. You can use the debian/*.install files in each XML language checkout to see where to copy each sort of file for the final installation. In brief, each subversion module for an XML language will have some or all of the following subdirectories:
debian/ Debian packaging apparatus DTD/ DTD files, if any schema/ Relax NG and XML Schema files spec/ Language specification, if any style/ XSLT stylesheets test/ Test scripts and files tools/ Utilities for developing and checking schema filesThe XML catalog delegate files are in the root directory of the subversion checkout.
The standard Debian pattern for XML language installation looks like this:
/usr/share/xml/<language abbrev>/Within this directory, you will see some or all of the following subdirectories:
misc/ Language specification, if any schema/ DTDs, Relax NG and XML Schema files stylesheet/ rendering, upgrade, and localization stylesheets
Within the 'schema' subdirectory that contains subdirectories for each of DTD ('dtd'), XML schema ('xsd'), and Relax NG schema ('rng'), each of which will have subdirectories for the language version in question. So the 0.7 release of CNXML, the paths to the top-level RNG schemas will look like this:
/usr/share/xml/cnxml/schema/rng/0.7/cnxml.rng /usr/share/xml/cnxml/schema/rng/0.7/cnxml-jing.rngAs noted above, the cnxml-jing.rng file makes use of URLs with absolute local filesystem paths for included component files, so it can be used without the benefit of XML catalogs and without the need for a network connection.
Neither CNXML 0.6 nor 0.7 have DTDs or XML schema files, so there will be no 'schema/{dtd,xsd}/{0.6,0.7}' directories.
For the 1.0 release of CollXML, the paths to the top-level RNG schema files will look like this:
/usr/share/xml/collxml/schema/rng/1.0/collxml.rng /usr/share/xml/collxml/schema/rng/1.0/collxml-jing.rng
If your system isn't able to consume Debian packaging, you will need to install the following from subversion:
