Re: [docbook-apps] breadcrumbs root node

From
Bob Stayton <>
Date
2009-08-04T23:51:07+00:00
ID
04dc01ca155e$5f42e890$0a00a8c0@pazu
Thread
Re: [docbook-apps] breadcrumbs root node
You could 
change your select statement to require a parent on each 
element:

 

            
<xsl:for-each 
select="$this.node/ancestor::*[parent::*]">

 

Since the root node does not have a parent, it 
would not be selected.  I have not tested it, but I think it would 
work.

 

Bob Stayton
Sagehill Enterprises


 

 

  
----- Original Message ----- 

  
From: 
  Laurie 
  Burley 

  
To:  
  

  
Sent: Monday, August 03, 2009 1:21 
  AM

  
Subject: [docbook-apps] breadcrumbs root 
  node

  

  

  
Hi,

  
 

  
Has anyone figured out a way to remove the root node from 
  breadcrumbs in their html output?

  
 

  
I am using the following code to generate my 
  breadcrumbs:

  
 

  
<xsl:template 
  name="breadcrumbs">

  
      
  <xsl:param name="this.node" select="."/>

  
      
  <table class="headertable">

  
         
  <tr>

  
            
  <td width="95%">

  
         
     <div class="breadcrumbs">

  
            
  <xsl:for-each select="$this.node/ancestor::*">

  
              
  <span class="breadcrumb-link">

  
                 
  <a>

  
                
  <xsl:attribute name="href">

  
              
       <xsl:call-template 
  name="href.target">

  
            
         <xsl:with-param name="object" 
  select="."/>

  
               
      <xsl:with-param name="context" 
  select="$this.node"/>

  
               
      </xsl:call-template>

  
                
  </xsl:attribute>

  
                
  <xsl:apply-templates select="." 
  mode="title.markup"/>

  
                
  </a>

  
    
           </span>

  
             
  <xsl:text> &gt; </xsl:text>

  
         
  </xsl:for-each>

  
 

  
<!-- And display the 
  current node, but not as a link -->

  
<span 
  class="breadcrumb-node">

  
   
  <xsl:apply-templates select="$this.node" 
  mode="title.markup"/>

  
</span>

  
</div></td>

  
<!--add a logo to the top 
  right corner-->

  
<xsl:call-template 
  name="logo"/>

  
</tr>

  
</table>

  
</xsl:template>

  
 

  
Any help would be greatly appreciated,

  
 

  
Kind Regards,

  
 

  
Laurie Burley