[bayescl-cvs] CVS update: public_html/webpage.css public_html/webpage.dtd public_html/web2html.xsl public_html/Makefile

Anthony Ventimiglia aventimiglia at common-lisp.net
Wed Nov 26 21:27:35 UTC 2003


Update of /project/bayescl/cvsroot/public_html
In directory common-lisp.net:/tmp/cvs-serv1188

Modified Files:
	webpage.dtd web2html.xsl Makefile 
Added Files:
	webpage.css 
Log Message:
DTD's and stylesheets are finished, I think I may scrap the whole
project Idea and go for a simple one Sheet transform.

Date: Wed Nov 26 16:27:35 2003
Author: aventimiglia



Index: public_html/webpage.dtd
diff -u public_html/webpage.dtd:1.1 public_html/webpage.dtd:1.2
--- public_html/webpage.dtd:1.1	Wed Nov 26 14:08:21 2003
+++ public_html/webpage.dtd	Wed Nov 26 16:27:35 2003
@@ -1,4 +1,4 @@
-<!-- $Id: webpage.dtd,v 1.1 2003/11/26 19:08:21 aventimiglia Exp $ -->
+<!-- $Id: webpage.dtd,v 1.2 2003/11/26 21:27:35 aventimiglia Exp $ -->
 <!ELEMENT webpage (page-header, page-links, body-text)>
 <!ATTLIST webpage title CDATA #REQUIRED>
 
@@ -10,4 +10,6 @@
 <!ATTLIST link uri CDATA #REQUIRED
                description CDATA #REQUIRED>
 
-<!ELEMENT body-text ANY>
\ No newline at end of file
+<!ELEMENT body-text (#PCDATA | p | link)*>
+
+<!ELEMENT p (#PCDATA | link)*>
\ No newline at end of file


Index: public_html/web2html.xsl
diff -u public_html/web2html.xsl:1.1 public_html/web2html.xsl:1.2
--- public_html/web2html.xsl:1.1	Wed Nov 26 14:08:21 2003
+++ public_html/web2html.xsl	Wed Nov 26 16:27:35 2003
@@ -8,8 +8,48 @@
     <html>
       <head>
         <title><xsl:value-of select="@title" /></title>
+        <link rel="stylesheet" type="text/css" href="webpage.css" />
       </head>
+      <body>
+        <xsl:apply-templates select="page-header" />
+        <xsl:apply-templates select="page-links" />
+        <xsl:apply-templates select="body-text" />
+      </body>
     </html>
+  </xsl:template>
+
+  <xsl:template match="page-header">
+    <div class="page-header">
+      <span id="page-title"><xsl:value-of select="."/></span>
+    </div>
+  </xsl:template>
+  
+  <xsl:template match="page-links">
+    <div class="page-links">
+      <xsl:apply-templates select="link" />
+    </div>
+  </xsl:template>
+
+  <xsl:template match="link">
+    <xsl:element name="a">
+      <xsl:attribute name="href">
+        <xsl:value-of select="@uri"/>
+      </xsl:attribute>
+      <xsl:value-of select="@description"/>
+    </xsl:element>
+  </xsl:template>
+
+  <xsl:template match="body-text">
+    <div id="body-text">
+      <xsl:apply-templates />
+    </div>
+  </xsl:template>
+
+  <!-- Copy HTML elements through -->
+  <xsl:template match="p">
+    <xsl:element name="{name()}">
+      <xsl:apply-templates />
+    </xsl:element>
   </xsl:template>
 
 </xsl:stylesheet>


Index: public_html/Makefile
diff -u public_html/Makefile:1.2 public_html/Makefile:1.3
--- public_html/Makefile:1.2	Wed Nov 26 14:08:21 2003
+++ public_html/Makefile	Wed Nov 26 16:27:35 2003
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.2 2003/11/26 19:08:21 aventimiglia Exp $
+# $Id: Makefile,v 1.3 2003/11/26 21:27:35 aventimiglia Exp $
 
 APPLYXSLT=/usr/bin/sabcmd
 VALIDATE=/usr/bin/xmlproc_val
@@ -20,7 +20,7 @@
 %.web.xml:%.xml $(PROJECT2WEB_XSL)
 	$(APPLYXSLT) $(PROJECT2WEB_XSL) $< $@
 
-%.html:%.web.xml
+%.html:%.web.xml $(WEB2HTML_XSL)
 	$(APPLYXSLT) $(WEB2HTML_XSL) $< $@
 
 clean:





More information about the Bayescl-cvs mailing list