You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by di...@apache.org on 2002/12/16 17:03:00 UTC

cvs commit: jakarta-turbine-maven/src/plugins-build/xdoc site.jsl plugin.jelly

dion        2002/12/16 08:02:59

  Modified:    src/plugins-build/xdoc site.jsl plugin.jelly
  Log:
  Added lots of trim="false" and prettyPrint="true"
  Alexei, your turn....
  
  Revision  Changes    Path
  1.13      +39 -44    jakarta-turbine-maven/src/plugins-build/xdoc/site.jsl
  
  Index: site.jsl
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/xdoc/site.jsl,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- site.jsl	13 Dec 2002 16:02:02 -0000	1.12
  +++ site.jsl	16 Dec 2002 16:02:58 -0000	1.13
  @@ -9,8 +9,8 @@
            xmlns:util="jelly:util"
            xmlns:x="jelly:xml"
            xmlns:jslXdoc="jslXdoc"
  -         xmlns="dummy">
  -      <jsl:template match="document">
  +         xmlns="dummy" trim="false">
  +      <jsl:template match="document" trim="false">
   
           <x:doctype name="html" 
             publicId="-//CollabNet//DTD XHTML 1.0 Transitional//EN"
  @@ -31,10 +31,10 @@
                 @import url(${tigrisCss});
                 @import url(${mavenCss});
               ]]></style>
  -            <x:element name="script">
  -              <x:attribute name="type">text/javascript</x:attribute>
  +            <x:element name="script"><x:attribute name="type">text/javascript</x:attribute>
                 if (document.layers) {
  -                document.writeln('<link rel="stylesheet" type="text/css" href="${relativePath}/style/ns4_only.css" media="screen" /><link rel="stylesheet" type="text/css" href="${relativePath}/style/maven_ns4_only.css" media="screen"/>');
  +                document.writeln(''+
  +                '<link rel="stylesheet" type="text/css" href="${relativePath}/style/ns4_only.css" media="screen" /><link rel="stylesheet" type="text/css" href="${relativePath}/style/maven_ns4_only.css" media="screen"/>');
                 }
               </x:element>
   
  @@ -265,19 +265,19 @@
         </jsl:template>
   
         <!-- process the properties of the doc -->
  -      <jsl:template match="properties">
  +      <jsl:template match="properties" trim="false">
           <!-- stick head block here later -->
         </jsl:template>
         
         <!-- Process a menu for the navigation bar -->
  -      <jsl:template match="menu" trim="no">
  +      <jsl:template match="menu" trim="false">
           <div>
             <strong><x:expr select="@name"/></strong>
             <jsl:applyTemplates select="item" />
           </div>
         </jsl:template>
   
  -      <jsl:template match="item">
  +      <jsl:template match="item" trim="false">
           <div>
             <j:set var="_name"><x:expr select="@name" /></j:set>
             <j:set var="_link"><x:expr select="@href" /></j:set>
  @@ -287,7 +287,7 @@
         </jsl:template>
   
         <!-- Process the breadcrumb navbar -->
  -      <jsl:template match="links">
  +      <jsl:template match="links" trim="false">
           <j:set var="linkCount" value="1" />
           <x:forEach var="link" select="item">
             <j:if test="${linkCount != 1}">|</j:if>
  @@ -299,7 +299,7 @@
         </jsl:template>   
   
         <!-- process a documentation section -->
  -      <jsl:template match="section">
  +      <jsl:template match="section" trim="false">
           <div class="h3">
           <j:set var="_sectionName"><x:expr select="@name"/></j:set>
           <j:if test="${!empty(_sectionName)}">
  @@ -309,7 +309,7 @@
           </div>
         </jsl:template>
   
  -      <jsl:template match="subsection">
  +      <jsl:template match="subsection" trim="false">
           <div class="h4">
           <j:set var="_sectionName" trim="false"><x:expr select="@name"/></j:set>
           <j:if test="${!empty(_sectionName)}">
  @@ -319,32 +319,30 @@
           </div>
         </jsl:template>
   
  -      <jsl:template match="source">
  +      <jsl:template match="source" trim="false">
           <div id="source">
             <pre><x:expr select="."/></pre>
           </div>
         </jsl:template>
   
  -      <jsl:template match="table">
  +      <jsl:template match="table" trim="false">
           <j:set var="rowcount" value="0"/>
           <table cellpadding="3" cellspacing="2" border="1" width="100%">
             <jsl:applyTemplates select="*"/>
           </table>
         </jsl:template>
         
  -      <jsl:template match="tr">
  -        <x:element name="tr">
  +      <jsl:template match="tr" trim="false">
  +        <j:choose>
  +          <j:when test="${rowMode == 'a'}">
  +            <j:set var="rowMode" value="b"/>
  +          </j:when>
  +          <j:otherwise>
  +            <j:set var="rowMode" value="a"/>
  +          </j:otherwise>
  +        </j:choose>
   
  -          <j:choose>
  -            <j:when test="${rowMode == 'a'}">
  -              <j:set var="rowMode" value="b"/>
  -            </j:when>
  -            <j:otherwise>
  -              <j:set var="rowMode" value="a"/>
  -            </j:otherwise>
  -          </j:choose>
  -
  -          <x:attribute name="class">${rowMode}</x:attribute>
  +        <x:element name="tr"><x:attribute name="class">${rowMode}</x:attribute>
             
             <!-- copy attributes FIXME: Shouldn't this only be colspan|rowspan? -->
             <x:forEach select="@*">
  @@ -359,11 +357,11 @@
         <!--************************-->
         <!-- glossary documentation -->
         <!--************************-->
  -      <jsl:template match="glossary">
  +      <jsl:template match="glossary" trim="false">
           <jsl:applyTemplates select="glossary-entries/glossary-entry" />
         </jsl:template>
         
  -      <jsl:template match="glossary-entry">
  +      <jsl:template match="glossary-entry" trim="false">
           <strong><x:expr select="name" /></strong>
           <br/>
           <x:expr select="definition" />
  @@ -373,34 +371,31 @@
         <!--************************-->
         <!-- goals documentation    -->
         <!--************************-->
  -      <jsl:template match="goals">
  +      <jsl:template match="goals" trim="false">
           <!-- reset row alternation -->
           <j:set var="rowMode" value="" />
           <div class="h3">
             <h3><a name="Goals">Goals</a></h3>
             <table>
  -            <tr><th>Goal</th><th>Description</th></tr>
  +            <tr width='100%'><th>Goal</th><th>Description</th></tr>
               <jsl:applyTemplates select="goal"/>
             </table>
           </div>
         </jsl:template>
         
         <!-- a goal -->
  -      <jsl:template match="goal">
           <!-- FIXME: this is copied from tr - there must be a way of
                calling templates in jsl? -->
  -        <x:element name="tr">
  -
  -          <j:choose>
  -            <j:when test="${rowMode == 'a'}">
  -              <j:set var="rowMode" value="b"/>
  -            </j:when>
  -            <j:otherwise>
  -              <j:set var="rowMode" value="a"/>
  -            </j:otherwise>
  -          </j:choose>
  -
  -          <x:attribute name="class">${rowMode}</x:attribute>
  +      <jsl:template match="goal" trim="false">
  +        <j:choose>
  +          <j:when test="${rowMode == 'a'}">
  +            <j:set var="rowMode" value="b"/>
  +          </j:when>
  +          <j:otherwise>
  +            <j:set var="rowMode" value="a"/>
  +          </j:otherwise>
  +        </j:choose>
  +        <x:element name="tr"><x:attribute name="class">${rowMode}</x:attribute>
             
             <!-- copy attributes -->
             <x:forEach select="@*">
  @@ -415,8 +410,8 @@
   
         
         <!-- copy any other elements through -->
  -      <jsl:template match="*" trim="no">
  -        <jsl:copy>
  +      <jsl:template match="*" trim="false">
  +        <jsl:copy trim="false">
             <jsl:applyTemplates />
           </jsl:copy>
         </jsl:template>
  
  
  
  1.34      +1 -1      jakarta-turbine-maven/src/plugins-build/xdoc/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/xdoc/plugin.jelly,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- plugin.jelly	13 Dec 2002 16:01:38 -0000	1.33
  +++ plugin.jelly	16 Dec 2002 16:02:59 -0000	1.34
  @@ -439,7 +439,7 @@
   					<x:parse var="doc" xml="${file.toURL()}" />
   					
   					<j:file name="${outFile}" encoding="${outputencoding}"
  -					  omitXmlDeclaration="true" outputMode="html">
  +					  omitXmlDeclaration="true" outputMode="html" trim="no" prettyPrint="yes">
   						<j:include uri="${stylesheet.toString()}" />
   					</j:file>        
   				</j:forEach>