You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by de...@lenya.apache.org on 2008/04/23 00:59:15 UTC

Document changed: navigation

Document: navigation
URL: https://lenya.zones.apache.org/cms/docu/authoring/docu20/standardmodules/navigation.html
Changed by user: Andreas Hartmann (andreas)


----
Removed: /comment()[1]

  Copyright 1999-2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
  http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

----
Removed: /comment()[2]
 $Id: index.xml 55543 2004-10-26 00:14:59Z gregor $ 
----
Removed: /document/header/title/text()
Apache Lenya Documentation
----
Added: /document/header/title/text()
The navigation Module
----
Removed: /document/body/p
<p> (null)
----
Removed: /document/body/p/text()
      This is a Forrest Document 2.0 sample.    
----
Added: /document/body/section[1]
<section> (null)
----
Added: /document/body/section[1]/title
<title> (null)
----
Added: /document/body/section[1]/title/text()
Introduction
----
Added: /document/body/section[1]/p
<p> (null)
----
Added: /document/body/section[1]/p/text()[1]
        The 
----
Added: /document/body/section[1]/p/em[1]
<em> (null)
----
Added: /document/body/section[1]/p/em[1]/text()
navigation
----
Added: /document/body/section[1]/p/text()[3]
 module allows to create navigation widgets like menus, breadcrumb paths,        and language selectors, based on the site structure.        It has some advantages over the old navigation framework which is provided by the 
----
Added: /document/body/section[1]/p/em[2]
<em> (null)
----
Added: /document/body/section[1]/p/em[2]/text()
sitetree
----
Added: /document/body/section[1]/p/text()[5]
 module.        Since it uses Java instead of XSLT to build the navigation structure and generates only the necessary        nodes instead of filtering the whole sitetree, the performance is generally better and the code is        easier to read.      
----
Added: /document/body/section[2]
<section> (null)
----
Added: /document/body/section[2]/title
<title> (null)
----
Added: /document/body/section[2]/title/text()
The Site Fragment Generator
----
Added: /document/body/section[2]/p[1]
<p> (null)
----
Added: /document/body/section[2]/p[1]/text()[1]
        Each widget is generated using a separate pipeline.        The starting point of the pipeline is the 
----
Added: /document/body/section[2]/p[1]/code[1]
<code> (null)
----
Added: /document/body/section[2]/p[1]/code[1]/text()
SiteFragmentGenerator
----
Added: /document/body/section[2]/p[1]/text()[3]
. Like the name        suggests, it generates a fragment of the website structure. More specifically, it generates        an XML structure consisting of 
----
Added: /document/body/section[2]/p[1]/code[2]
<code> (null)
----
Added: /document/body/section[2]/p[1]/code[2]/text()
<node>
----
Added: /document/body/section[2]/p[1]/text()[5]
 and 
----
Added: /document/body/section[2]/p[1]/code[3]
<code> (null)
----
Added: /document/body/section[2]/p[1]/code[3]/text()
<link>
----
Added: /document/body/section[2]/p[1]/text()[7]
        elements, corresponding to the 
----
Added: /document/body/section[2]/p[1]/code[4]
<code> (null)
----
Added: /document/body/section[2]/p[1]/code[4]/text()
SiteNode
----
Added: /document/body/section[2]/p[1]/text()[9]
 and 
----
Added: /document/body/section[2]/p[1]/code[5]
<code> (null)
----
Added: /document/body/section[2]/p[1]/code[5]/text()
Link
----
Added: /document/body/section[2]/p[1]/text()[11]
 of the site        structure object model. Here's an example output of the 
