This section is just a primer. The reference documentation about this topic is really XMLmind XML Editor - Configuration and Deployment.
A document type declaration (<!DOCTYPE>) can be used to associate a DTD to a document. Attributes xsi:schemaLocation/xsi:noNamespaceSchemaLocation can be used to associate W3C XML Schemas to a document. But there is no standard way to associate a RELAX NG schema to a document. Therefore this association must be made using an external specification such as the Namespace Routing Language (NRL).
In the case of XMLmind XML Editor, this external specification is simply a configuration element called relaxng.
XHTML example:
<configuration name="XHTML Strict [RELAX NG]"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.xmlmind.com/xmleditor/schema/configuration">
<include location="xxe-config:schema/ns_xhtml.incl" />
<detect>
<rootElementNamespace>http://www.w3.org/1999/xhtml</rootElementNamespace>
</detect>
<relaxng location="xxe-config:common/rng/xhtml1/xhtml-strict.rng" />
<preserveSpace elements="html:pre html:style html:script" />
<css name="XHTML" location="xhtml_rng.css" />
<template name="Page" location="page.html" />
</configuration>The | |
Unlike the DTD, |
The following processing instruction is a non standard, proprietary, way to associate a document to a RELAX NG schema. Its use should be restricted to testing and other quick and dirty experiments.
DocBook example:
<?xml version="1.0" encoding="UTF-8" ?> <?xxe-relaxng-schema name="-//OASIS//RELAX NG DocBook V4.3//EN"location="http://www.docbook.org/rng/4.3/docbook.rnc" compactSyntax="true" encoding="US-ASCII" ?> <!DOCTYPE article [
<!ENTITY % sgml.features "IGNORE"> <!ENTITY % xml.features "INCLUDE"> <!ENTITY euro "€"> <!ENTITY % dbcent PUBLIC "-//OASIS//ENTITIES DocBook Character Entities V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/dbcentx.mod"> %dbcent; ]> <article> <title></title> <section> <title></title> <para></para> </section> </article>
The examples used in this section come from the following XXE configurations:
Bundled DocBook 5 configurationAllows to create and edit DocBook V5.0 documents conforming to the RELAX NG schema coming from DocBook.org.
This customization the DocBook 5 configuration allows to edit xi:include elements by hand, exactly like any ordinary DocBook element. With the stock DocBook 5 configuration, xi:include elements are transcluded, which means that such elements exist only at document open time and at document save time.
Installing this customization is definitely not recommended for a normal usage of DocBook 5. However, if you need it, you may download it and install it using → .
Add-on "XHTML 1.0/RELAX NG configuration"Allows to create and edit XHTML 1.0 documents conforming to the modular RELAX NG schema written by James Clark.
This RELAX NG-based configuration does not conflict with the bundled DTD-based XHTML configuration. If you want to experiment with it, you may download it and install it using → .
This configuration should be considered as a work in progress. If you just want to author XHTML documents, do not use this RELAX NG-based configuration. Rather use the bundled, DTD-based, configuration which is much more mature.