forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject cvs commit: xml-forrest/src/resources/library/xslt bookv10.xsl changesv10tochangesv11.xsl faqv10tofaqv11.xsl docv10todocv11.xsl
Date Thu, 20 Jun 2002 06:50:08 GMT
crossley    2002/06/19 23:50:08

  Modified:    src/resources/library/xslt docv10todocv11.xsl
  Added:       src/resources/library/xslt bookv10.xsl
                        changesv10tochangesv11.xsl faqv10tofaqv11.xsl
  Log:
  Stylesheets to do transformations from v10 to v11 DTDs.
  
  Revision  Changes    Path
  1.5       +19 -12    xml-forrest/src/resources/library/xslt/docv10todocv11.xsl
  
  Index: docv10todocv11.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/library/xslt/docv10todocv11.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- docv10todocv11.xsl	7 Jun 2002 04:17:32 -0000	1.4
  +++ docv10todocv11.xsl	20 Jun 2002 06:50:08 -0000	1.5
  @@ -1,13 +1,19 @@
   <?xml version="1.0" encoding="UTF-8"?>
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  -
  +<!-- <xsl:preserve-space elements="*" /> -->
     <!-- document-v10.dtd to document-v11.dtd transformation -->
  -  
  -  <!-- normally, I would include something like this:
  -  <xsl:output doctype-public="-//APACHE//DTD Documentation V1.1//EN" doctype-system="document-v11.dtd"/>
  -  We should something similar, i.e. make sure the result of this transformation is validated
against the v11 DTD
  +
  +  <!-- normally, I would include something like this:-->
  +  <xsl:output 
  +     doctype-public="-//APACHE//DTD Documentation V1.1//EN"
  +     doctype-system="document-v11.dtd"
  +     indent="yes"
  +         
  +      />
  +     
  +
  +  <!-- We should something similar, i.e. make sure the result of this transformation
is validated against the v11 DTD
     -->
  -  
     <xsl:template match="/">
       <xsl:choose>
         <xsl:when test="document">
  @@ -54,11 +60,12 @@
     <!-- fixes sections -->
     <xsl:template match="s1 | s2 | s3 | s4">
       <section>
  -      <xsl:for-each select="@*">
  -        <xsl:copy-of select="."/>
  -      </xsl:for-each>
  -      <xsl:apply-templates/>
  -    </section>
  +      <title><xsl:value-of select="@title" /></title>
  +        <xsl:for-each select="@*">
  +          <xsl:copy-of select="."/>
  +        </xsl:for-each>
  +        <xsl:apply-templates/>
  +      </section>
     </xsl:template>
   
     <!-- dunnow what to do with connect - maybe just evaporize it? -->
  @@ -85,7 +92,7 @@
         <xsl:apply-templates/>
       </ul>
     </xsl:template>
  -
  +        
     <!-- the obligatory copy-everything -->
     <xsl:template match="node() | @*">
       <xsl:copy>
  
  
  
  1.1                  xml-forrest/src/resources/library/xslt/bookv10.xsl
  
  Index: bookv10.xsl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:preserve-space elements="*" />
    
    <xsl:output doctype-public="-//APACHE//DTD Cocoon Documentation Book V1.0//EN" doctype-system="book-cocoon-v10.dtd"/>
    
    <xsl:template match="/">
          <xsl:apply-templates/>
    </xsl:template>
  
    <!-- the obligatory copy-everything -->
    <xsl:template match="node() | @*">
      <xsl:copy>
        <xsl:apply-templates select="@*"/>
        <xsl:apply-templates/>
      </xsl:copy>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/library/xslt/changesv10tochangesv11.xsl
  
  Index: changesv10tochangesv11.xsl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:preserve-space elements="*" />
    <!-- faq-v10.dtd to faq-v11.dtd transformation -->
    
    <xsl:output doctype-public="-//APACHE//DTD Changes V1.1//EN" doctype-system="changes-v11.dtd"/>
    
    <xsl:template match="/">
          <xsl:apply-templates/>
    </xsl:template>
  
    <xsl:template match="link/@type | link/@actuate | link/@show |
                         jump/@type | jump/@actuate | jump/@show |
                         fork/@type | fork/@actuate | fork/@show"/>
  
    <!-- the obligatory copy-everything -->
    <xsl:template match="node() | @*">
      <xsl:copy>
        <xsl:apply-templates select="@*"/>
        <xsl:apply-templates/>
      </xsl:copy>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-forrest/src/resources/library/xslt/faqv10tofaqv11.xsl
  
  Index: faqv10tofaqv11.xsl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:preserve-space elements="*" />
    <!-- faq-v10.dtd to faq-v11.dtd transformation -->
    
    <xsl:output doctype-public="-//APACHE//DTD FAQ V1.1//EN" doctype-system="faq-v11.dtd"/>
    
    <xsl:template match="/">
          <xsl:apply-templates/>
    </xsl:template>
  
    <xsl:template match="link/@idref">
      <xsl:message terminate="no">The link element has no idref attribute defined in
the document-v11.dtd, please fix your document.</xsl:message>
      [[link/@idref: <xsl:value-of select="."/> ]]
    </xsl:template>
  
    <xsl:template match="link/@type | link/@actuate | link/@show |
                         jump/@type | jump/@actuate | jump/@show |
                         fork/@type | fork/@actuate | fork/@show"/>
  
    <!-- the obligatory copy-everything -->
    <xsl:template match="node() | @*">
      <xsl:copy>
        <xsl:apply-templates select="@*"/>
        <xsl:apply-templates/>
      </xsl:copy>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  

Mime
View raw message