xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dles...@locus.apache.org
Subject cvs commit: xml-site/style/stylesheets document2html.xsl book2project1.xsl document2html1.xsl
Date Thu, 20 Jan 2000 16:15:12 GMT
dleslie     00/01/20 08:15:12

  Modified:    style/dtd blocks.ent book.dtd links.ent
               style/stylesheets document2html.xsl
  Removed:     style    loader1.xml
               style/dtd blocks1.ent document1.dtd links1.ent markup1.ent
               style/stylesheets book2project1.xsl document2html1.xsl
  Log:
  1. Removed loader, stylesheet, dtd, and ent files introduced to support Xalan.
  2. book.dtd -- added optional resources element.
  3. blocks.ent -- added gloss, label, and item elements for definition lists.
  4. links.ent -- added resource-ref and human-resource-ref.
  5. document2html.xsl -- added templates to transform
          gloss, label, item
          resource-ref
          human-resource-ref
     The resource-ref and human-resource-ref templates use
     the resources element defined for the book to look up
     the required information in a resources document.
  
  Revision  Changes    Path
  1.5       +6 -3      xml-site/style/dtd/blocks.ent
  
  Index: blocks.ent
  ===================================================================
  RCS file: /home/cvs/xml-site/style/dtd/blocks.ent,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- blocks.ent	1999/12/01 23:03:37	1.4
  +++ blocks.ent	2000/01/20 16:15:11	1.5
  @@ -1,7 +1,7 @@
   <?xml encoding='US-ASCII'?>
   
   <!-- BLOCKS ENTITY -->
  -<!ENTITY % blocks "p|note|ul|ol|table|source|anchor">
  +<!ENTITY % blocks "p|note|ul|ol|gloss|table|source|anchor">
   
   <!-- import the external markup.ent dtd -->
   <!ENTITY % markupEntity SYSTEM "markup.ent">
  @@ -16,6 +16,10 @@
   <!ELEMENT ol (li|ol|ul)+>
   <!ELEMENT li %content;>
   
  +<!ELEMENT gloss (label|item)+>
  +<!ELEMENT label %content;>
  +<!ELEMENT item %content;>
  +
   <!ELEMENT source (#PCDATA)>
   
   <!ELEMENT table (tr)+>
  @@ -33,5 +37,4 @@
   <!ELEMENT td %content;>
   <!ATTLIST td colspan CDATA "1"
                rowspan CDATA "1">
  -
  -<!-- CVS $Revision: 1.4 $ $Date: 1999/12/01 23:03:37 $ -->
  \ No newline at end of file
  +             
  \ No newline at end of file
  
  
  
  1.4       +4 -2      xml-site/style/dtd/book.dtd
  
  Index: book.dtd
  ===================================================================
  RCS file: /home/cvs/xml-site/style/dtd/book.dtd,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- book.dtd	1999/12/01 23:03:37	1.3
  +++ book.dtd	2000/01/20 16:15:11	1.4
  @@ -6,10 +6,12 @@
   <!ENTITY % externalEntity SYSTEM "sbk:/sources/entities.ent">
   %externalEntity;
   
  -<!ELEMENT book (document|hidden|faqs|changes|group|external|separator)+>
  +<!ELEMENT book (resources?|document|hidden|faqs|changes|group|external|separator)+>
   <!ATTLIST book title     CDATA #REQUIRED
                  copyright CDATA #IMPLIED>
                  
  +<!ELEMENT resources EMPTY>
  +<!ATTLIST resources source CDATA #REQUIRED>
   
   <!ELEMENT document EMPTY>
   <!ATTLIST document id     ID    #REQUIRED
  @@ -44,4 +46,4 @@
                      
   <!ELEMENT separator EMPTY>
   
  -<!-- CVS $Revision: 1.3 $ $Date: 1999/12/01 23:03:37 $ -->
  \ No newline at end of file
  +<!-- CVS $Revision: 1.4 $ $Date: 2000/01/20 16:15:11 $ -->
  \ No newline at end of file
  
  
  
  1.2       +6 -2      xml-site/style/dtd/links.ent
  
  Index: links.ent
  ===================================================================
  RCS file: /home/cvs/xml-site/style/dtd/links.ent,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- links.ent	1999/12/01 14:19:18	1.1
  +++ links.ent	2000/01/20 16:15:11	1.2
  @@ -1,7 +1,7 @@
   <?xml encoding='US-ASCII'?>
   
   <!-- LINKS ENTITY -->
  -<!ENTITY % links "link|anchor|jump|img">
  +<!ENTITY % links "link|anchor|jump|img|resource-ref|human-resource-ref">
   
   <!ELEMENT anchor EMPTY>
   <!ATTLIST anchor name NMTOKEN #REQUIRED>
  @@ -17,4 +17,8 @@
   <!ELEMENT jump (#PCDATA|img)*>
   <!ATTLIST jump href CDATA #REQUIRED>
   
  -<!-- CVS $Revision: 1.1 $ $Date: 1999/12/01 14:19:18 $ -->
  \ No newline at end of file
  +<!-- cross-reference resource elements -->
  +<!ELEMENT resource-ref 		EMPTY>
  +<!ATTLIST resource-ref 		idref CDATA #REQUIRED>
  +<!ELEMENT human-resource-ref 	EMPTY>
  +<!ATTLIST human-resource-ref 	 idref CDATA #REQUIRED>
  \ No newline at end of file
  
  
  
  1.6       +40 -0     xml-site/style/stylesheets/document2html.xsl
  
  Index: document2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-site/style/stylesheets/document2html.xsl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- document2html.xsl	1999/12/02 01:44:45	1.5
  +++ document2html.xsl	2000/01/20 16:15:12	1.6
  @@ -281,6 +281,24 @@
     <xsl:template match="li">
       <li><xsl:apply-templates/></li>
     </xsl:template>
  +  
  +    <!--Definition lists: gloss, term, label, item -->
  +  <xsl:template match="gloss">
  +    <dl><xsl:apply-templates/></dl>
  +  </xsl:template>
  +   <!-- <term> contains a single-word, multi-word or symbolic 
  +       designation which is regarded as a technical term. --> 
  +  <xsl:template match="term">
  +    <dfn><xsl:apply-templates/></dfn>
  +  </xsl:template>
  +  <xsl:template match="label" priority="1">
  +    <dt><xsl:apply-templates/></dt>
  +  </xsl:template>
  +  <xsl:template match="item" priority="2">
  +    <dd>
  +      <xsl:apply-templates/>
  +    </dd>
  +  </xsl:template>
   
     <xsl:template match="source">
     <div align="right">
  @@ -390,6 +408,28 @@
   
     <xsl:template match="img">
       <img src="images/{@src}" border="0" vspace="4" hspace="4" align="right"/>
  +  </xsl:template>
  +
  +  <xsl:template match="resource-ref">
  +    <xsl:variable name="resourceFile" 
  +          select="document($stylebook.project)/book/resources/@source"/>
  +    <xsl:variable name="xref" select="@idref"/>
  +    <xsl:variable name="href"
  +          select="document($resourceFile)/resources/resource[@id=$xref]/@location"/>
  +    <xsl:variable name="label"
  +          select="document($resourceFile)/resources/resource[@id=$xref]/@title"/>
  +    <A href="{$href}" target="_top"><xsl:value-of select="$label"/></A>
  +  </xsl:template>
  +
  +  <xsl:template match="human-resource-ref">
  +    <xsl:variable name="resourceFile" 
  +          select="document($stylebook.project)/book/resources/@source"/>  
  +    <xsl:variable name="ref"  select="@idref"/>
  +    <xsl:variable name="mailto"
  +          select="document($resourceFile)/resources/human-resource[@id=$ref]/@mailto"/>
  +   <xsl:variable name="name"
  +          select="document($resourceFile)/resources/human-resource[@id=$ref]/@name"/>
                         
  +    <A href="mailto:{$mailto}"><xsl:value-of select="$name"/></A>
     </xsl:template>
   
   <!-- ###################################################################### -->
  
  
  

Mime
View raw message