<rules xmlns="http://namespaces.plone.org/xdv" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <!-- Head: title,base,styles and js -->
<!--  <prepend theme="/html/head/base" content="/html/head/base/@*" />
  <before theme="/html/head/meta[@name='xdv-meta']" content="/html/head/meta" />
  <before theme="/html/head/meta[@name='xdv-link']" content="/html/head/link[@rel='stylesheet']" />
  <before theme="/html/head/meta[@name='xdv-css']" content="/html/head/style" />
  <before theme="/html/head/meta[@name='xdv-js']" content="/html/head/script" />
  <before theme="/html/head/meta[@name='xdv-link']" content="/html/head/link" />
-->
  <prepend theme="/html/head" content="/html/head/*"/>

<!-- google analytics -->
  <append theme="/html/head" content="//*[@id='ganalytics']"/>



  <!-- copy body attributes -->
  <prepend theme="/html/body" content="/html/body/@*" />

  <!-- copy personaltools and searchbox -->
  <replace theme="//*[@id='portal-personaltools']" content="//*[@id='portal-personaltools']" />
  <replace theme="//*[@id='portal-searchbox']" content="//*[@id='portal-searchbox']" />

  <!-- language selector -->
  <after content="//*[@id='portal-header']/../*[@id='portal-languageselector']" theme="//*[@id='portal-personaltools-wrapper']" />
  
  <!-- copy portal logo attributes -->
  <prepend theme="//a[@id='portal-logo']" content="//a[@id='portal-logo']/@*" />


  <!-- copy globalnav preserving no-whitespace between elements -->
  <append theme="//*[@id='portal-globalnav']" >
    <xsl:for-each select="//*[@id='portal-globalnav']">
      <xsl:copy-of select="*"/><xsl:text> </xsl:text>
    </xsl:for-each>
  </append>


  <!-- copy breadcrumbs & messages -->
  <!-- only if not / -->
  <replace if-content="//body[not(contains(@class,'section-gefice-asesores-de-empresa'))]" theme="//*[@id='portal-breadcrumbs']" content="//*[@id='portal-breadcrumbs']" />
  <drop if-content="//body[contains(@class,'section-gefice-asesores-de-empresa')]" theme="//*[@id='portal-breadcrumbs']"  />
  
  
  
  <!-- copy  messages -->
  <replace theme="//*[@id='kssPortalMessage']" content="//*[@id='kssPortalMessage']" />

  <!--edit mode -->
  <prepend theme="//div[@id='editplaceholder']" content="//*[@id='content']/../@*" />
  <drop theme="//*[@id='edit-bar']" if-content="not(//div[@class='documentEditable'])"/>
  <replace theme="//*[@id='edit-bar']" content="//*[@id='edit-bar']" />




 
  <!-- copy header -->
  <!--<copy theme="//div[@class='h1ribbon']/div/h1" content="//*[@class='documentFirstHeading']/text()"/>-->
  <copy theme="//div[@class='h1ribbon']/div/h1" content="//*[@id='portal-globalnav']/li[@class='selected']/a/text()"/>
  <!-- theme="//div[@class='h1ribbon']/div/h1" /> -->
  <!--<drop content="//*[@class='documentFirstHeading']"/>-->
 
 <!-- copy content -->
  <copy theme="//*[@id='content']" content="//*[@id='content']/*" />

  <!-- copy attributes to column content, useful for sidecolumns -->
  <prepend theme="//*[@id='portal-column-content']" content="//*[@id='portal-column-content']/@*" />
  <!-- copy sidecolumns -->
  <replace theme="//*[@id='portal-column-one']" content="//*[@id='portal-column-one']" />
  <append theme="//*[@id='portal-column-two']" content="//*[@id='portal-column-two']/*" />

  <!-- copy footer & colophon -->
<!--  <replace theme="//*[@id='portal-footer']" content="//*[@id='portal-footer']" /> -->
  <replace theme="//*[@id='portal-colophon']" content="//*[@id='portal-colophon']" />
  <!-- copy siteactions -->
  <replace theme="//*[@id='portal-siteactions']" content="//*[@id='portal-siteactions']" />

<!-- drop slider on inner pages -->
  <drop if-content="//body[not(contains(@class,'section-gefice-asesores-de-empresa'))]" theme="//*[@id='slider']" />
<!-- drop h1ribbon on main page -->
  <drop if-content="//body[contains(@class,'section-gefice-asesores-de-empresa')]" theme="//*[@class='h1ribbon']" />


<!-- drop video on inner pages -->
  <drop if-content="//body[not(contains(@class,'section-gefice-asesores-de-empresa'))]" theme="//*[@id='video1']" />
  <drop if-content="//body[not(contains(@class,'section-gefice-asesores-de-empresa'))]" theme="//*[@id='metavideo1']" />
  <drop if-content="//body[not(contains(@class,'section-gefice-asesores-de-empresa'))]" theme="//*[@id='metavideo2']" />

  <drop if-content="//body[not(contains(@class,'section-gefice-asesores-de-empresa'))]" theme="//*[contains(@class,'solohome')]" />

<!-- drop big video on non bigvideo pages -->
  <drop theme="//*[@id='bigvideo']"  if-content="//body[not(contains(@class,'section-video'))]" />
  <drop theme="//*[@id='portal-column-two']"  if-content="//body[contains(@class,'section-video')]" />
  <!--<drop theme="//*[@id='bigvideo']" />-->
  


</rules>

