vmote       2003/03/18 01:15:36

  Modified:    src/documentation sitemap.xmap
  Added:       src/documentation/resources/stylesheets compliance2fo.xsl
                        compliance2html.xsl
  Log:
  Use custom conversions for compliance.xml for Forrest web site creation.
  
  Revision  Changes    Path
  1.13      +6 -10     xml-fop/src/documentation/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/documentation/sitemap.xmap,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- sitemap.xmap      18 Mar 2003 08:55:29 -0000      1.12
  +++ sitemap.xmap      18 Mar 2003 09:15:35 -0000      1.13
  @@ -330,14 +330,11 @@
   
         <!-- ========================== FOP Additions ========================== -->
   
  -   <map:match pattern="body-compliance.xml">
  -     <map:generate type="file-nolabel" src="content/xdocs/compliance.xml"/>
  -     <map:transform src="resources/stylesheets/compliance2document.xsl" 
label="content"/>
  -     <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>
  -      <map:parameter name="path" value="compliance"/>
  -     </map:call>
  -   </map:match>
  +         <map:match pattern="body-compliance.xml">
  +           <map:generate type="file-nolabel" src="content/xdocs/compliance.xml"/>
  +           <map:transform src="resources/stylesheets/compliance2html.xsl"/>
  +           <map:serialize type="xml"/>
  +         </map:match>
   
   <!-- ======================== End FOP Additions ======================== -->
   
  @@ -776,8 +773,7 @@
   
      <map:match pattern="compliance.pdf">
       <map:generate type="file-nolabel" src="content/xdocs/compliance.xml"/>
  -    <map:transform src="resources/stylesheets/compliance2document.xsl" 
label="content"/>
  -    <map:transform src="skins/forrest-site/xslt/fo/document2fo.xsl"/>
  +    <map:transform src="resources/stylesheets/compliance2fo.xsl"/>
       <map:serialize type="fo2pdf"/>
      </map:match>
   
  
  
  
  1.1                  
xml-fop/src/documentation/resources/stylesheets/compliance2fo.xsl
  
  Index: compliance2fo.xsl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!-- $Id: compliance2fo.xsl,v 1.1 2003/03/18 09:15:36 vmote Exp $ -->
  
  <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
      xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  
  <xsl:preserve-space elements="*"/>
  
  <xsl:template match="/compliance">
        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  
  <!--
  
                <fo:layout-master-set>
                        <fo:simple-page-master master-name="simple"
                                                                                
page-height="29.7cm"
                                                                                
page-width="21cm"
                                                                                
margin-top="1.5cm"
                                                                                
margin-bottom="1.5cm"
                                                                                
margin-left="2.5cm"
                                                                                
