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 book_flash.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:template match="/">
- <book id="{project/@id}">
- <xsl:for-each select="project/chapter">
- <xsl:variable name="m_file"><xsl:value-of select="@href"/></xsl:variable>
- <xsl:apply-templates select="document($m_file)/chapter"/>
- </xsl:for-each>
- </book>
- </xsl:template>
-
- <xsl:template match="chapter">
- <chapter>
- <xsl:if test="@id">
- <xsl:copy-of select="@id"/>
- </xsl:if>
- <xsl:apply-templates select="title"/>
- <xsl:apply-templates select="section"/>
- </chapter>
- </xsl:template>
-
- <xsl:template match="chapter/title">
- <title>Chapter <xsl:value-of select="../@num"/>: <xsl:apply-templates/></title>
- </xsl:template>
-
- <xsl:template match="section/title">
- <title><xsl:value-of select="../@num"/>: <xsl:apply-templates/></title>
- </xsl:template>
-
- <xsl:template match="item/title">
- <title><xsl:apply-templates/> (<xsl:value-of select="../@type"/>)</title>
- </xsl:template>
-
- <xsl:template match="section">
- <xsl:choose>
- <xsl:when test="child::item">
- <section>
- <xsl:if test="@id">
- <xsl:copy-of select="@id"/>
- </xsl:if>
- <xsl:apply-templates select="title"/>
- <xsl:apply-templates select="item"/>
- </section>
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
-
- <xsl:template match="item">
- <item>
- <xsl:if test="@id">
- <xsl:copy-of select="@id"/>
- </xsl:if>
- <xsl:if test="@type">
- <xsl:copy-of select="@type"/>
- </xsl:if>
- <xsl:if test="@page">
- <xsl:copy-of select="@page"/>
- </xsl:if>
- <xsl:apply-templates select="title"/>
- <xsl:apply-templates select="description"/>
- </item>
- </xsl:template>
-
- <xsl:template match="description">
- <description>
- <xsl:choose>
- <xsl:when test="following-sibling::pdb">
- <xsl:text>A 3D molecular model in Rasmol format</xsl:text>
- </xsl:when>
- <xsl:when test="following-sibling::c3d">
- <xsl:text>A 3D molecular model in Chem3D format</xsl:text>
- </xsl:when>
- <xsl:when test="parent::item/@type='IE'">
- <xsl:text>Interactive Exercise</xsl:text>
- </xsl:when>
- <xsl:when test="parent::item/@type='DR'">
- <xsl:text>An electronic flashcard screen to practice remembering reaction patterns and reagents.</xsl:text>
- </xsl:when>
- <xsl:when test="parent::item/@type='AG'">
- <xsl:text>A rotating, 3D version of a text graphic.</xsl:text>
- </xsl:when>
- <xsl:when test="parent::item/@type='CU'">
- <xsl:text>A graphics/audio presentation on a topic involving complex 3D structure or relationships or a dynamic process.</xsl:text>
- </xsl:when>
- <xsl:otherwise><xsl:apply-templates/></xsl:otherwise>
- </xsl:choose>
- </description>
- </xsl:template>
-
- </xsl:stylesheet>