home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
- <!-- Edugen XSL Stylesheets V1.0 =======================================
-
- File page.xsl for Organic View
-
- This file is part of the Edugen XSL Stylesheets.
- Copyright (c) 2002 WWL Corp. - A Subsidiary of John Wiley & Sons, Inc.
- ========================================================================= -->
- <xsl:output method="xml" indent="yes"/>
-
- <xsl:param name="id"></xsl:param>
-
- <xsl:template match="/">
- <xsl:apply-templates select="//*[@id=$id]"/>
- </xsl:template>
-
-
- <xsl:template match="chapter">
- <xsl:apply-templates select="section"/>
- </xsl:template>
-
- <xsl:template match="section|item">
- <xsl:variable name="chapter_id"><xsl:value-of select="../../@id"/></xsl:variable>
- <xsl:variable name="section_num"><xsl:value-of select="../@num"/></xsl:variable>
- <xsl:variable name="item_id"><xsl:value-of select="@id"/></xsl:variable>
-
- <page id="{$item_id}" xmlns:xlink="http://www.w3.org/1999/xlink" xml:base="media/content/{$chapter_id}/">
- <head num="{$section_num}">
- <xsl:apply-templates select="../title"/>
- </head>
- <title>
- <xsl:apply-templates select="title"/>
- </title>
-
- <content>
- <section>
- <xsl:apply-templates select="director|pdb|c3d|qtmovie"/>
- </section>
- </content>
-
- </page>
-
- </xsl:template>
-
-
- <xsl:template match="section/title">
- <xsl:apply-templates/>
- </xsl:template>
-
- <xsl:template match="item/title">
- <xsl:apply-templates/>
- </xsl:template>
-
- <xsl:template match="director">
- <xsl:choose>
- <xsl:when test="@src != ''">
- <director src="{@src}" width="640" height="480" border="0" id="{@id}">
- <xsl:apply-templates select="param"/>
- </director>
- </xsl:when>
- <xsl:otherwise>
- <para>This resource is not implemented.</para>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="param">
- <xsl:copy-of select="."/>
- </xsl:template>
-
- <xsl:template match="pdb">
- <xsl:choose>
- <xsl:when test="@src != ''">
- <pdb src="{@src}"/>
- </xsl:when>
- <xsl:otherwise>
- <para>This resource is not implemented.</para>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="c3d">
-
- <xsl:choose>
- <xsl:when test="@src != ''">
- <c3d src="{@src}"/>
- </xsl:when>
- <xsl:otherwise>
- <para>This resource is not implemented.</para>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="qtmovie">
- <xsl:choose>
- <xsl:when test="@src != ''">
- <xsl:copy-of select="."/>
- </xsl:when>
- <xsl:otherwise>
- <para>This resource is not implemented.</para>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- </xsl:stylesheet>