SSブログ

調べもの:XSLT key関数 [XMLマスター]

初出:2008-03-02 12:32:48
相変わらずXMLマスターの学習中。

元々の目的は、Titleどおり今一理解できていないXSLTのkey関数を理解すること。
それをGoogleで検索しようとしたところ、検索候補として「XSLT 関数」が表示された。
どうせならそこからおさえようかな~と調べたら、それで十分な情報がえられた。

すげぇ、Google。

(2011.03.05追記)
使い方としては、XSLT文書の中で、key要素で、選択対象要素を指定。
key関数でkey要素で指定された対象要素のうち、指定された値を持つものを返す。
「XSLTスタイルシート書き方講座 応用編(2):XMLデータの埋め込みと相互参照」
http://www.atmarkit.co.jp/fxml/tanpatsu/10xslt/xslt06.html

”Keys are declared in the stylesheet using xsl:key elements.
A key has a name as well as a value; each key name may be thought of as distinguishing a separate, independent space of identifiers.
The value of a named key for an element may be specified in any convenient place; for example, in an attribute, in a child element or in content. An XPath expression is used to specify where to find the value for a particular named key.
The value of a key can be an arbitrary string; it is not constrained to be a name.
There can be multiple keys in a document with the same node, same key name, but different key values.
There can be multiple keys in a document with the same key name, same key value, but different nodes.”
「XSL Transformations (XSLT) - 12.2 Keys」
http://www.w3.org/TR/xslt#key


「XSLT 関数 - Goqogle 検索」
http://www.google.co.jp/search?sourceid=navclient&aq=t&hl=ja&ie=UTF-8&rlz=1T4GFRC_jaJP217JP218&q=XSLT+%e9%96%a2%e6%95%b0

「サンプルで覚えるXSLTプログラミング」
http://www.atmarkit.co.jp/fxml/tanpatsu/xslt/xslt09.html
「サンプルで覚えるXSLTプログラミング - その他の関数」
http://www.atmarkit.co.jp/fxml/tanpatsu/xslt/xslt14.html

「XSLT 関数」
http://msdn2.microsoft.com/ja-jp/library/ms256046(VS.80).aspx
「Studying XSLT -- for advanced use -- [ document関数 ]」
http://www.asahi-net.or.jp/~ps8a-okzk/xml/xslt10_2/document.html
「key 関数」
http://msdn2.microsoft.com/ja-jp/library/ms256228(VS.80).aspx
「<xsl:key> 要素」
http://msdn2.microsoft.com/ja-jp/library/ms256203(VS.80).aspx
「<xsl:key> の例」
http://msdn2.microsoft.com/ja-jp/library/ms256127(VS.80).aspx
「id 関数」
http://msdn2.microsoft.com/ja-jp/library/ms256148(VS.80).aspx

「XSLT key - Google 検索」
http://www.google.co.jp/search?sourceid=navclient&hl=ja&ie=UTF-8&rlz=1T4GFRC_jaJP217JP218&q=XSLT+key

「XSLT key() Function」
http://www.w3schools.com/xsl/func_key.asp

それと、全般的に参考になりそうなところを以下にメモっておこう。
「XML 標準のリファレンス」
http://msdn2.microsoft.com/ja-jp/library/ms256177(VS.80).aspx
「W3Schools Online Web Tutorials」
http://www.w3schools.com/default.asp
タグ:XML XSLT
nice!(0)  コメント(0)  トラックバック(0) 
共通テーマ:パソコン・インターネット

nice! 0

コメント 0

コメントを書く

お名前:[必須]
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。

トラックバック 0