----
Added: /document/body/section[2]/p[1]/code[6]
<code> (null)
----
Added: /document/body/section[2]/p[1]/code[6]/text()
SiteFragmentGenerator
----
Added: /document/body/section[2]/p[1]/text()[13]
:      
----
Added: /document/body/section[2]/source
<source> (null)
----
Added: /document/body/section[2]/source/@space
[attr] space=preserve (http://www.w3.org/XML/1998/namespace)
----
Added: /document/body/section[2]/source/text()[1]
<site:fragment pub="mypub" area="live"
    xmlns:site="http://apache.org/lenya/site/1.0"
    
  <site:node name="company" uuid="b92e48e0-e986-11dc-b04f-af2277a493d7">
    <site:link xml:lang="en" label="Company" href="lenya-document:b92e48e0-…"/>
  </site:node>
  
  <site:node name="products" uuid="af57d250-…" 
----
Added: /document/body/section[2]/source/strong[1]
<strong> (null)
----
Added: /document/body/section[2]/source/strong[1]/text()
ancestorOfCurrent="true"
----
Added: /document/body/section[2]/source/text()[3]
>
    <site:link xml:lang="en" label="Products" href="lenya-document:…"/>
    <site:node name="bicycles" uuid="c027de40-e986-11dc-b04f-af2277a493d7">
      <site:link xml:lang="en" label="Bicycles" href="…" 
----
Added: /document/body/section[2]/source/strong[2]
<strong> (null)
----
Added: /document/body/section[2]/source/strong[2]/text()
current="true"
----
Added: /document/body/section[2]/source/text()[5]
/>
    </site:node>
  </site:node>
  
</site:fragment>
----
Added: /document/body/section[2]/p[2]
<p> (null)
----
Added: /document/body/section[2]/p[2]/text()[1]
        The 
----
Added: /document/body/section[2]/p[2]/code
<code> (null)
----
Added: /document/body/section[2]/p[2]/code/text()
SiteFragmentGenerator
----
Added: /document/body/section[2]/p[2]/text()[3]
 uses the namespace        
----
Added: /document/body/section[2]/p[2]/strong
<strong> (null)
----
Added: /document/body/section[2]/p[2]/strong/code
<code> (null)
----
Added: /document/body/section[2]/p[2]/strong/code/text()
http://apache.org/lenya/site/1.0
----
Added: /document/body/section[2]/p[2]/text()[5]
        and produces the following elements and attributes:      
----
Added: /document/body/section[2]/dl
<dl> (null)
----
Added: /document/body/section[2]/dl/dt[1]
<dt> (null)
----
Added: /document/body/section[2]/dl/dt[1]/text()
<site:fragment>
----
Added: /document/body/section[2]/dl/dd[1]
<dd> (null)
----
Added: /document/body/section[2]/dl/dd[1]/ul
<ul> (null)
----
Added: /document/body/section[2]/dl/dd[1]/ul/li[1]
<li> (null)
----
Added: /document/body/section[2]/dl/dd[1]/ul/li[1]/strong
<strong> (null)
----
Added: /document/body/section[2]/dl/dd[1]/ul/li[1]/strong/text()
pub
----
Added: /document/body/section[2]/dl/dd[1]/ul/li[1]/text()
 - The publication ID.
----
Added: /document/body/section[2]/dl/dd[1]/ul/li[2]
<li> (null)
----
Added: /document/body/section[2]/dl/dd[1]/ul/li[2]/strong
<strong> (null)
----
Added: /document/body/section[2]/dl/dd[1]/ul/li[2]/strong/text()
area
----
Added: /document/body/section[2]/dl/dd[1]/ul/li[2]/text()
 - The area.
----
Added: /document/body/section[2]/dl/dt[2]
<dt> (null)
----
Added: /document/body/section[2]/dl/dt[2]/text()
<site:node>
----
Added: /document/body/section[2]/dl/dd[2]
<dd> (null)
----
Added: /document/body/section[2]/dl/dd[2]/ul
<ul> (null)
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[1]
<li> (null)
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[1]/strong
<strong> (null)
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[1]/strong/text()
name
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[1]/text()[2]
 - The node name, which is the URL snippet identifying the node.              Some CMS use the term 
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[1]/em
<em> (null)
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[1]/em/text()
slug
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[1]/text()[4]
.
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[2]
<li> (null)
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[2]/strong
<strong> (null)
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[2]/strong/text()
uuid
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[2]/text()
 - The UUID of the node.
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[3]
<li> (null)
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[3]/strong
<strong> (null)
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[3]/strong/text()
ancestorOfCurrent
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[3]/text()[2]
 -              If this attribute has the value 
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[3]/em[1]
<em> (null)
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[3]/em[1]/text()
true
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[3]/text()[4]
, the currently selected link              belongs to a sub-node (child, grand-child, …) of this node. The value won't              be 
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[3]/em[2]
<em> (null)
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[3]/em[2]/text()
true
----
Added: /document/body/section[2]/dl/dd[2]/ul/li[3]/text()[6]
 if the selected link belongs to the node itself!             
----
Added: /document/body/section[2]/dl/dt[3]
<dt> (null)
----
Added: /document/body/section[2]/dl/dt[3]/text()
<site:link>
----
Added: /document/body/section[2]/dl/dd[3]
<dd> (null)
----
Added: /document/body/section[2]/dl/dd[3]/ul
<ul> (null)
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[1]
<li> (null)
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[1]/strong
<strong> (null)
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[1]/strong/text()
xml:lang
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[1]/text()
 - The language code.
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[2]
<li> (null)
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[2]/strong
<strong> (null)
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[2]/strong/text()
label
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[2]/text()
 - The label of the node, i.e. the string to be displayed              as the title of the navigation item.            
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[3]
<li> (null)
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[3]/strong
<strong> (null)
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[3]/strong/text()
href
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[3]/text()[2]
 - The URI of the node, using the syntax              
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[3]/code
<code> (null)
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[3]/code/text()
lenya-document:…,lang=…,area=…,pub=…
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[3]/text()[4]
.              Since the link is fully qualified (i.e., all relevant parameters are provided),              it can be resolved safely outside the publication.            
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[4]
<li> (null)
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[4]/strong
<strong> (null)
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[4]/strong/text()
current
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[4]/text()[2]
 -              If this attribute has the value 
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[4]/em
<em> (null)
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[4]/em/text()
true
----
Added: /document/body/section[2]/dl/dd[3]/ul/li[4]/text()[4]
, the link is currently selected              (i.e., the corresponding document is displayed).            
----
Added: /document/body/section[3]
<section> (null)
----
Added: /document/body/section[3]/title
<title> (null)
----
Added: /document/body/section[3]/title/text()
Using Fragment Selectors
----
Added: /document/body/section[3]/p[1]
<p> (null)
----
Added: /document/body/section[3]/p[1]/text()[1]
        To simplify the implementation of custom navigation widgets and to ensure        the separation of concerns, the 
----
Added: /document/body/section[3]/p[1]/code[1]
<code> (null)
----
Added: /document/body/section[3]/p[1]/code[1]/text()
SiteFragmentGenerator
----
Added: /document/body/section[3]/p[1]/text()[3]
 delegates        the decision which nodes and links to render to a 
----
Added: /document/body/section[3]/p[1]/code[2]
<code> (null)
----
Added: /document/body/section[3]/p[1]/code[2]/text()
FragmentSelector
----
Added: /document/body/section[3]/p[1]/text()[5]
.        The 
----
Added: /document/body/section[3]/p[1]/code[3]
<code> (null)
----
Added: /document/body/section[3]/p[1]/code[3]/text()
FragmentSelector
----
Added: /document/body/section[3]/p[1]/text()[7]
 class has to implement a single method:      
----
Added: /document/body/section[3]/source
<source> (null)
----
Added: /document/body/section[3]/source/@space
[attr] space=preserve (http://www.w3.org/XML/1998/namespace)
----
Added: /document/body/section[3]/source/text()
public interface FragmentSelector {

    void selectFragment(NodeGenerator generator,
            SiteStructure site,
            String path,
            String language)
            throws SAXException, SiteException;

}
----
Added: /document/body/section[3]/p[2]
<p> (null)
----
Added: /document/body/section[3]/p[2]/text()
Parameters:
----
Added: /document/body/section[3]/ul[1]
<ul> (null)
----
Added: /document/body/section[3]/ul[1]/li[1]
<li> (null)
----
Added: /document/body/section[3]/ul[1]/li[1]/strong
<strong> (null)
----
Added: /document/body/section[3]/ul[1]/li[1]/strong/text()
generator
----
Added: /document/body/section[3]/ul[1]/li[1]/text()
 - This is a reference to the generator itself.          It allows the fragment selector to invoke the callback functions which          actually generate the node and link XML elements.        
----
Added: /document/body/section[3]/ul[1]/li[2]
<li> (null)
----
Added: /document/body/section[3]/ul[1]/li[2]/strong
<strong> (null)
----
Added: /document/body/section[3]/ul[1]/li[2]/strong/text()
site
----
Added: /document/body/section[3]/ul[1]/li[2]/text()
 - The site structure which the widget shall be based on.        
----
Added: /document/body/section[3]/ul[1]/li[3]
<li> (null)
----
Added: /document/body/section[3]/ul[1]/li[3]/strong
<strong> (null)
----
Added: /document/body/section[3]/ul[1]/li[3]/strong/text()
path
----
Added: /document/body/section[3]/ul[1]/li[3]/text()
 - A reference path. This path is passed from the sitemap          to the generator. It can be an arbitrary path, but usually it is the path of the node          of the currently selected document. It doesn't necessarily have to exist in the site structure.        
----
Added: /document/body/section[3]/ul[1]/li[4]
<li> (null)
----
Added: /document/body/section[3]/ul[1]/li[4]/strong
<strong> (null)
----
Added: /document/body/section[3]/ul[1]/li[4]/strong/text()
language
----
Added: /document/body/section[3]/ul[1]/li[4]/text()
 - The language of the currently selected document.        
----
Added: /document/body/section[3]/p[3]
<p> (null)
----
Added: /document/body/section[3]/p[3]/text()
Exceptions:
----
Added: /document/body/section[3]/ul[2]
<ul> (null)
----
Added: /document/body/section[3]/ul[2]/li[1]
<li> (null)
----
Added: /document/body/section[3]/ul[2]/li[1]/text()[1]
          A 
----
Added: /document/body/section[3]/ul[2]/li[1]/strong
<strong> (null)
----
Added: /document/body/section[3]/ul[2]/li[1]/strong/text()
SAXException
----
Added: /document/body/section[3]/ul[2]/li[1]/text()[3]
 is thrown if an error occurs          during the invocation of the 
----
Added: /document/body/section[3]/ul[2]/li[1]/code
<code> (null)
----
Added: /document/body/section[3]/ul[2]/li[1]/code/text()
NodeGenerator
----
Added: /document/body/section[3]/ul[2]/li[1]/text()[5]
 callback functions.        
----
Added: /document/body/section[3]/ul[2]/li[2]
<li> (null)
----
Added: /document/body/section[3]/ul[2]/li[2]/text()[1]
          A 
----
Added: /document/body/section[3]/ul[2]/li[2]/strong
<strong> (null)
----
Added: /document/body/section[3]/ul[2]/li[2]/strong/text()
SiteException
----
Added: /document/body/section[3]/ul[2]/li[2]/text()[3]
 is thrown if an error occurs while the          site structure is accessed.        
----
Added: /document/body/section[3]/p[4]
<p> (null)
----
Added: /document/body/section[3]/p[4]/text()
        The following fragment selectors are included in the module:      
----
Added: /document/body/section[3]/dl
<dl> (null)
----
Added: /document/body/section[3]/dl/dt[1]
<dt> (null)
----
Added: /document/body/section[3]/dl/dt[1]/text()
BreadcrumbSelector
----
Added: /document/body/section[3]/dl/dd[1]
<dd> (null)
----
Added: /document/body/section[3]/dl/dd[1]/text()
          Selects the nodes from the top-level node down to the currently selected node.          Only the links for the currently selected language are included.        
----
Added: /document/body/section[3]/dl/dt[2]
<dt> (null)
----
Added: /document/body/section[3]/dl/dt[2]/text()
ChildrenSelector
----
Added: /document/body/section[3]/dl/dd[2]
<dd> (null)
----
Added: /document/body/section[3]/dl/dd[2]/text()[1]
          Selects the child nodes of the node identified by the 
----
Added: /document/body/section[3]/dl/dd[2]/em
<em> (null)
----
Added: /document/body/section[3]/dl/dd[2]/em/text()
path
----
Added: /document/body/section[3]/dl/dd[2]/text()[3]
          parameter non-recursively. If the path is "" or "/", the top-level nodes are          generated. Only the links for the currently selected language are included.        
----
Added: /document/body/section[3]/dl/dt[3]
<dt> (null)
----
Added: /document/body/section[3]/dl/dt[3]/text()
LanguagesSelector
----
Added: /document/body/section[3]/dl/dd[3]
<dd> (null)
----
Added: /document/body/section[3]/dl/dd[3]/text()[1]
          Selects the node which is identified by the 
----
Added: /document/body/section[3]/dl/dd[3]/em[1]
<em> (null)
----
Added: /document/body/section[3]/dl/dd[3]/em[1]/text()
path
----
Added: /document/body/section[3]/dl/dd[3]/text()[3]
 parameter and its          links for all languages. The link for the currently selected language will          have the attribute 
----
Added: /document/body/section[3]/dl/dd[3]/em[2]
<em> (null)
----
Added: /document/body/section[3]/dl/dd[3]/em[2]/text()
current="true"
----
Added: /document/body/section[3]/dl/dd[3]/text()[5]
.        
----
Added: /document/body/section[3]/dl/dt[4]
<dt> (null)
----
Added: /document/body/section[3]/dl/dt[4]/text()
SubtreeAndSiblingsSelector
----
Added: /document/body/section[3]/dl/dd[4]
<dd> (null)
----
Added: /document/body/section[3]/dl/dd[4]/text()[1]
          Selects the node identified by the 
----
Added: /document/body/section[3]/dl/dd[4]/em
<em> (null)
----
Added: /document/body/section[3]/dl/dd[4]/em/text()
path
----
Added: /document/body/section[3]/dl/dd[4]/text()[3]
 parameter, its siblings,          and its children recursively. If the path is "" or "/", the nodes of the          whole site are generated. Only the links for the currently selected language          are included.        
----
Added: /document/body/section[3]/dl/dt[5]
<dt> (null)
----
Added: /document/body/section[3]/dl/dt[5]/text()
SubtreeSelector
----
Added: /document/body/section[3]/dl/dd[5]
<dd> (null)
----
Added: /document/body/section[3]/dl/dd[5]/text()[1]
          Selects the node identified by the 
----
Added: /document/body/section[3]/dl/dd[5]/em
<em> (null)
----
Added: /document/body/section[3]/dl/dd[5]/em/text()
path
----
Added: /document/body/section[3]/dl/dd[5]/text()[3]
 parameter and its children          recursively. If the path is "" or "/", the nodes of the whole site are          generated. Only the links for the currently selected language are included.        
----
Added: /document/body/section[4]
<section> (null)
----
Added: /document/body/section[4]/title
<title> (null)
----
Added: /document/body/section[4]/title/text()
Declaring and Calling the Site Fragment Generator
----
Added: /document/body/section[4]/p[1]
<p> (null)
----
Added: /document/body/section[4]/p[1]/text()
        For each type of navigation widget, a separate generator is declared.        To tell the generator which fragment selector to use, specify the        fragment selector class in the declaration:      
----
Added: /document/body/section[4]/source[1]
<source> (null)
----
Added: /document/body/section[4]/source[1]/@space
[attr] space=preserve (http://www.w3.org/XML/1998/namespace)
----
Added: /document/body/section[4]/source[1]/text()
<map:generator name="tabs" logger="lenya.generators.tabs"
    src="org.apache.lenya.modules.navigation.SiteFragmentGenerator">
  <map:parameter name="selector"
    value="org.apache.lenya.modules.navigation.ChildrenSelector"/>
</map:generator>
----
Added: /document/body/section[4]/p[2]
<p> (null)
----
Added: /document/body/section[4]/p[2]/text()
        The following listing shows how the site fragment generator is called:      
----
Added: /document/body/section[4]/source[2]
<source> (null)
----
Added: /document/body/section[4]/source[2]/@space
[attr] space=preserve (http://www.w3.org/XML/1998/namespace)
----
Added: /document/body/section[4]/source[2]/text()
<map:match pattern="tabs">
  <map:generate type="tabs">
    <map:parameter name="pub" value="{page-envelope:publication-id}"/>
    <map:parameter name="area" value="{page-envelope:area}"/>
    <map:parameter name="lang" value="{page-envelope:language}"/>
    <map:parameter name="path" value="{page-envelope:document-path}"/>
    <map:parameter name="selectorPath" value="/"/>
  </map:generate>
  <map:transform src="xslt/navigation/tabs.xsl"/>
  <map:serialize/>
</map:match>
----
Added: /document/body/section[4]/p[3]
<p> (null)
----
Added: /document/body/section[4]/p[3]/text()
        The generator expects the following parameters:      
----
Added: /document/body/section[4]/ul
<ul> (null)
----
Added: /document/body/section[4]/ul/li[1]
<li> (null)
----
Added: /document/body/section[4]/ul/li[1]/strong
<strong> (null)
----
Added: /document/body/section[4]/ul/li[1]/strong/text()
pub
----
Added: /document/body/section[4]/ul/li[1]/text()
 - The current publication ID.        
----
Added: /document/body/section[4]/ul/li[2]
<li> (null)
----
Added: /document/body/section[4]/ul/li[2]/strong
<strong> (null)
----
Added: /document/body/section[4]/ul/li[2]/strong/text()
area
----
Added: /document/body/section[4]/ul/li[2]/text()
 - The current area.        
----
Added: /document/body/section[4]/ul/li[3]
<li> (null)
----
Added: /document/body/section[4]/ul/li[3]/strong
<strong> (null)
----
Added: /document/body/section[4]/ul/li[3]/strong/text()
lang
----
Added: /document/body/section[4]/ul/li[3]/text()
 - The language of the currently selected document.        
----
Added: /document/body/section[4]/ul/li[4]
<li> (null)
----
Added: /document/body/section[4]/ul/li[4]/strong
<strong> (null)
----
Added: /document/body/section[4]/ul/li[4]/strong/text()
path
----
Added: /document/body/section[4]/ul/li[4]/text()
 - The path of the currently selected document.        
----
Added: /document/body/section[4]/ul/li[5]
<li> (null)
----
Added: /document/body/section[4]/ul/li[5]/strong
<strong> (null)
----
Added: /document/body/section[4]/ul/li[5]/strong/text()
selectorPath
----
Added: /document/body/section[4]/ul/li[5]/text()[2]
 - The reference path to be passed to the fragment selector.          In the example above this is the root of the site tree, so the top-level nodes are          rendered as tabs. The 
----
Added: /document/body/section[4]/ul/li[5]/em[1]
<em> (null)
----
Added: /document/body/section[4]/ul/li[5]/em[1]/text()
path
----
Added: /document/body/section[4]/ul/li[5]/text()[4]
 parameter is used to determine which link should get the          
----
Added: /document/body/section[4]/ul/li[5]/em[2]
<em> (null)
----
Added: /document/body/section[4]/ul/li[5]/em[2]/text()
current="true"
----
Added: /document/body/section[4]/ul/li[5]/text()[6]
 attribute.        
----
Added: /document/body/section[5]
<section> (null)
----
Added: /document/body/section[5]/title
<title> (null)
----
Added: /document/body/section[5]/title/text()
Applying an XSL Transformation
----
Added: /document/body/section[5]/p[1]
<p> (null)
----
Added: /document/body/section[5]/p[1]/text()[1]
        The site fragment generator uses a custom output format to support arbitrary formatting options.        The formatting is usually done using XSLT. The stylesheet 
----
Added: /document/body/section[5]/p[1]/code
<code> (null)
----
Added: /document/body/section[5]/p[1]/code/text()
tabs.xsl
----
Added: /document/body/section[5]/p[1]/text()[3]
 from the sitemap snippet        above could for instance look like this:      
----
Added: /document/body/section[5]/source[1]
<source> (null)
----
Added: /document/body/section[5]/source[1]/@space
[attr] space=preserve (http://www.w3.org/XML/1998/namespace)
----
Added: /document/body/section[5]/source[1]/text()
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:site="http://apache.org/lenya/site/1.0"
  xmlns="http://www.w3.org/1999/xhtml"
  exclude-result-prefixes="site"
  >
  
  <xsl:template match="site:fragment">
    <ul id="tabs">
      <xsl:apply-templates select="site:node/site:link"/>
    </ul>
  </xsl:template>
  
  <xsl:template match="site:link">
    <li>
      <xsl:choose>
        <xsl:when test="@current = 'true' or ../@ancestorOfCurrent = 'true'">
          <a href="{@href}"><xsl:value-of select="@label"/></a>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="@label"/>
        </xsl:otherwise>
      </xsl:choose>
    </li>
  </xsl:template>
  
</xsl:stylesheet>
----
Added: /document/body/section[5]/p[2]
<p> (null)
----
Added: /document/body/section[5]/p[2]/text()
        The output XHTML could looke like this:      
----
Added: /document/body/section[5]/source[2]
<source> (null)
----
Added: /document/body/section[5]/source[2]/@space
[attr] space=preserve (http://www.w3.org/XML/1998/namespace)
----
Added: /document/body/section[5]/source[2]/text()
<ul id="tabs" xmlns="http://www.w3.org/1999/xhtml">
  <li>Company</li>
  <li><a href="lenya-document:…">Products</a></li>
  <li>Services</li>
</ul>
----

 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org