margin-right="2.5cm">
                                <fo:region-body margin-top="1.5cm"/>
                                <fo:region-before extent="1.5cm"/>
                                <fo:region-after extent="1.5cm"/>
                        </fo:simple-page-master>
                </fo:layout-master-set>
                <fo:page-sequence master-reference="simple"
                            font-family="serif"
                            font-size="11pt">
                        <fo:static-content flow-name="xsl-region-before">
                                <fo:block text-align="end"
                                                        font-size="10pt"
                                                        font-family="serif"
                                                        line-height="14pt" >
                                        XSL-FO Compliance - p. <fo:page-number/>
                                </fo:block>
                        </fo:static-content>
                        <fo:flow flow-name="xsl-region-body">
          <xsl:apply-templates select="head"/>
          <xsl:apply-templates select="body"/>
                        </fo:flow>
                </fo:page-sequence>
  -->
        </fo:root>
  </xsl:template>
  <!--
  
  <xsl:template match="head">
    <fo:block
        font-size="18pt"
        text-align="center">
      <xsl:value-of select="/compliance/head/title"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="body">
    <xsl:apply-templates select="standard"/>
  </xsl:template>
  
  <xsl:template match="standard">
    <fo:block
        font-size="16pt"
        text-align="left">
      <xsl:value-of select="@name"/>
    </fo:block>
    <xsl:apply-templates select="explanatory"/>
    <xsl:apply-templates select="level-1"/>
  </xsl:template>
  
  <xsl:template match="level-1">
    <fo:block
        font-size="16pt"
        text-align="left">
      <xsl:value-of select="@name"/>
    </fo:block>
    <xsl:apply-templates select="explanatory"/>
    <fo:table width="16mm">
      <fo:table-header>
        <fo:table-row>
          <fo:table-cell number-rows-spanned="2">
            <xsl:value-of select="@compliance-item-desc"/>
          </fo:table-cell>
          <fo:table-cell number-cols-spanned="3">
            Support
          </fo:table-cell>
          <fo:table-cell number-rows-spanned="2">
            Comments
          </fo:table-cell>
        </fo:table-row>
        <fo:table-row>
          <fo:table-cell>
            <xsl:value-of select="/compliance/body/standard/@compliance-level-1-desc"/>
          </fo:table-cell>
          <fo:table-cell>
            <xsl:value-of select="/compliance/body/standard/@compliance-level-2-desc"/>
          </fo:table-cell>
          <fo:table-cell>
            <xsl:value-of select="/compliance/body/standard/@compliance-level-3-desc"/>
          </fo:table-cell>
        </fo:table-row>
      </fo:table-header>
      <xsl:apply-templates select="level-2"/>
    </fo:table>
  </xsl:template>
  
  <xsl:template match="explanatory">
    <xsl:for-each select="p">
      <fo:block>
        <xsl:apply-templates/>
      </fo:block>
    </xsl:for-each>
  </xsl:template>
  
  <xsl:template match="level-2">
    <fo:table-row>
      <fo:table-cell number-cols-spanned="5">
        <xsl:value-of select="@name"/>
      </fo:table-cell>
    </fo:table-row>
    <xsl:apply-templates select="level-3"/>
  </xsl:template>
  
  <xsl:template match="level-3">
    <fo:table-row>
      <fo:table-cell>
        <xsl:value-of select="@name"/>
      </fo:table-cell>
      <fo:table-cell>
        <xsl:attribute name="class">
          <xsl:choose>
            <xsl:when test="@comply='yes'">
              <xsl:text>yes</xsl:text>
            </xsl:when>
            <xsl:when test="@comply='no'">
              <xsl:choose>
                <xsl:when test="@compliance-level > 1">
                  <xsl:text>yes</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>no</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:when test="@comply='partial'">
              <xsl:choose>
                <xsl:when test="@compliance-level > 1">
                  <xsl:text>yes</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>partial</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
              <xsl:text></xsl:text>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>
        <xsl:choose>
          <xsl:when test="@compliance-level=1">
            <xsl:value-of select="@comply"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:text>.</xsl:text>
          </xsl:otherwise>
        </xsl:choose>
      </fo:table-cell>
      <fo:table-cell>
        <xsl:attribute name="class">
          <xsl:choose>
            <xsl:when test="@comply='yes'">
              <xsl:text>yes</xsl:text>
            </xsl:when>
            <xsl:when test="@comply='no'">
              <xsl:choose>
                <xsl:when test="@compliance-level > 2">
                  <xsl:text>yes</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>no</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:when test="@comply='partial'">
              <xsl:choose>
                <xsl:when test="@compliance-level > 2">
                  <xsl:text>yes</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>partial</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
              <xsl:text></xsl:text>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>
        <xsl:choose>
          <xsl:when test="@compliance-level=2">
            <xsl:value-of select="@comply"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:text>.</xsl:text>
          </xsl:otherwise>
        </xsl:choose>
      </fo:table-cell>
      <fo:table-cell>
        <xsl:attribute name="class">
          <xsl:choose>
            <xsl:when test="@comply='yes'">
              <xsl:text>yes</xsl:text>
            </xsl:when>
            <xsl:when test="@comply='no'">
              <xsl:choose>
                <xsl:when test="@compliance-level > 3">
                  <xsl:text>yes</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>no</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:when test="@comply='partial'">
              <xsl:choose>
                <xsl:when test="@compliance-level > 3">
                  <xsl:text>yes</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>partial</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
              <xsl:text></xsl:text>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>
        <xsl:choose>
          <xsl:when test="@compliance-level=3">
            <xsl:value-of select="@comply"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:text>.</xsl:text>
          </xsl:otherwise>
        </xsl:choose>
      </fo:table-cell>
      <xsl:choose>
        <xsl:when test="count(comment) > 0">
          <fo:table-cell align="left">
            <fo:list>
              <xsl:for-each select="comment">
                <fo:list-item>
                  <xsl:value-of select="."/>
               </fo:list-item>
             </xsl:for-each>
            </fo:list>
          </fo:table-cell>
        </xsl:when>
        <xsl:otherwise>
          <fo:table-cell align="center">
            <xsl:text>.</xsl:text>
          </fo:table-cell>
        </xsl:otherwise>
      </xsl:choose>
    </fo:table-row>
  </xsl:template>
  
  -->
  
  </xsl:stylesheet>
  
  <!-- Last Line of $RCSfile: compliance2fo.xsl,v $ -->
  
  
  1.1                  
