home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / layout.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  1.9 KB  |  56 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:osm="http://osmosis.gr/osml/1.0">
  18.   <xsl:output method="xml"/>
  19.   <xsl:template match="/site">
  20.     <osm:site>
  21.       <xsl:apply-templates select="layout"/>
  22.     </osm:site>
  23.   </xsl:template>
  24.   <xsl:template match="layout">
  25.     <xsl:apply-templates/>
  26.   </xsl:template>
  27.   <xsl:template match="osm:page">
  28.     <xsl:apply-templates/>
  29.   </xsl:template>
  30.   <xsl:template match="osm:content-copy">
  31.     <xsl:call-template name="getContent">
  32.       <xsl:with-param name="select" select="@select"/>
  33.     </xsl:call-template>
  34.   </xsl:template>
  35.   <xsl:template match="osm:block-copy">
  36.     <xsl:call-template name="getBlock">
  37.       <xsl:with-param name="select" select="@select"/>
  38.     </xsl:call-template>
  39.   </xsl:template>
  40.   <xsl:template name="getContent">
  41.     <xsl:param name="select"/>
  42.     <xsl:apply-templates select="//*[@contentID=$select]"/>
  43.   </xsl:template>
  44.   <xsl:template name="getBlock">
  45.     <xsl:param name="select"/>
  46.     <xsl:apply-templates select="//osm:blocks/osm:block[@blockID=$select]"/>
  47.   </xsl:template>
  48.   <!-- just copy all other elements -->
  49.   <xsl:template match="node()|@*" priority="-1">
  50.     <xsl:copy>
  51.       <xsl:apply-templates select="@*"/>
  52.       <xsl:apply-templates/>
  53.     </xsl:copy>
  54.   </xsl:template>
  55. </xsl:stylesheet>
  56.