<?xml version="1.0"?>
<!--@+leo-->

<!--@+node:0::@file toc_imsmanifest.xml.xsl-->
<!--@+body-->
<!--@@first <?xml version="1.0"?>-->
<!--@@language html-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>


<!--@<< main template >>-->
<!--@+node:1::<< main template >>-->
<!--@+body-->
<!--@@code-->

<xsl:template match="/">

  
<!--@<<manifest>>-->
  <!--@+node:1::<< manifest >>-->
  <!--@+body-->
  <!--@@code-->
  
    <manifest identifier="MANIFEST1" xmlns="http://www.imsglobal.org/xsd/imscp_v1p1" 
      xmlns:imsmd="http://www.imsglobal.org/xsd/imsmd_v1p2" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1 imscp_v1p1p3.xsd http://www.imsglobal.org/xsd/imsmd_v1p2 imsmd_v1p2p2.xsd">
  
  	
  <!--@<< metadata >>-->
	  <!--@+node:1::<< metadata >>-->
	  <!--@+body-->
	  <!--@@code-->
	  
	  <metadata>
	    <schema>IMS CONTENT</schema>
	    <schemaversion>1.0</schemaversion>
	    <imsmd:lom>
	      <imsmd:general>
	        <imsmd:title>
	          <imsmd:langstring xml:lang="en">yo wattup ma home boy</imsmd:langstring>
	        </imsmd:title>
	      </imsmd:general>
	    </imsmd:lom>
	  </metadata>
	  <!--@-body-->
	  <!--@-node:1::<< metadata >>-->

  	
  <!--@<< organizations >>-->
	  <!--@+node:2::<< organizations >>-->
	  <!--@+body-->
	  <!--@@code-->
	  
	  <organizations default="MANIFEST01_ORG1">
	    <organization identifier="MANIFEST01_ORG1">
	      <xsl:for-each select="bookshelf/category">
	        <xsl:variable name="catcount" select="position() * 100"/>
	  	  <item identifier="{concat('MANIFEST01_ITEM',$catcount)}" identifierref="MANIFEST01_RESOURCE00">
	        <title><xsl:value-of select="@alias"/></title>        
	  
	        <xsl:for-each select="subcategory">
	          <xsl:variable name="subcatcount" select="position() * 10"/>        
	          <item identifier="{concat('MANIFEST01_ITEM',$subcatcount)}" identifierref="MANIFEST01_RESOURCE00">
	  		<title><xsl:value-of select="@alias"/></title>        
	  		<xsl:for-each select="format">
	            <xsl:for-each select="sbook">
	  		  
	              <xsl:variable name="rescount" select="$catcount + $subcatcount + position()"/>
	  			<item identifier="{concat('MANIFEST01_ITEM',$rescount)}" identifierref="{concat('MANIFEST01_RESOURCE', $rescount)}" isvisible="true" parameters="">
	                <title><xsl:value-of select="alias"/></title>
	              </item>		
	  				 
	            </xsl:for-each>
	          </xsl:for-each>
	          </item>
	  	  </xsl:for-each>
	  	  </item>
	  	</xsl:for-each> 
	    </organization>
	  </organizations>
	  

	  <!--@-body-->
	  <!--@-node:2::<< organizations >>-->

  	
  <!--@<< resources >>-->
	  <!--@+node:3::<< resources >>-->
	  <!--@+body-->
	  <!--@@code-->
	  
	  <resources>
	  
	      <xsl:for-each select="bookshelf/category">
	        <xsl:variable name="catcount" select="position() * 100"/>
	        <xsl:for-each select="subcategory">
	          <xsl:variable name="subcatcount" select="position() * 10"/>        
	          <xsl:for-each select="format">
	            <xsl:for-each select="sbook">
	  		  
	              <xsl:variable name="rescount" select="$catcount + $subcatcount + position()"/>
	              <resource identifier="{concat('MANIFEST01_RESOURCE', $rescount)}" type="webcontent" >
	  <xsl:attribute name="href"><xsl:value-of select="../../../@name"/>/<xsl:value-of select="../../@name"/>/<xsl:value-of select="../@name"/>/<xsl:value-of select="title"/>/slide01.htm</xsl:attribute>			
	                <file>
	  <xsl:attribute name="href"><xsl:value-of select="../../../@name"/>/<xsl:value-of select="../../@name"/>/<xsl:value-of select="../@name"/>/<xsl:value-of select="title"/>/slide01.htm</xsl:attribute>			  
	  			  </file>
	              </resource>
	            
	  		  </xsl:for-each>
	          </xsl:for-each>
	        </xsl:for-each>
	  	</xsl:for-each> 
	  
	      <resource identifier="MANIFEST01_RESOURCE00" type="webcontent" href="blank.htm">
	        <file href="blank.htm"/>
	      </resource>
	  	
	  	
	  </resources>

	  <!--@-body-->
	  <!--@-node:3::<< resources >>-->

  	
    </manifest>

  <!--@-body-->
  <!--@-node:1::<< manifest >>-->

	
</xsl:template>
<!--@-body-->
<!--@-node:1::<< main template >>-->


</xsl:stylesheet>
<!--@-body-->
<!--@-node:0::@file toc_imsmanifest.xml.xsl-->
<!--@-leo-->