Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Referencing column values in a grid is a little different than you may have seen before.  When using a standard list you can reference the value of a column using an XSLT variable of the same name ($COLUMNNAME).  This is not possible with the grid so it is necessary to access a column with the following XPath expression:グリッドのカラム値を参照する方法は、今までとは少々違います。標準リストを使用している場合は、同じ名前のXSLT変数($COLUMNNAME)を使ってカラム値を参照することができます。グリッドではこの方法は使えません。カラムにアクセスするには、次のようなXPath式を使う必要があります。

../lxml:column\[@name='COLUMNAME'\’COLUMNAME’]

現在のカラム(つまり、ウェブレットを含むカラム)を参照する時はこれは必要ありません。この場合、シングル・ピリオド(.)を使用します。

参照したいカラムの位置がわかっている場合は、以下のようなXpath式を使用することもできます。This is not necessary for referencing the current column (i.e. the column containing the weblet).  In this case you can use a single period (.). If you know the position of the column you want to reference, you can use an Xpath expression like this:

../lxml:column\[2\]

This is handy for large lists as it is much faster but it may cause problems if you change the order of the columns in your list.

Info
Note: All field and column name references in XPath expressions must be uppercase. All references to repository fields must use the object name for the field.

Also see

この方法は格段に早いので大きなリストでは便利ですが、リスト内のカラムの順番が変わると問題になる可能性があります。

Note

注意:XPath式内の全てのフィールド名とカラム名の参照は大文字を使用しなければなりません。リポジトリ・フィールドへの参照は全て、フィールドのオブジェクト名を使用する必要があります。

以下も参照してください。

グリッド・カラムの例confirmText

Info
iconfalse

The XPath expression tells the XSLT processor where to find the column in the XML data output by the Webroutine.  Like DOS or Linux file paths, the expression indicates a path to the target data from the current position and, like file paths, a period (.) refers to the current position and two periods XPath式は、Webroutineにより出力されるXMLデータのカラムの位置をXSLTプロセッサーに伝えます。DOSやLinuxのファイル・パスと同様、、式は現在位置から対象データまでのパスを示しており、ピリオド(.)は現在の位置を、2つのピリオド(..) refer to the parent.
Following is the XML output for a single row in the list:は親を参照するのもファイル・パスと同様です。
以下はリスト内の1つの行のXML出力です。

</lxml:entry>

<lxml:column name="EMPNO" id="EMPLIST.0002.EMPNO">A0090</lxml:column>    
<lxml:column name="SURNAME" id="EMPLIST.0002.SURNAME">BLOGGS</lxml:column>    
<lxml:column name="GIVENAME" id="EMPLIST.0002.GIVENAME">FRED JOHN ALAN</lxml:column>    
<lxml:column name="DEPTMENT" id="EMPLIST.0002.DEPTMENT">FLT</lxml:column>

</lxml:entry>

When processing a weblet in a grid column, the current position in the XML is the <lxml:column> tag for that row and column.  An XPath expression like this:ウェブレットをグリッド・カラム内で処理する場合、XMLの中の現在の位置は<lxml:column> タグでこの行と列を表します。XPath式は次のようになります。

../lxml:column\[@name='EMPNO'\]

says to go up to the parent これは、親の <lxml:entry> tag, look for a child <lxml:column> tag with a name attribute of 'EMPNO' and return it.タグに戻り、name属性がEMPNOである子の<lxml:column> タグを探して、これを戻すことを示しています。