You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2003/06/11 02:00:45 UTC

cvs commit: cocoon-2.1/src/blocks/html/samples samples.xml sitemap.xmap

vgritsenko    2003/06/10 17:00:45

  Added:       src/blocks/html/conf tidy.xsamples
               src/blocks/html/samples samples.xml sitemap.xmap
  Log:
  resurrect html sample - yahoo screen scrape.
  DOES NOT WORK!
  
  Revision  Changes    Path
  1.1                  cocoon-2.1/src/blocks/html/conf/tidy.xsamples
  
  Index: tidy.xsamples
  ===================================================================
  <?xml version="1.0"?>
  
  <xsamples xpath="/samples" unless="group[@name='HTML']">
  
    <group name="HTML">
      <sample name="HTML Block" href="html/">
        Example usages of HTML Block components.
      </sample>
    </group>
  
  </xsamples>
  
  
  
  1.1                  cocoon-2.1/src/blocks/html/samples/samples.xml
  
  Index: samples.xml
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1"?>
  
  <!-- CVS $Id: samples.xml,v 1.1 2003/06/11 00:00:45 vgritsenko Exp $ -->
  
  <samples name="HTML Block Samples" xmlns:xlink="http://www.w3.org/1999/xlink">
  
    <group name="Main examples page.">
      <sample name="Back" href="..">to Cocoon examples main page</sample>
    </group>
  
    <group name="HTMLGenerator">
      <sample name="Yahoo Screen Scrape" href="yahoo">
        Shows how to get remote resource and convert it to valid HTML using HTMLGenerator
      </sample>
    </group>
  </samples>
  
  
  
  1.1                  cocoon-2.1/src/blocks/html/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  <?xml version="1.0"?>
  
  <!--+
      | HTML block samples sitemap
      | CVS $Id: sitemap.xmap,v 1.1 2003/06/11 00:00:45 vgritsenko Exp $
      +-->
  
  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  
  <!-- =========================== Views =================================== -->
  
    <map:views>
      <map:view from-label="content" name="content">
        <map:serialize type="xml"/>
      </map:view>
  
      <map:view name="pretty-content" from-label="data">
        <map:transform src="context://stylesheets/system/xml2html.xslt"/>
        <map:serialize type="html"/>
      </map:view>
  
      <map:view from-position="last" name="links">
        <map:serialize type="links"/>
      </map:view>
    </map:views>
  
  <!-- =========================== Pipelines ================================= -->
  
    <map:pipelines>
      <map:pipeline type="caching">
  
        <map:match pattern="">
          <map:redirect-to uri="welcome"/>
        </map:match>
  
        <!-- list of samples -->
        <map:match pattern="welcome">
          <map:generate src="samples.xml"/>
          <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
            <map:parameter name="contextPath" value="{request:contextPath}"/>
          </map:transform>
          <map:serialize/>
        </map:match>
  
        <!-- ================  TIDY  =========================== -->
  
        <map:match pattern="yahoo">
          <map:generate type="html" src="http://www.yahoo.com">
            <map:parameter name="xpath" value="/html/body/center/table[4]/tr[1]/td[1]"/>
          </map:generate>
          <!-- map:transform src="stylesheets/news.xsl"/ -->
          <map:serialize type="html"/>
        </map:match>
  
      </map:pipeline>
    </map:pipelines>
  </map:sitemap>