genrnc

https://github.com/aki2o/emacs-genrnc.git

git clone 'git://github.com/aki2o/emacs-genrnc.git'
1

What's this?

This is a extension of Emacs that generate RELAX NG Compact Schema from RELAX NG Schema, XML Schema and DTD for nXML-mode.

Feature

Available Schema Format

Regist include/import schema automatically

If regist the schema that has include/import, you give only the schema to the regist command.

Update/Delete/Rename schema from TypeID

Registed schema has TypeID on nXML-mode.
You can update/delete/rename schema by using TypeID.

Requirement

Install

If use package.el

2013/09/10 It's available by using melpa.

If use el-get.el

2013/05/03 Now during an application for registration in el-get.
2013/06/30 But, not yet regist.
2013/07/26 It's available. But, master branch only.

If use git command

git clone https://github.com/aki2o/emacs-genrnc.git

Then, add the directory that has genrnc.el to load-path.

Note: Installing each the following dependency is required in this case.

Manually

Download this archive and expand it.
Then, add the directory that has genrnc.el to load-path.

Note: Installing each the following dependency is required in this case.

Dependency

Configuration

(require 'genrnc)
(setq genrnc-user-schemas-directory "~/.emacs.d/schema")

About other customization, execute customize-group "genrnc".

Usage

This extension provides the following commands.

This extension don't provide Keymap.
Then, for using above commands, do M-x genrnc-regist-url or bind key by yourself.

Information

Regist/Update

This extension display the following message when finished some action.

[GENRNC] Finished ...

If the schema has many include/import, The action maybe take a little time.
If the action is failed, the following message is displayed.

[GENRNC] Failed ...

The following message is displayed occasionally.

deferred error : ...

In the case, see *Messages* buffer for checking the finished message is outputed.
If the finished message is outputed, the action is finished normally.

Use schema

Do M-x rng-set-document-type-and-validate on nXML-mode.
By default, the command is bound “C-c C-s C-t”.
Check the schema is listed, and select it.

Do Cleaning cache

If you retry the action when it failed, the message about relation of cache maybe is displayed.
In the case, do M-x genrnc-clear-cache.
It's no problem that you execute the command frequently.

Unknown Schema Location

In XML Schema, import element maybe don't have schemaLocation attribute.
In the case, if don't know the schema location, show the following prompt.

[GENRNC] Including not located ns:'...'. Input PATH or URL locating this: 

Then, input right URL/Filepath of the schema.

Tested On

Enjoy!!!