Velocity

Velocityについて

コミュニティ

ドキュメント

ツール

比較

日本語訳について

Converting Templates − テンプレート変換

Legacy documents are the bane of any software migration. The Velocity Team has tried to ensure that existing templates can be converted for use within Velocity in as painless a manner as possible.

既存の文書は、どんなソフトウェアの移行でも頭痛の種です。 Velocity チームは、既存のテンプレートを Velocity で使えるように 変換することを、できるだけ簡単に、そして確実にしようと試みました。

Currently there is only a WebMacro to Velocity template converter, but there are plans for a Tea to Velocity template converter, and a FreeMarker to Velocity template converter.

現在のところ、WebMacro から Velocity へのテンプレートコンバータだけですが、 Tea から Velocity、そして FreeMarker から Velocity へのテンプレートコンバータの計画があります。


WebMacro to Velocity Template Converter − WebMacro から Velocity へのテンプレート変換

The convert-wm.sh script in the convert directory converts a single WebMacro template (*.wm) to a Velocity template (*.vm), or converts an entire directory structure of WebMacro templates to Velocity templates.

convert ディレクトリにある convert-wm.sh スクリプトは、 単一の WebMacro テンプレート (*.wm) を Velocity テンプレート(*.vm)に変換したり、 WebMacro テンプレートのディレクトリ構造をまるごと Velocity テンプレートに変換します。

The convert-wm.sh script can convert a single WebMacro template to a Velocity template.

convert-wm.sh スクリプトは、単一の WebMacro テンプレートを Velocity テンプレートに変換します。

./convert-wm.sh template.wm

This will produce a single Velocity template named template.vm from the WebMacro template template.wm. The original WebMacro template will be preserved.

これで、 template.wm という名前の WebMacro テンプレートから 単一の template.vm という名前の Velocity テンプレート が生成されます。元の WebMacro テンプレートはそのまま残ります。

To convert an entire directory structure of WebMacro templates using the convert-wm.sh script, simply include the directory name instead of the template name, as indicated below.

WebMacro テンプレートのディレクトリ構造を丸ごと変換するには、 convert-wm.sh スクリプトを使用して、 単純にテンプレート名の替わりにディレクトリ名を以下のように指定します。

./convert-wm.sh templates

This will produce a directory structure of templates named templates/[template].vm. The original WebMacro templates will be preserved during the conversion process.

これで、templates/[template].vm という名前のテンプレートのディレクトリ構造が生成されます。 変換時には、元の WebMacro テンプレートはそのまま残ります。



このドキュメントは、 熊坂祐二 、 高橋達男 、 羽生田恒永 が訳しました。
コメントがある場合は、 report@jajakarta.org までお願いします。
オリジナル英文 Copyright © 1999-2005, The Apache Software Foundation