Connexions

You are here: Home » Content » The Advanced CNXML (日本語 - Japanese)
Content Actions

The Advanced CNXML (日本語 - Japanese)

Module by: Ricardo Radaelli-Sanchez, Hironori Takaryo Based on: The Advanced CNXMLRicardo Radaelli-Sanchez

Summary: This is the final installment of my three part tutorial on the CNXML language. It is currently valid for the most recent release of the 0.3 language. The keywords contain a list of the tags described in this tutorial. Along with the example code in this module there is also an example module that has been growing throughout the tutorial.

Code

 codeタグは、パラグラフ内にインラインテキストとしてか、ブロックテキストとして使用されます。どんなタグが含まれるかはCNXML Specに相談してください。codeタグには2種類の値が入るtype属性があります。
  • inline (ディフォルト) - インラインテキストの指定
  • block - ブロックテキストの指定
例 1 
	  
<para id='copy'>
  In a unix terminal the command to copy a file is <code
  type='inline'>cp original copy</code>.
</para>
	  
	
In a unix terminal the command to copy a file is cp original copy

Exercise

 exerciseタグは作者に対して、彼らのドキュメントに練習問題を追加するタグを提供します。exerciseタグはid属性(必須)とproblemsolutionの2つの子要素を持ちます。problemタグとsolutionタグは属性を持ちません。
 多項選択式などの複雑な答えを作成するため、QML(Questions Markup Language)はproblemタグやsolutionタグのところで使用されるでしょう。詳しくはQMLを見てください。
例 2 
	  
<exercise id='grilltest'>
  <problem>
    <para id='grilltestp1'>
      For food safety, a steak should be cooked to a minimum
      temperature of what?
    </para>
  </problem>
  <solution>
    <para id='sol1p1'>
      160&deg; F or until the juices run clear and the meat is no
      longer pink.
    </para>
  </solution>
</exercise>
	  
	
Problem 1
For food safety, a steak should be cooked to a minimum temperature of what?
[ Click for Solution 1 ]
Solution 1
160° F or until the juices run clear and the meat is no longer pink
[ Hide Solution 1 ]

CALS Table

 CNXMLはCNXMLドキュメントにテーブルを含めるために、Industry StandardのCALS Table Modelを使用しています。以下に示すのは、CALSタグ、それらの属性、そして子要素の簡単な解説です。より詳しい情報については、CALS Table Specに相談してください。

table

 tableタグは表の始まりを示します。任意の子要素nameを持ち、1つ以上のtgroupタグを持っています。tableタグはまた多くの属性を持っています。詳しくはCALS Table Specに相談してください。

tgroup

 tgroupタグはtableの始まりを示します。列数を表す必須の属性colsを持ちます。その子属性のタグは、0か1以上のcolspecspanspecと、0か1以上のtheadtfoot、そして1つのtbodyタグです。

colspec

The colspec tag is an empty tag that specificies the column of a table or entrytbl. The names and numbers specified as attributes are used for referencing by other tags.

spanspec

The spanspec tag is an empty tag that identifies a horizontal span of columns and associated attributes that can subsequently be referenced by its spanname for repeated use in entry or entrytbl in different rows.

thead

 theadタグはtgroupentrytblのヘッダーのrowを特定します。theadタグは0か1以上のcolspecタグ、および1以上のrowを持つことができます。

tfoot

 tfootタグは、tbodyタグの後に表示されるフッター情報のrowsを特定します。tfootタグは0か1以上のcolspecタグ、および1つ以上のrowを持つことができます。

tbody

 tbodyタグはtgroupentrytblの中身を特定します。tbodyタグには、1つ以上のrowタグがなければなりません。

row

 rowタグは、theadtbody、もしくはtfootの中の情報の行を特定します。rowタグは1つ以上のentryentrytblがなければなりません。

entrytbl

 entrytblタグはentryの代理を行いますが、tgrouptbody一行に収まります。 The content model is the same as that of a tgroup except that tfoot is ommitted and entrytbl is self-excluding. Its children tags are zero, one, or more colspec or spanspec, zero or one thead or tfoot, and one tbody tag.

entry

 entryタグはrow内の入力を特定します。entryタグはASCIIを含んでおり、0か1以上のcitetermcnxnlinkcodeemphasisもしくはmediaを含んでいます。

Using CALS Tables

 少し複雑に聞こえるかもしれませんが、 3を見ることで表について理解できると思います。より詳しい情報はCALS Table SpecCNXML Specに相談してください。
例 3 
	    
<table id='grilltemp' frame='all'>
  <name>Steak Cooking Temperatures</name>
  <tgroup cols='2' colsep='1' rowsep='1'>
    <thead>
      <row>
        <entry>Temperature (&deg;F)</entry>
        <entry>Description</entry>
      </row>
    </thead>
    <tbody>
      <row>
        <entry align='center'>140</entry>
        <entry align='center'>Rare</entry>
      </row>
      <row>
        <entry align='center'>150</entry>
        <entry align='center'>Medium Rare</entry>
      </row> 
      <row>
        <entry align='center'>160</entry>
        <entry align='center'>Medium</entry>
      </row>
      <row>
        <entry align='center'>165</entry>
        <entry align='center'>Medium Well</entry>
      </row>
      <row>
        <entry align='center'>170</entry>
        <entry align='center'>Well</entry>
      </row>
    </tbody>
  </tgroup>
</table>
	    
	  
Steak Cooking Temperatures
Temperature (°F) Description
140 Rare
150 Medium Rare
160 Medium
165 Medium Well
170 Well

まとめ

 これでCNXMLチュートリアルは終わりです。2つの役立つリソースはThe CNXML Language Specthe example documentです。

Comments, questions, feedback, criticisms?

Discussion forum

Send feedback