Changeset 6086 for trunk

Show
Ignore:
Timestamp:
11/23/11 18:21:30 (6 months ago)
Author:
mtld
Message:

documented xpath functions

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pustefix-docbook/src/docbkx/reference/xslt.xml

    r6060 r6086  
    17561756  </section> 
    17571757 
     1758  <section xml:id="xslt.extensions"> 
     1759    <title>XSLT extensions</title> 
     1760 
     1761  <section xml:id="xslt.extensions.xpathfunctions"> 
     1762    <title>XPath functions</title> 
     1763    <para>In addition to the standard XPath functions supplied by the XSLT/XPath implementation Pustefix provides some additional framework specific 
     1764          XPath functions in the <literal>xmlns:pfx="http://www.schlund.de/pustefix/core"</literal> namespace:</para> 
     1765    <para> 
     1766    <para>Example: 
     1767    <programlisting language="xml"><![CDATA[<ixsl:if test="pfx:isVisible('mypage')=1"> 
     1768  Display if page 'mypage' is accessible  
     1769</ixsl:test>]]></programlisting> 
     1770    </para> 
     1771      <emphasis role="strong">Function:</emphasis> <emphasis>number</emphasis> <emphasis role="strong">pfx:isVisible</emphasis>(<emphasis>string</emphasis>) 
     1772    </para> 
     1773    <para> 
     1774      The <emphasis role="strong">pfx:isVisible</emphasis> function checks if a page is accessible. The page name is passed as argument. 
     1775      The function returns: 
     1776      <itemizedlist> 
     1777          <listitem><literal>1</literal>, if the page is accessible</listitem> 
     1778          <listitem><literal>0</literal>, if the page isn't accessible</listitem> 
     1779          <listitem><literal>-1</literal>, if the page doesn't exist</listitem> 
     1780      </itemizedlist> 
     1781    </para> 
     1782    <para> 
     1783      <emphasis role="strong">Function:</emphasis> <emphasis>number</emphasis> <emphasis role="strong">pfx:isVisited</emphasis>(<emphasis>string</emphasis>) 
     1784    </para> 
     1785    <para> 
     1786       The <emphasis role="strong">pfx:isVisited</emphasis> function checks if a page has already been visited within the session. The page name is passed as argument. 
     1787      The function returns: 
     1788      <itemizedlist> 
     1789          <listitem><literal>1</literal>, if the page has already been visited</listitem> 
     1790          <listitem><literal>0</literal>, if the page hasn't been visited yet</listitem> 
     1791          <listitem><literal>-1</literal>, if the page isn't configured</listitem> 
     1792      </itemizedlist> 
     1793    </para> 
     1794     <note> 
     1795        <para> 
     1796          You should be aware that doing a boolean check on results of type <literal>number</literal>, <literal>1</literal> and  
     1797          <literal>-1</literal> both are evaluated as <literal>true</literal>, <literal>0</literal> as <literal>false</literal>. 
     1798        </para> 
     1799     </note> 
     1800  </section> 
     1801  </section> 
     1802 
    17581803</chapter>