stevenn     2003/10/13 10:49:10

  Modified:    src/blocks/slop/samples/yapt/stylesheets
                        filter-slop-output.xsl
  Log:
  adding bulleted lists to YAPT (ooh - the horror!)
  
  Revision  Changes    Path
  1.5       +24 -1     
cocoon-2.1/src/blocks/slop/samples/yapt/stylesheets/filter-slop-output.xsl
  
  Index: filter-slop-output.xsl
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/slop/samples/yapt/stylesheets/filter-slop-output.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- filter-slop-output.xsl    11 Oct 2003 22:55:27 -0000      1.4
  +++ filter-slop-output.xsl    13 Oct 2003 17:49:10 -0000      1.5
  @@ -114,6 +114,13 @@
                            </xsl:for-each>
                        </pre>
             </xsl:when>
  +          <xsl:when test="following-sibling::*[1][self::slop:list]">
  +                     <ul>
  +                         <xsl:for-each 
select="following-sibling::*[1][not(self::slop:empty-line) and 
not(self::slop:slide)]">
  +                             <xsl:call-template name="list-grouper"/>
  +                         </xsl:for-each>
  +                     </ul>
  +          </xsl:when>
             <xsl:otherwise>
                        <p>
                            <xsl:for-each 
select="following-sibling::*[1][not(self::slop:empty-line) and 
not(self::slop:slide)]">
  @@ -142,12 +149,28 @@
           </xsl:for-each>
       </xsl:template>
   
  +    <!-- ditto for list items -->
  +    <xsl:template name="list-grouper">
  +        <xsl:apply-templates mode="list" select="."/>
  +        
  +        <xsl:for-each 
select="following-sibling::*[1][not(self::slop:empty-line) and 
not(self::slop:slide)]">
  +            <xsl:call-template name="list-grouper"/>
  +        </xsl:for-each>
  +    </xsl:template>
  +
       <!-- paragraph grouping mode, by default copy everything, removing slop 
namespace -->
       <xsl:template match="slop:*" mode="paragraph">
           <xsl:element name="{name()}">
               <xsl:copy-of select="@*"/>
               <xsl:apply-templates/>
           </xsl:element>
  +    </xsl:template>
  +
  +    <!-- output code slop:lines as-is, with added carriage return -->
  +    <xsl:template match="slop:line" mode="list">
  +        <li>
  +          <xsl:copy-of select="text()"/>
  +        </li>
       </xsl:template>
   
       <!-- output code slop:lines as-is, with added carriage return -->
  
  
  

Reply via email to