]> matita.cs.unibo.it Git - helm.git/commitdiff
* news.xml was not valid. DTD fixed.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 13 Feb 2002 11:27:47 +0000 (11:27 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 13 Feb 2002 11:27:47 +0000 (11:27 +0000)
* DTD Improved: who is now a pointer to the author's MOWGLI home page.

helm/mowgli/home/xml/news.xml
helm/mowgli/home/xsl/news.xsl

index 455f8c289b6f6f9a548eaa7b7da7c63cd6071e77..eeecc24441db523d9edc1603113af623170496ba 100644 (file)
@@ -3,6 +3,12 @@
 <!DOCTYPE news [
  <!ELEMENT news (event*)>
  <!ELEMENT event (date,header?,description,who?)>
+ <!ELEMENT date (#PCDATA)>
+ <!ELEMENT header (#PCDATA)>
+ <!ELEMENT description (#PCDATA)>
+ <!ELEMENT who EMPTY>
+ <!ATTLIST who
+           file CDATA #REQUIRED>
 ]>
 
 <news>
@@ -13,7 +19,7 @@
       Site moved into CVS. XSLT stylesheets are used to generate
       HTML pages from XML sources.
     </description>
-    <who>Claudio Sacerdoti Coen</who>
+    <who file="bologna/sacerdoti"/>
   </event>
   
   <event>
@@ -21,7 +27,7 @@
     <description>
       First Web pages created.
     </description>
-    <who>Luca Padovani</who>
+    <who file="bologna/padovani"/>
   </event>
   
 </news>
index d14069f62c263ebebfd86132fa44365621a2787d..a0f4a18d429fe0805104543026b61975e6235e63 100644 (file)
   <xsl:if test="who">
    <br/><br/>
    <div class="right">
-    <em><div class="small"><xsl:value-of select="who"/></div></em>
+    <xsl:variable name="who" select="document(concat('../xml/people/',who/@file,'.xml'))/person"/>
+    <em>
+     <div class="small">
+      <xsl:value-of select="$who/name"/>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="$who/surname"/>
+     </div>
+    </em>
    </div>
   </xsl:if>
  </dd>