@c %**end of header
@copying
-
This manual documents nxml-mode, an Emacs major mode for editing
-XML with RELAX NG support.
+XML with RELAX NG support.
-Copyright @copyright{} 2007, 2008 Free Software Foundation, Inc.
+Copyright @copyright{} 2007-2011
+Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
+under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover texts being ``A GNU
Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the
license is included in the section entitled ``GNU Free Documentation
License'' in the Emacs manual.
-(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
-this GNU Manual, like GNU software. Copies published by the Free
-Software Foundation raise funds for GNU development.''
+(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
+modify this GNU manual. Buying copies from the FSF supports it in
+developing GNU and promoting software freedom.''
This document is part of a collection distributed under the GNU Free
Documentation License. If you want to distribute this document
@end quotation
@end copying
-@dircategory Emacs
+@dircategory Emacs editing modes
@direntry
* nXML Mode: (nxml-mode). XML editing mode with RELAX NG support.
@end direntry
@node Top
@top nXML Mode
-This manual documents nxml-mode, an Emacs major mode for editing
-XML with RELAX NG support. This manual is not yet complete.
+@insertcopying
+
+This manual is not yet complete.
@menu
-* Completion::
-* Inserting end-tags::
-* Paragraphs::
-* Outlining::
-* Locating a schema::
-* DTDs::
-* Limitations::
+* Introduction::
+* Completion::
+* Inserting end-tags::
+* Paragraphs::
+* Outlining::
+* Locating a schema::
+* DTDs::
+* Limitations::
@end menu
+@node Introduction
+@chapter Introduction
+
+nXML mode is an Emacs major-mode for editing XML documents. It supports
+editing well-formed XML documents, and provides schema-sensitive editing
+using RELAX NG Compact Syntax. To get started, visit a file containing an
+XML document, and, if necessary, use @kbd{M-x nxml-mode} to switch to nXML
+mode. By default, @code{auto-mode-alist} and @code{magic-fallback-alist}
+put buffers in nXML mode if they have recognizable XML content or file
+extensions. You may wish to customize the settings, for example to
+recognize different file extensions.
+
+Once in nXML mode, you can type @kbd{C-h m} for basic information on the
+mode.
+
+The @file{etc/nxml} directory in the Emacs distribution contains some data
+files used by nXML mode, and includes two files (@file{test-valid.xml} and
+@file{test-invalid.xml}) that provide examples of valid and invalid XML
+documents.
+
+To get validation and schema-sensitive editing, you need a RELAX NG Compact
+Syntax (RNC) schema for your document (@pxref{Locating a schema}). The
+@file{etc/schema} directory includes some schemas for popular document
+types. See @url{http://relaxng.org/} for more information on RELAX NG.
+You can use the @samp{Trang} program from
+@url{http://www.thaiopensource.com/relaxng/trang.html} to
+automatically create RNC schemas. This program can:
+
+@itemize @bullet
+@item
+infer an RNC schema from an instance document;
+@item
+convert a DTD to an RNC schema;
+@item
+convert a RELAX NG XML syntax schema to an RNC schema.
+@end itemize
+
+@noindent To convert a RELAX NG XML syntax (@samp{.rng}) schema to a RNC
+one, you can also use the XSLT stylesheet from
+@url{http://www.pantor.com/download.html}.
+
+To convert a W3C XML Schema to an RNC schema, you need first to convert it
+to RELAX NG XML syntax using the RELAX NG converter tool @code{rngconv}
+(built on top of MSV). See @url{https://github.com/kohsuke/msv}
+and @url{https://msv.dev.java.net/}.
+
+For historical discussions only, see the mailing list archives at
+@url{http://groups.yahoo.com/group/emacs-nxml-mode/}. Please make all new
+discussions on the @samp{help-gnu-emacs} and @samp{emacs-devel} mailing
+lists. Report any bugs with @kbd{M-x report-emacs-bug}.
+
+
@node Completion
@chapter Completion
@example
Possible completions are:
-xml:lang xmlns
+xml:lang xmlns
@end example
@noindent
@kbd{C-c C-o C-d} hides the text content
and subsections of the current section.
@item
-@kbd{C-c C-o C-s} shows the current section
+@kbd{C-c C-o C-s} shows the current section
and all its direct and indirect subsections normally.
@item
@kbd{C-c C-o C-k} shows the headings of the
@samp{rng-schema-locating-files} may be relative. If so, it will
be resolved relative to the document for which a schema is being
located. It is not an error if relative file-names in
-@samp{rng-schema-locating-files} do not not exist. You can use
+@samp{rng-schema-locating-files} do not exist. You can use
@kbd{M-x customize-variable @key{RET} rng-schema-locating-files
@key{RET}} to customize the list of schema locating
files.
schemas that are included with the nXML distribution.
@menu
-* Commands for locating a schema::
-* Schema locating files::
+* Commands for locating a schema::
+* Schema locating files::
@end menu
@node Commands for locating a schema
you visit a file in nXML mode. However, if you have just created a new
file and the schema cannot be inferred from the file-name, then this
will not locate the right schema. In this case, you should insert the
-start-tag of the root element and then use the command @kbd{C-c
+start-tag of the root element and then use the command @kbd{C-c C-s
C-a}, which reapplies the rules based on the current content of
the document. It is usually not necessary to insert the complete
start-tag; often just @samp{<@var{name}} is
If you want to use a schema that has not yet been added to the
schema locating files, you can use the command @kbd{C-c C-s C-f}
-to manually select the file contaiing the schema for the document in
+to manually select the file containing the schema for the document in
current buffer. Emacs will read the file-name of the schema from the
minibuffer. After reading the file-name, Emacs will ask whether you
wish to add a rule to a schema locating file that persistently
equally well be used for locating a stylesheet.
@menu
-* Schema locating file syntax basics::
-* Using the document's URI to locate a schema::
-* Using the document element to locate a schema::
-* Using type identifiers in schema locating files::
-* Using multiple schema locating files::
+* Schema locating file syntax basics::
+* Using the document's URI to locate a schema::
+* Using the document element to locate a schema::
+* Using type identifiers in schema locating files::
+* Using multiple schema locating files::
@end menu
@node Schema locating file syntax basics
@end example
@noindent
-specifies that that the schema for @samp{spec.xml} is
+specifies that the schema for @samp{spec.xml} is
@samp{docbook.rnc}.
The @samp{pattern} attribute can be used instead of the
@item
The restrictions on RELAX NG schemas in section 7 of the RELAX NG
specification are not enforced.
-@item
-Unicode support has problems. This stems mostly from the fact that
-the XML (and RELAX NG) character model is based squarely on Unicode,
-whereas the Emacs character model is not. Emacs 22 is slated to have
-full Unicode support, which should improve the situation here.
@end itemize
@bye
-@ignore
- arch-tag: 3b6e8ac2-ae8d-4f38-bd43-ce9f80be04d6
-@end ignore