forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Jose Pablos <che...@che-che.com>
Subject Re: [PATCH] document2html: Support for version, type and notice
Date Thu, 31 Jul 2003 08:27:42 GMT
Thank you Eirik!,
That was quick, now, I personaly think that there a few issues with this 
patch, I would like to coment with you and others, idealy we should be 
getting a concensus on the pattern to use on this.

1) Style information
<fonts> tags should not be on a common xsl (FOR-34)
I think that this could be replace using class elements. The class names 
can be something related with the element i.e class="document-notice"


2) Spaces on class names
I think that they are not allow.

3) Content.
If you add content then what  happends with the international users.
I would like my page in Norwegian, so I need to ovewrite the commmon 
skin just for that reason.

4) @id should not be copying?
 > +  <xsl:template match="notice">
 > +    <xsl:apply-templates select="@id"/>
@id should be copy as-is.

5) <version> flow

hum....
I have to test it, but maybe this works as well:

<xsl:template match="version">
  <xsl:value-of select="concat('.',@major)/>
  <xsl:value-of select="concat('.',@minor)/>
  <xsl:value-of select="concat('.',@fix)/>
  <xsl:value-of select="concat('.',@tag)/>
</xsl:template>


Cheers,
Cheche

> -----------------------------------
-------------------------------------
> 
> Index: src/resources/skins/common/xslt/html/document2html.xsl
> ===================================================================
> RCS file: /home/cvspublic/xml-forrest/src/resources/skins/common/xslt/html/document2html.xsl,v
> retrieving revision 1.20
> diff -u -r1.20 document2html.xsl
> --- src/resources/skins/common/xslt/html/document2html.xsl	29 Jul 2003 22:00:17 -0000
1.20
> +++ src/resources/skins/common/xslt/html/document2html.xsl	30 Jul 2003 12:37:08 -0000
> @@ -85,6 +85,9 @@
>            </font>
>          </p>
>        </xsl:if>
> +      <xsl:apply-templates select="header/version"/>
> +      <xsl:apply-templates select="header/type"/>
> +      <xsl:apply-templates select="header/notice"/>
>        <xsl:apply-templates select="header/abstract"/>
>        <xsl:apply-templates select="body"/>
>      </div>
> @@ -224,6 +227,18 @@
>      </div>
>    </xsl:template>
>  
> +  <xsl:template match="notice">
> +    <xsl:apply-templates select="@id"/>
> +    <div class="frame note">
> +      <div class="label">
> +	Notice
> +      </div>
> +      <div class="content">
> +        <xsl:apply-templates/>
> +      </div>
> +    </div>
> +  </xsl:template>
> +
>    <xsl:template match="link">
>      <xsl:apply-templates select="@id"/>
>      <xsl:choose>
> @@ -341,7 +356,40 @@
>        <xsl:value-of select="title"/>
>      </a>
>    </xsl:template>
> -  
> +
> +  <xsl:template match="version">
> +    <p>
> +      <font size="-1">
> +        Version: 
> +          <xsl:choose>
> +            <xsl:when test="@major and @minor and @fix">
> +             <xsl:value-of select="@major"/>.<xsl:value-of select="@minor"/>.<xsl:value-of
select="@fix"/>
> +            </xsl:when>
> +            <xsl:when test="@major and @minor">
> +             <xsl:value-of select="@major"/>.<xsl:value-of select="@minor"/>
> +            </xsl:when>
> +            <xsl:when test="@major">
> +             <xsl:value-of select="@major"/>
> +            </xsl:when>
> +            <xsl:otherwise>
> +             <xsl:value-of select="."/>
> +            </xsl:otherwise>
> +          </xsl:choose>
> +          <xsl:if test="@tag">
> +            (Tag: <xsl:value-of select="@tag"/>)
> +          </xsl:if>
> +      </font>
> +    </p>
> +  </xsl:template>
> +
> +  <xsl:template match="type">
> +    <p>
> +      <font size="-1">
> +        Type: <xsl:value-of select="."/>
> +      </font>
> +    </p>
> +  </xsl:template>
> + 
>    <xsl:template match="abstract">
>      <p>
>        <xsl:apply-templates/>



Mime
View raw message