CNXMLは、教育的なコンテンツを作成しやすいXMLマークアップ言語です。CNXMLの目標は、特定のプレゼンテーションではなく、コンテンツを伝えることです。Connexionsプロジェクトは、ドキュメントを格納する第一言語として、Connexions Markup Language (CNXML)が使用されています。さぁ、はじめましょう。
Content
今あなたは、idとネームスペース情報でセットアップされたdocumentタグを持っています。次にあなたのドキュメントに対して行うことは、内容の追加です。内容とはドキュメントの大半を占めるテキストという意味です。
Note:
contentタグの中に置かれます。すべてのCNXMLドキュメントは1つだけcontentタグを持ちます。ドキュメントの中身はcontentタグの中に位置します。
構造的なタグは、ドキュメントに構造を与えるため、contentタグの中で使用されているタグです。これらのタグについて下で説明します。
Structure Tags
構造タグはsection、para、document、contentです。
documentタグとcontentタグについては述べました。よって、他のタグに関する短い解説と例を述べましょう。
Para
paraタグを使用することによって、テキストをドキュメントに挿入することができます。各paraはドキュメント内で固有のidを持っています。
Example 4
<para id='intro'>
I have eaten many steaks in my life and none have been more satisfying
than the backyard-grill cooked steak. Maybe this is because of the
relaxing nature of drinking a beer, being outside, and lounging that
accompanies the grilling procedure. Maybe it is because of the aroma
of the grill and the beef perfectly seasoned to your taste. Either
way, this document shows how a good steak can be prepared.
</para>
Section
教科書はしばしば、より小さなセクションを作成するため、チャプター単位で分割されます。なぜなら、より良い理解と一貫性のため、セグメントテキストにとって必要であるためです。CNXMLはsectionタグというものを持っています。
sectionタグは必須のid属性と、最初の子要素のnameタグを持っています。
Example 5
<section id='ingredsec'>
<name>Ingredients</name>
<list> ... </list>
</section>
<section id='marinadesec'>
<name>Marinade</name>
<para id='marinate'> ... </para>
<list id='marinade'> ... </list>
<para id='tobecontinued'> ... </para>
</section>
<section id='grillingsec'>
<name>Grilling</name>
<para id='prepgrill'> ... </para>
<para id='grilling'> ... </para>
</section>
Obviously ellipses would be replaced by appropriate text.
Inline Tags
インラインタグは構造的なタグの内部に、内容と機能性を埋め込むために使用されます。一般的に使用されるタグを以下に示します。
Emphasis
emphasisタグは、CNXMLドキュメント内のテキストを強調するために使用されます。これは見た目の強調ではなく、意味の強調であることに注意してください。
Example 6
<para id='intro'>
I have eaten many steaks in my life and none have been more satisfying
than the backyard-grill cooked steak. Maybe this is because of the
relaxing nature of drinking a beer, being outside, and lounging that
accompanies the grilling procedure. Maybe it is because of the aroma
of the grill and the beef <emphasis>perfectly</emphasis> seasoned to
your taste. Either way, this document shows how a good steak can be
prepared.
</para>
Term
termタグは、定義されている単語や熟語をマークするのに使用されます。しかしながら、このタグの使用はparaタグかdefinitionタグの中だけです。termタグは1つの属性を持ちます。
src- 用語のソースか定義が閲覧できるURL。
Example 7
<para id='marinade'>
To ensure the best flavor possible, it is necessary to marinate the
beef. A steak <term src='http://marinade.com'>marinates</term> when
left to sit in a prepared sauce, or <term>marinade</term>, where it
will absorb the flavors of the ingredients. Marinating may take as
little as 15 minutes or as long as 6 hours and should
<emphasis>always</emphasis> be done in the refrigerator and
<emphasis>not</emphasis> at room temperature.
</para>
Note
noteタグは、閲覧者に対する注意を作成します。それは警告、重要ポイントなどです。注意の種類はtype属性で指定されます。
Example 8
<para id='intro'>
I have eaten many steaks in my life and none have been more
satisfying than the backyard-grill cooked steak. Maybe this is
because of the relaxing nature of drinking a beer, being outside,
and lounging that accompanies the grilling procedure. <note
type='warning'>Excessive drinking or fun may result in overcooked or
burned steak.</note> Maybe it is because of the aroma of the grill
and the beef <emphasis>perfectly</emphasis> seasoned to your taste.
Either way, this document shows how a good steak can be prepared.
</para>
上記の例は以下のように表示されます。
I have eaten many steaks in my life and none have been more satisfying than the backyard-grill cooked steak. Maybe this is because of the relaxing nature of drinking a beer, being outside, and lounging that accompanies the grilling procedure.
Warning:
CNXNとLINK
CNXMLのcnxnタグとlinkタグは、他のドキュメントへのリンクのために使用されます。2つのタグの違いは、cnxnタグはConnexionsシステム内の他のドキュメントへのリンクに使用され、linkタグはインターネット上の他のドキュメントへのリンクに使用される点です。
cnxnタグは4つの属性を持っています。
-
target- 特定のタグを対象とします。 -
document- ドキュメントのIDを対象とします。 -
version- ドキュメントの特定のバージョンを対象とします。 -
strength- リンクされた情報が現在のドキュメントに関連している程度を指定します。
version属性は任意です。指定されない場合は、ディフォルトで最新版のドキュメントにリンクを行います。そうすると一見version属性は無意味に感じるかもしれませんが、実際は役に立ちます。特定のバージョンを指定すると、そのリンクで指定される内容は今後変化することがありません。最新版にリンクを行っていると、重要な情報が見えなくなる可能性があります。
target属性とdocument属性は一緒に使用したり、単独で使用したりすることができます。両方を使用するなら、他のドキュメントの特定ののタグへのリンクになります。documentタグだけを使用するなら、他のドキュメントへのリンクになります。targetタグだけを使用するなら、現在のドキュメントの特定のタグへのリンクになります。
strength属性は任意です。リンク先の情報が現在の項目にどのくらい関連性があるのかを、閲覧者に知らせることができます。
Example 9: CNXNの例
cnxnタグはリンク先の記述が必要ありません。例えば、ページ内の図にリンクを行いたいけど、cnxnにどういう名前を付ければいいか分からない場合、以下のようなcnxnを使用することができるでしょう。
<cnxn target='figure1'/>
Figure 1
か
Reference
として表現できます。ほとんどの場合、リンク先の説明のため、以下のようにcnxn内でテキストを使用することができます。
<cnxn target='figure1'>Steak Figure</cnxn>
一方、linkタグはリンク先のURLを示すsrc属性だけが必要です。
Example 10
<para id='tobecontinued'>
I'll be adding to this document in <cnxn document='m9006' >The
Intermediate CNXML</cnxn> which focuses on more advanced CNXML tags.
For more marinades see the <link src='http://www.2eatcab.com'>Angus
Beef website</link>. Finally, a good resource is the <cite>Steak
Lover's Cookbook -- William Rice; Paperback</cite>.
</para>
上記の例は以下のように表示されます。
I'll be adding to this document in The Intermediate CNXML which focuses on more advanced CNXML tags. For more marinades see the Angus Beef website. Finally, a good resource is the Steak Lover's Cookbook -- William Rice; Paperback.
Cite
citeタグは、ドキュメント内の非電子資料の参照に使用されます。主に作業のタイトルが含まれています。Example 10を見てください。
Quote
quoteタグは、他のソースから直接引用したテキストを表示するために使用されます。quoteタグは、引用文がインラインであるかブロックであるかを示すtype属性を持っています。
Example 11
<para id='steakquote'>
Everyone has an opinion on how a steak should be cooked. <quote
type='inline'>"A good steak should be pink in the middle and black
on the outside."</quote> Although this may sound reasonable many
remember the words of George Washington: <quote type='block'>"In any
free country a man should have the ability to purchase a nice rare
steak."</quote>
</para>"In any free country a man should have the ability to purchase a nice rare steak."
Foreign
foreignタグは、使用されている外国の単語か熟語を示すために使用されます。
Example 12
<para id='steakquote2'>
In many latin american countries steak is called <foreign>carne
asada</foreign>.
</para>



Tutorial example module
The Intermediate CNXML
