xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@locus.apache.org
Subject cvs commit: xml-stylebook/styles/apachexml/stylesheets any2header.xsl any2project.xsl book2group.xsl changes2document.xsl context2footer.xsl context2label.xsl directory2project.xsl faqs2document.xsl group2document.xsl
Date Wed, 01 Dec 1999 21:09:50 GMT
pier        99/12/01 13:09:50

  Added:       styles/apachexml/stylesheets any2header.xsl any2project.xsl
                        book2group.xsl changes2document.xsl
                        context2footer.xsl context2label.xsl
                        directory2project.xsl faqs2document.xsl
                        group2document.xsl
  Log:
  Added new styles.
  
  Revision  Changes    Path
  1.1                  xml-stylebook/styles/apachexml/stylesheets/any2header.xsl
  
  Index: any2header.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
  
    <xsl:param name="label"/>
  
    <xsl:template match="/">
      <image width="456" height="35" bgcolor="0086b2">
        <xsl:apply-templates/>
      </image>
    </xsl:template>
  
    <xsl:template match="s1|faqs|changes">
        <xsl:variable name="title">
          <xsl:if test="string-length(@title)=0">
            <xsl:value-of select="$label"/>
          </xsl:if>
          <xsl:if test="string-length(@title)>0">
            <xsl:value-of select="@title"/>
          </xsl:if>
        </xsl:variable>
  
        <text font="Arial" size="29" x="454" y="8" halign="right" valign="top" color="004080"
              text="{$title}"/>
        <text font="Arial" size="29" x="452" y="6" halign="right" valign="top" color="ffffff"
              text="{$title}"/>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-stylebook/styles/apachexml/stylesheets/any2project.xsl
  
  Index: any2project.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
  
    <xsl:param name="label"/>
  
    <xsl:template match="/">
      <project>
        <xsl:apply-templates/>
      </project>
    </xsl:template>
  
    <xsl:template match="img">
      <resource source="{@src}" target="images/{@src}"/>
    </xsl:template>
  
    <xsl:template match="node()">
      <xsl:apply-templates/>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-stylebook/styles/apachexml/stylesheets/book2group.xsl
  
  Index: book2group.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
  
    <xsl:param name="id"/>
  
    <xsl:template match="/">
      <xsl:apply-templates/>
    </xsl:template>
  
    <xsl:template match="book">
      <group title="{group[attribute::id=$id]/@label}">
        <xsl:apply-templates select="group[attribute::id=$id]/entry"/>
      </group>
    </xsl:template>
  
    <xsl:template match="entry">
      <entry id="{@id}" title="{document(concat('sbk:/sources/',@source))/faqs/@title}">
        <xsl:apply-templates select="document(concat('sbk:/sources/',@source))/faqs/faq"/>
      </entry>
    </xsl:template>
  
    <xsl:template match="faq">
      <voice>
        <xsl:if test="string-length(@title)=0">
          <xsl:value-of select="q"/>
        </xsl:if>
        <xsl:if test="string-length(@title)>0">
          <xsl:value-of select="@title"/>
        </xsl:if>
      </voice>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-stylebook/styles/apachexml/stylesheets/changes2document.xsl
  
  Index: changes2document.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
  
    <xsl:template match="/">
      <xsl:apply-templates/>
    </xsl:template>
  
    <xsl:template match="changes">
      <s1 title="{@title}">
        <xsl:apply-templates/>
      </s1>
    </xsl:template>
  
    <xsl:template match="release">
      <s2 title="Release {@version} {@date}">
        <br/><xsl:apply-templates/>
      </s2>
    </xsl:template>
  
    <xsl:template match="features">
      <s3 title="Features">
        <ul><xsl:apply-templates/></ul>
      </s3>
    </xsl:template>
  
    <xsl:template match="fixes">
      <s3 title="Bugs fixed">
        <ul><xsl:apply-templates/></ul>
      </s3>
    </xsl:template>
  
    <xsl:template match="feat|fix">
      <li><xsl:apply-templates/></li>
    </xsl:template>
  
    <xsl:template match="@*|node()">
      <xsl:copy>
        <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-stylebook/styles/apachexml/stylesheets/context2footer.xsl
  
  Index: context2footer.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
  
    <xsl:template match="/">
      <xsl:apply-templates/>
    </xsl:template>
  
    <xsl:template match="context">
      <image source="sbk:/style/graphics/footer.gif">
        <xsl:apply-templates/>
      </image>
    </xsl:template>
  
    <xsl:template match="parameter">
      <xsl:if test="@name='copyright'">
        <text font="Arial Bold" size="11" x="124" y="6" style="plain"
              halign="left" valign="top" color="666699"
              text="Copyright &#169; {@value}. All Rights Reserved."/>
        <text font="Arial Bold" size="11" x="123" y="5" style="plain"
              halign="left" valign="top" color="333366"
              text="Copyright &#169; {@value}. All Rights Reserved."/>
        <text font="Arial Bold" size="11" x="122" y="4" style="plain"
              halign="left" valign="top" color="ffffff"
              text="Copyright &#169; {@value}. All Rights Reserved."/>
      </xsl:if>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-stylebook/styles/apachexml/stylesheets/context2label.xsl
  
  Index: context2label.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
  
    <xsl:param name="image"/>
    <xsl:param name="color"/>
  
    <xsl:template match="/">
      <xsl:apply-templates/>
    </xsl:template>
  
    <xsl:template match="context">
      <image source="{$image}">
        <xsl:apply-templates/>
      </image>
    </xsl:template>
  
    <xsl:template match="parameter">
      <xsl:if test="@name='label'">
        <text font="Arial" size="12" x="14" y="1" halign="left"
              valign="top" color="{$color}" style="italic" text="{@value}"/>
      </xsl:if>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-stylebook/styles/apachexml/stylesheets/directory2project.xsl
  
  Index: directory2project.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
  
    <xsl:param name="base"/>
  
    <xsl:template match="/">
      <xsl:apply-templates/>
    </xsl:template>
  
    <xsl:template match="directory">
      <project>
        <xsl:apply-templates/>
      </project>
    </xsl:template>
  
    <xsl:template match="entry">
  
      <xsl:if test="@directory!='true'">
        <resource source="{@href}" target="{$base}{@href}"/>
      </xsl:if>
      <xsl:if test="@directory='true'">
        <process source="{@href}" producer="directory">
          <processor name="xslt">
            <parameter name="stylesheet" value="sbk:/style/stylesheets/directory2project.xsl"/>
            <parameter name="base" value="{$base}{@href}"/>
          </processor>
        </process>
      </xsl:if>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-stylebook/styles/apachexml/stylesheets/faqs2document.xsl
  
  Index: faqs2document.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
  
    <xsl:template match="/">
      <xsl:apply-templates/>
    </xsl:template>
  
    <xsl:template match="faqs">
      <s1 title="{@title}">
        <s2 title="Questions">
          <ul>
            <xsl:apply-templates select="faq" mode="index"/>
          </ul>
        </s2>
        <s2 title="Answers">
          <br/>
          <xsl:apply-templates select="faq"/>
        </s2>
      </s1>
    </xsl:template>
  
    <xsl:template match="faq" mode="index">
      <li>
        <link anchor="faq-{position()}">
          <xsl:if test="string-length(@title)=0">
            <xsl:value-of select="q"/>
          </xsl:if>
          <xsl:if test="string-length(@title)>0">
            <xsl:value-of select="@title"/>
          </xsl:if>
        </link>
      </li>
    </xsl:template>
  
    <xsl:template match="faq">
      <anchor name="faq-{position()}"/>
      <s3 title="{q}">
        <xsl:apply-templates select="a"/>
      </s3>
    </xsl:template>
  
    <xsl:template match="a">
      <xsl:apply-templates/>
    </xsl:template>
  
    <xsl:template match="@*|node()">
      <xsl:copy>
        <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  xml-stylebook/styles/apachexml/stylesheets/group2document.xsl
  
  Index: group2document.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
  
    <xsl:template match="/">
      <xsl:apply-templates/>
    </xsl:template>
  
    <xsl:template match="group">
      <s1 title="{@title}">
        <xsl:apply-templates/>
      </s1>
    </xsl:template>
  
    <xsl:template match="entry">
      <s2 title="{@title}">
        <p>
          Read the <link idref="{@id}"><xsl:value-of select="@title"/></link>
          document or jump directly to:
        </p>
        <ul>
          <xsl:apply-templates/>
        </ul>
      </s2>
    </xsl:template>
  
    <xsl:template match="voice">
      <li><link idref="{ancestor::*/@id}" anchor="faq-{position()}"><xsl:apply-templates/></link></li>
    </xsl:template>
  
  </xsl:stylesheet>
  
  

Mime
View raw message