個人的にはSmartDocという XMLドキュメントフォーマットをもっと書きやすくできないかと考えて、これを作るにいたりました。SXMLにすることでXMLに比べて以下のようなメリットがあると考えています。
Schemeの強力な言語パワーを使えます
S式なので 括弧の数さえ調整すれば Emacs が 自動的にインデントしてくれます
Personally, I want to write a SmartDoc document more easily, So I made this software.I think follows are the merits to use the SXML format comparing to the XML format.
You can use the power of the Scheme language.
The Emacs editor helps you with automatic indentation, because it is S-expressions.
このページは Sxmlvncを使って作成しています。このページがサンプルとして最適でしょう。
I made this page using Sxmlcnv.I think this page is the best way to show you a sample.
sourceforgeのサマリページからダウンロードできます。
It can be downloaded from Summary page of development.
入力を与えると内容を自動判別して変換します。
If you specify an input for sxmlcnv script, sxmlcnv guesses the encoding from the input data automatically.
| 判別方法 | アクション |
|---|---|
| 1行目が#で始まっている | schemeコードどして loadする (SXML->XML関数が使える) |
| '(' で始まっている | SXMLのS式として XMLに変換する |
| '<?xml'で始まっている | XMLとして SXMLに変換する |
| Recognition method | Action |
|---|---|
| started with # line | load and eval as scheme code (you can use SXML->XML function) |
| started with '(' | load as S-expression and convert it to XML |
| started with '<?xml' | load as XML and convert it to SXML |
scheme codeとしてロードされる場合、以下の関数が使えます。
You can use these functions, When sxmlcnv load as scheme code.
SxmlcnvはSmartDoc文書を簡潔に記述するためのスタイルシートを内蔵しています。
Sxmlcnv includes built-in style-sheet for writing SmartDoc documents concisely.