xml-fop/src/documentation/resources/stylesheets/compliance2html.xsl
  
  Index: compliance2html.xsl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!-- $Id: compliance2html.xsl,v 1.1 2003/03/18 09:15:36 vmote Exp $ -->
  
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
  
  <xsl:preserve-space elements="*"/>
  
  <xsl:template match="/compliance">
  <!-- Forrest/Cocoon will place the output from this stylesheet inside of a
       larger html document. The output here is all within one <div> tag. -->
    <div class="content">
    <xsl:apply-templates select="head"/>
    <xsl:apply-templates select="body"/>
    </div>
  </xsl:template>
  
  <xsl:template match="head">
        <head>
        <meta http-equiv="Content-Language" content="en-us"/>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
        <link type="text/css" href="skin/page.css" rel="stylesheet"/>
        <style>
        &lt;!--
        .yes         { background-color: #99CCFF }
        .no          { background-color: #FF99CC }
        .partial     { background-color: #C0C0C0 }
        .category    { background-color: #FFCC66;
                       font-size: 1.2em }
        --&gt;
        </style>
        </head>
  </xsl:template>
  
  <xsl:template match="body">
    <body>
    <h1>
    <xsl:value-of select="/compliance/head/title"/>
    </h1>
    <xsl:apply-templates select="standard"/>
    </body>
  </xsl:template>
  
  <xsl:template match="standard">
    <h2><xsl:value-of select="@name"/></h2>
    <xsl:apply-templates select="explanatory"/>
    <xsl:apply-templates select="level-1"/>
  </xsl:template>
  
  <xsl:template match="level-1">
    <h3><xsl:value-of select="@name"/></h3>
    <xsl:apply-templates select="explanatory"/>
    <table border="1">
    <tr>
      <th rowspan="2">
        <p><xsl:value-of select="@compliance-item-desc"/></p>
      </th>
      <th align="center" colspan="3">
        Support
      </th>
      <th rowspan="2">
        Comments
      </th>
    </tr>
    <tr>
      <th align="center">
        <xsl:value-of select="/compliance/body/standard/@compliance-level-1-desc"/>
      </th>
      <th align="center">
        <xsl:value-of select="/compliance/body/standard/@compliance-level-2-desc"/>
      </th>
      <th align="center">
        <xsl:value-of select="/compliance/body/standard/@compliance-level-3-desc"/>
      </th>
    </tr>
    <xsl:apply-templates select="level-2"/>
    </table>
  </xsl:template>
  
  <xsl:template match="explanatory">
    <xsl:for-each select="p">
      <p>
        <xsl:apply-templates/>
      </p>
    </xsl:for-each>
  </xsl:template>
  
  <xsl:template match="level-2">
    <tr>
      <td colspan="5" class="category">
      <xsl:value-of select="@name"/>
      </td>
    </tr>
    <xsl:apply-templates select="level-3"/>
  </xsl:template>
  
  <xsl:template match="level-3">
    <tr>
      <td>
        <xsl:value-of select="@name"/>
      </td>
      <td align="center">
        <xsl:attribute name="class">
          <xsl:choose>
            <xsl:when test="@comply='yes'">
              <xsl:text>yes</xsl:text>
            </xsl:when>
            <xsl:when test="@comply='no'">
              <xsl:choose>
                <xsl:when test="@compliance-level > 1">
                  <xsl:text>yes</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>no</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:when test="@comply='partial'">
              <xsl:choose>
                <xsl:when test="@compliance-level > 1">
                  <xsl:text>yes</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>partial</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
              <xsl:text></xsl:text>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>
        <xsl:choose>
          <xsl:when test="@compliance-level=1">
            <xsl:value-of select="@comply"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:text>.</xsl:text>
          </xsl:otherwise>
        </xsl:choose>
      </td>
      <td align="center">
        <xsl:attribute name="class">
          <xsl:choose>
            <xsl:when test="@comply='yes'">
              <xsl:text>yes</xsl:text>
            </xsl:when>
            <xsl:when test="@comply='no'">
              <xsl:choose>
                <xsl:when test="@compliance-level > 2">
                  <xsl:text>yes</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>no</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:when test="@comply='partial'">
              <xsl:choose>
                <xsl:when test="@compliance-level > 2">
                  <xsl:text>yes</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>partial</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
              <xsl:text></xsl:text>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>
        <xsl:choose>
          <xsl:when test="@compliance-level=2">
            <xsl:value-of select="@comply"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:text>.</xsl:text>
          </xsl:otherwise>
        </xsl:choose>
      </td>
      <td align="center">
        <xsl:attribute name="class">
          <xsl:choose>
            <xsl:when test="@comply='yes'">
              <xsl:text>yes</xsl:text>
            </xsl:when>
            <xsl:when test="@comply='no'">
              <xsl:choose>
                <xsl:when test="@compliance-level > 3">
                  <xsl:text>yes</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>no</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:when test="@comply='partial'">
              <xsl:choose>
                <xsl:when test="@compliance-level > 3">
                  <xsl:text>yes</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:text>partial</xsl:text>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
              <xsl:text></xsl:text>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>
        <xsl:choose>
          <xsl:when test="@compliance-level=3">
            <xsl:value-of select="@comply"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:text>.</xsl:text>
          </xsl:otherwise>
        </xsl:choose>
      </td>
      <xsl:choose>
        <xsl:when test="count(comment) > 0">
          <td align="left">
            <ul>
              <xsl:for-each select="comment">
                <li>
                  <xsl:value-of select="."/>
               </li>
             </xsl:for-each>
            </ul>
          </td>
        </xsl:when>
        <xsl:otherwise>
          <td align="center">
            <xsl:text>.</xsl:text>
          </td>
        </xsl:otherwise>
      </xsl:choose>
    </tr>
  </xsl:template>
  
  </xsl:stylesheet>
  
  <!-- Last Line of $RCSFile -->
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to