lenya/src/webapp/lenya/pubs/default/xslt page2xhtml.xsl,1.7,1.8 simple2xhtml.xsl,1.3,1.4
Andreas Hartmann <[email protected]> Wed, 14 May 2003 14:11:57 +0200
| Newsgroups | gmane.comp.cms.wyona.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /repository/lenya/src/webapp/lenya/pubs/default/xslt
In directory erbium:/tmp/cvs-serv23175/src/webapp/lenya/pubs/default/xslt
Modified Files:
page2xhtml.xsl simple2xhtml.xsl
Log Message:
- added new project logo
- using tables instead of CSS floating divs (Mozilla problems)
- completed simple-doctype XSLT
- pretty-printed simple-document.xml
Index: page2xhtml.xsl
===================================================================
RCS file: /repository/lenya/src/webapp/lenya/pubs/default/xslt/page2xhtml.xsl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** page2xhtml.xsl 13 May 2003 15:09:48 -0000 1.7
--- page2xhtml.xsl 14 May 2003 12:11:52 -0000 1.8
***************
*** 27,39 ****
</head>
<body>
! <div style="text-align: center">
! <img src="{$root}/images/project-logo.gif"/>
</div>
<xsl:apply-templates select="xhtml:div[@id = 'tabs']"/>
! <xsl:apply-templates select="xhtml:div[@id = 'menu']"/>
! <div id="main">
! <xsl:apply-templates select="xhtml:div[@id = 'breadcrumb']"/>
! <xsl:apply-templates select="xhtml:div[@id = 'body']"/>
! </div>
</body>
</html>
--- 27,47 ----
</head>
<body>
! <div class="project-logo">
! <img src="{$root}/images/project-logo.png"/>
</div>
<xsl:apply-templates select="xhtml:div[@id = 'tabs']"/>
! <table border="0" cellpadding="0" cellspacing="0">
! <tr>
! <td valign="top">
! <xsl:apply-templates select="xhtml:div[@id = 'menu']"/>
! </td>
! <td valign="top">
! <div id="main">
! <xsl:apply-templates select="xhtml:div[@id = 'breadcrumb']"/>
! <xsl:apply-templates select="xhtml:div[@id = 'body']"/>
! </div>
! </td>
! </tr>
! </table>
</body>
</html>
Index: simple2xhtml.xsl
===================================================================
RCS file: /repository/lenya/src/webapp/lenya/pubs/default/xslt/simple2xhtml.xsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** simple2xhtml.xsl 8 May 2003 10:59:56 -0000 1.3
--- simple2xhtml.xsl 14 May 2003 12:11:52 -0000 1.4
***************
*** 23,89 ****
</xsl:template>
!
! <xsl:template match="simple:p">
! <p>
! <xsl:apply-templates/>
! </p>
! </xsl:template>
!
!
! <xsl:template match="simple:crossheading">
! <p>
<xsl:apply-templates/>
! </p>
</xsl:template>
<xsl:template match="simple:informaltable">
! <table>
! <xsl:apply-templates select="@*|node()"/>
</table>
</xsl:template>
<xsl:template match="simple:row">
<tr>
! <xsl:apply-templates select="@*|node()"/>
</tr>
</xsl:template>
-
<xsl:template match="simple:entry">
! <td><xsl:apply-templates/></td>
</xsl:template>
! <xsl:template match="simple:subtitle">
! <h1><xsl:apply-templates/></h1>
! </xsl:template>
<xsl:template match="simple:listitem">
! <ul><xsl:apply-templates/></ul>
</xsl:template>
! <xsl:template match="simple:itemizedlist">
! <li><xsl:apply-templates/></li>
</xsl:template>
! <xsl:template match="simple:tbody">
! <xsl:apply-templates select="@*|node()"/>
</xsl:template>
! <xsl:template match="simple:tgroup">
! <xsl:apply-templates select="@*|node()"/>
</xsl:template>
! <xsl:template match="@*|node()" priority="-1">
! <xsl:copy>
! <xsl:apply-templates select="@*|node()"/>
! </xsl:copy>
</xsl:template>
--- 23,120 ----
</xsl:template>
! <!-- XHTML-like tags -->
! <!--<xsl:template match="simple:p | simple:thead |simple:tbody | simple:tfoot">-->
! <xsl:template match="simple:p | simple:thead | simple:tfoot">
! <xsl:element name="{local-name()}">
! <xsl:attribute name="class">simple</xsl:attribute>
<xsl:apply-templates/>
! </xsl:element>
</xsl:template>
+ <!-- /XHTML-like tags -->
+ <!-- tables -->
<xsl:template match="simple:informaltable">
! <table class="simple" border="0" cellspacing="1">
! <xsl:apply-templates/>
</table>
</xsl:template>
+ <xsl:template match="simple:tgroup">
+ <xsl:apply-templates/>
+ </xsl:template>
<xsl:template match="simple:row">
<tr>
! <xsl:apply-templates/>
</tr>
</xsl:template>
<xsl:template match="simple:entry">
! <td class="simple"><xsl:apply-templates/></td>
</xsl:template>
+ <!-- /tables -->
! <!-- lists -->
+ <xsl:template match="simple:itemizedlist">
+ <ul><xsl:apply-templates/></ul>
+ </xsl:template>
<xsl:template match="simple:listitem">
! <li><xsl:apply-templates/></li>
</xsl:template>
+ <!-- /lists -->
! <!-- headlines -->
!
! <xsl:template match="simple:subtitle">
! <h1><xsl:apply-templates/></h1>
</xsl:template>
+ <xsl:template match="simple:crossheading">
+ <div class="crossheading">
+ <xsl:apply-templates/>
+ </div>
+ </xsl:template>
! <xsl:template match="simple:*[starts-with(local-name(), 'hl')]">
! <xsl:element name="h{substring(local-name(), 3)}">
! <xsl:apply-templates/>
! </xsl:element>
</xsl:template>
+ <!-- /headlines -->
!
! <!-- media -->
! <xsl:template match="simple:media[@media-type = 'image']">
! <div class="media">
! <p>
! <img class="simple"
! src="{simple:media-reference/@source}"
! alt="{simple:media-reference/@alternate-text}"/>
! </p>
! <xsl:apply-templates select="simple:caption"/>
! </div>
</xsl:template>
+ <!-- /media -->
+ <xsl:template match="simple:caption">
+ <div class="caption">
+ <xsl:apply-templates/>
+ </div>
+ </xsl:template>
! <!-- links -->
! <xsl:template match="simple:ulink">
! <a href="{@url}"><xsl:apply-templates/></a>
! </xsl:template>
! <!-- /link -->
!
! <xsl:template match="text()">
! <xsl:copy/>
</xsl:template>