viv:current-node

現在処理中のノードのコピーを取得します

構文

node
viv:current-node
();
Boolean include-data;

説明

現在処理中のノード (通常はクロール URL) のコピーを返します。

引数

オプション引数 include-data は、現在のノードの子も返すかどうかに影響します。viv:current-node(true()) の場合、現在のノードのほか、すべての子ノードもトップレベルのクロール URL ノード (crawl-datacurl-optioncrawler-extender-option など) とともに返されます。例えば、コンバーターの ACL を取得するには、以下の関数を使用します。

viv:current-node(true())/crawl-data/@acl

戻り値

ノード・セット

入力例:

            <scope>
               <parse url="https://support.vivisimo.com/vivisimo/cgi-bin/tests/cgi-test">
                  <parser type="html-xsl">
   <xsl:template match="/">
     <xsl:value-of select="name(viv:current-node())"/>
     status=<xsl:value-of select="viv:current-node()/@status"/>
   </xsl:template>
  </parser>
               </parse>
            </scope>

出力例:

            <parse url="https://support.vivisimo.com/vivisimo/cgi-bin/tests/cgi-test" ref="0" start-time="1" end-time="321" http-status="200 OK" body-length="0" status="fetched processed parsed" parsing-time="1">
               <parser type="html-xsl">
   <xsl:template match="/">
     <xsl:value-of select="name(viv:current-node())"/>
     status=<xsl:value-of select="viv:current-node()/@status"/>
   </xsl:template>
  </parser>
            </parse>parse
     status=fetched processed parsed