forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject cvs commit: xml-forrest/src/resources/convert/anakiaNmaven anakiaNmaven2document11.xsl
Date Thu, 21 Nov 2002 23:25:03 GMT
nicolaken    2002/11/21 15:25:03

  Modified:    src/resources/convert/anakiaNmaven
                        anakiaNmaven2document11.xsl
  Log:
  Yet other templates to reduce the need for hand fixes.
  
  Revision  Changes    Path
  1.3       +48 -7     xml-forrest/src/resources/convert/anakiaNmaven/anakiaNmaven2document11.xsl
  
  Index: anakiaNmaven2document11.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/convert/anakiaNmaven/anakiaNmaven2document11.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- anakiaNmaven2document11.xsl	16 Nov 2002 00:20:14 -0000	1.2
  +++ anakiaNmaven2document11.xsl	21 Nov 2002 23:25:02 -0000	1.3
  @@ -47,6 +47,12 @@
           </header>
       </xsl:template>
   
  +    <xsl:template match="P|p">
  +        <p>
  +          <xsl:apply-templates/>
  +        </p>
  +    </xsl:template>
  +    
       <xsl:template match="figure">
           <figure alt="{title}" src= "{graphic/@fileref}" />
       </xsl:template>
  @@ -64,17 +70,17 @@
          
       </xsl:template>
       
  -    <xsl:template match="source">
  +    <xsl:template match="source|blockquote">
         <xsl:choose>
       	<xsl:when test="name(..)='p'">
       	  <code>
  -    	    <xsl:apply-templates/>
  +    	    <xsl:value-of select="." />
       	  </code> 
       	</xsl:when>
         
       	<xsl:otherwise>
       	  <source>
  -    	    <xsl:apply-templates/>
  +    	    <xsl:value-of select="." />
       	  </source> 
       	</xsl:otherwise>
          </xsl:choose>
  @@ -165,21 +171,56 @@
           
       <xsl:template match="b">
         <strong>
  -        <xsl:apply-templates/>
  +        <xsl:value-of select = "."/>
         </strong>
       </xsl:template>
       
       <xsl:template match="i">
         <em>
  -        <xsl:apply-templates/>
  +        <xsl:value-of select = "."/>
         </em>
       </xsl:template>
   
  -    <!-- Strip fonts -->
  +    <xsl:template match="table">
  +      <table>
  +            <xsl:apply-templates select="node()"/>
  +      </table>
  +    </xsl:template>
  +    
  +            
  +    <xsl:template match="br">
  +      <xsl:choose>
  +	    <xsl:when test="normalize-space(text())">
  +	    	    
  +		  <xsl:choose>
  +		    <xsl:when test="name(..)='p'">
  +		        <xsl:apply-templates/>
  +		      <br/> 
  +		    </xsl:when>
  +	  	    <xsl:otherwise>
  +		      <p>
  +	            <xsl:apply-templates/>
  +		      </p>
  +		    </xsl:otherwise>
  +	       </xsl:choose>
  +	      
  +	    </xsl:when>
  +  	    <xsl:otherwise>
  +	      <br/>
  +	    </xsl:otherwise>
  +       </xsl:choose>
  +    </xsl:template>
  +    
  +    <!-- Strip -->
       <xsl:template match="font">
         <xsl:apply-templates/>
       </xsl:template>
  -            
  +
  +    <xsl:template match="h1|h2|h3|h4">
  +     <xsl:comment> -ATTENTION- THIS IS A SECTION, PLEASE ENCLOSE THE SECTION CONTENTS...
-ATTENTION- </xsl:comment>
  +     <section><title><xsl:apply-templates/></title> <xsl:comment>...
HERE! :-)</xsl:comment></section>
  +    </xsl:template>
  +                
       <xsl:template match="node()|@*" priority="-1">
           <xsl:copy>
               <xsl:apply-templates select="node()|@*"/>
  
  
  

Mime
View raw message