RelaxNGCCは、RELAX NGで書かれたスキーマからJavaのソースコードを生成するツールです。入力XMLの各エレメントやアトリビュートを読んだときのアクションを、yaccやJavaCCと同様の手法でユーザが直接スキーマに追加記述します。 RelaxNGCC is a tool for generating Java source code from a given RELAX NG grammar. By embedding code fragments in the grammar like yacc or JavaCC, you can take appropriate actions while parsing valid XML documents against the grammar.
コンパイラの実行にはJRE1.2以降が必要です。 JRE 1.2 or later is required to run the compiler.
生成されたコードの実行にはSAXパーサが必要です。 Generated code will only need a SAX parser to run.
スキーマからソースコードを生成するツールとしてはRelaxerが有名ですが、RelaxNGCCは次のような違いがあります。 Relaxer is another famous tool for generating Java source code from a given grammar, but RelaxNGCC is different from Relaxer at following points.
RelaxNGCCに関する質問・要望は、開発者全員がモニターしているRelax開発者メーリングリストへお願いします。まだ安定した実装になっているとはいえないので、使ってみておかしいと思ったらお気軽にご連絡ください。できる限りすみやかに対処します。ユーザの声が僕らのモチベーションを引き出すのでよろしくお願いします。 If you hava any comments, questions, or requests, please post them to reldeve mailing list, where all the developers are monitoring. We always welcome your comments, as those are the ultimate motivation that drives us to further development.
RelaxNGCC本体はApache Software License風のライセンスに従って配布されます。RelaxNGCCが生成したJavaソースコードについては我々は著作権を放棄します。 RelaxNGCC is licensed under Apache Software License-like license. For the code generated by RelaxNGCC, we waive our copyrights, so they are all yours.
生成されるAttributesImpl.javaはorg.xml.sax.Attributesの実装として使っています。このソースコードはXerces等とともに配布されているorg.xml.sax.helpers.AttributesImplのソースコードを元にしていますが、現在のところこれにはremoveAttributeメソッドにバグがあるため、それを避ける目的でバグを修正したものをrelaxngcc.runtimeパッケージに配置して使用しています。なので当面の間、relaxngcc.runtime.AttributesImpl.javaだけはorg.xml.sax.helpers.AttributesImplに倣ってpublic domainのライセンスとします。なおこのバグはJRE1.4でも同様の模様です。
The generated AttributesImpl.java is used as an implementation of org.xml.sax.Attributes
. It is based on the source code of org.xml.sax.helpers.AttributesImpl
distributed with some products such as Xerces, but the original org.xml.sax.helpers.AttributesImpl
has a bug in removeAttribute method. To avoid the bug, I modified the original and located at relaxngcc.runtime package. relaxngcc.runtime.AttributesImpl.java
is in the public domain like the original for this reason. The bug has not been fixed in JRE1.4.
inline
アトリビュートを導入し、スコープの展開ができるようになりました。Added inline
attribute for expanding a scope into other scopes.cc:class
アトリビュートがどこにでもかけるようになりました。これにより<define>ブロックがどこにでもあるかのように扱えます。attribute can be now specified for any pattern, and it will become its own class, as if it were <define>d as a separate block.
さらに前のリリース履歴はこちらです。Earlier release notes are available here.
To file a feature request, please visit the project website at SourceForge. この他の機能の提案などがあれば、SourceForgeのウェブサイトに書き込んでください.