You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cr...@apache.org on 2004/02/21 07:20:38 UTC

cvs commit: cocoon-2.1/src/blocks/scratchpad/samples/othello/osml/core layout.xsl

crossley    2004/02/20 22:20:38

  Modified:    src/blocks/scratchpad/samples/othello/osml/core layout.xsl
  Log:
  Used mac2unix to fix these line-endings issues.
  
  Revision  Changes    Path
  1.5       +40 -1     cocoon-2.1/src/blocks/scratchpad/samples/othello/osml/core/layout.xsl
  
  Index: layout.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/scratchpad/samples/othello/osml/core/layout.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- layout.xsl	18 Feb 2004 22:30:17 -0000	1.4
  +++ layout.xsl	21 Feb 2004 06:20:38 -0000	1.5
  @@ -1 +1,40 @@
  -<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:osm="http://osmosis.gr/osml/1.0">
  <xsl:output method="xml"/>
  <xsl:template match="/site">
    <osm:site>
      <xsl:apply-templates select="layout"/>
    </osm:site>
  </xsl:template>
  <xsl:template match="layout">
    <xsl:apply-templates/>
  </xsl:template>
  <xsl:template match="osm:page">
    <xsl:apply-templates/>
  </xsl:template>
  <xsl:template match="osm:content-copy">
    <xsl:call-template name="getContent">
      <xsl:with-param name="select" select="@select"/>
    </xsl:call-template>
  </xsl:template>
  <xsl:template match="osm:block-copy">
    <xsl:call-template name="getBlock">
      <xsl:with-param name="select" select="@select"/>
    </xsl:call-template>
  </xsl:template>
  <xsl:template name="getContent">
    <xsl:param name="select"/>
    <xsl:apply-templates select="//*[@contentID=$select]"/>
  </xsl:template>
  <xsl:template name="getBlock">
    <xsl:param name="select"/>
    <xsl:apply-templates select="//osm:blocks/osm:block[@blockID=$select]"/>
  </xsl:template>
  <!-- just copy all other elements -->
  <xsl:template match="node()|@*" priority="-1">
    <xsl:copy>
      <xsl:apply-templates select="@*"/>
      <xsl:apply-templates/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>
  \ No newline at end of file
  +<?xml version="1.0" encoding="utf-8"?>
  +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:osm="http://osmosis.gr/osml/1.0">
  +  <xsl:output method="xml"/>
  +  <xsl:template match="/site">
  +    <osm:site>
  +      <xsl:apply-templates select="layout"/>
  +    </osm:site>
  +  </xsl:template>
  +  <xsl:template match="layout">
  +    <xsl:apply-templates/>
  +  </xsl:template>
  +  <xsl:template match="osm:page">
  +    <xsl:apply-templates/>
  +  </xsl:template>
  +  <xsl:template match="osm:content-copy">
  +    <xsl:call-template name="getContent">
  +      <xsl:with-param name="select" select="@select"/>
  +    </xsl:call-template>
  +  </xsl:template>
  +  <xsl:template match="osm:block-copy">
  +    <xsl:call-template name="getBlock">
  +      <xsl:with-param name="select" select="@select"/>
  +    </xsl:call-template>
  +  </xsl:template>
  +  <xsl:template name="getContent">
  +    <xsl:param name="select"/>
  +    <xsl:apply-templates select="//*[@contentID=$select]"/>
  +  </xsl:template>
  +  <xsl:template name="getBlock">
  +    <xsl:param name="select"/>
  +    <xsl:apply-templates select="//osm:blocks/osm:block[@blockID=$select]"/>
  +  </xsl:template>
  +  <!-- just copy all other elements -->
  +  <xsl:template match="node()|@*" priority="-1">
  +    <xsl:copy>
  +      <xsl:apply-templates select="@*"/>
  +      <xsl:apply-templates/>
  +    </xsl:copy>
  +  </xsl:template>
  +</xsl:stylesheet>