Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 07 Jul 2013 17:19:33 +0200
From:      =?ISO-8859-1?Q?Ren=E9_Ladan?= <rene@freebsd.org>
To:        Gabor Kovesdan <gabor@FreeBSD.org>
Cc:        FBSD Doc project <doc@FreeBSD.org>
Subject:   Re: [CFT] merging projects/entities
Message-ID:  <51D98705.4070403@freebsd.org>
In-Reply-To: <51D83F92.7030808@FreeBSD.org>
References:  <51D7F70B.8000206@freebsd.org> <51D83F92.7030808@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 06-07-2013 18:02, Gabor Kovesdan wrote:
> Em 06-07-2013 12:52, René Ladan escreveu:
>> To test, you can either check out doc/projects/entities or doc/head and
>> apply the patch at [1]. After that, run 'make' in en_US.ISO8859-1/ or
>> 'make WEB_ONLY=yes ENGLISH_ONLY=yes' in en_US.ISO8859-1/htdocs/ as
>> usual.
>>
>> [1]ftp://rene-ladan.nl/pub/freebsd/entities-r42173.diff
>> SHA256 =
>> d6685fb654e9624f2e733fa7feb852515c2aed566150f588359fb89bbf72e2b3
>> SIZE = 423519
> There are indentation-only changes in share/xml/catalog.xml. These
> parts shouldn't be changed or at least not with other changes if you
> want to improve them. Also, the real changes seem to be a bit messy,
> there are duplicated entries and some commented out ones and all of
> this intermixed with indentation changes so it is hard to see the
> overall effect. This file should be reviewed.
>
I indeed committed a white-space only change here, r40263.  Should I
also change this in head/ or revert this commit and worry about
white-space later?

> As for the email element, it doesn't logically belong to HTML so it
> shouldn't have the XHTML namespace. Actually, it is borrowed from
> DocBook, which doesn't have a namespace up to version 4.5. In turn,
> DocBook 5.0 has its own namespace. So I suggest to leave the email
> element in the empty namespace for now and with the DB 5.0 migration
> it will go to the DocBook namespace. For this, you also need to modify
> share/xml/xhtml.xsl and remove the namespace prefix in the match
> attribute:
>
Do you mean that the email declarations in share/xml/authors.ent should
be removed again? For clarity I would prefer this, but this (and the
email XSLT templates) seem necessary to get
&a.committer.email; working in both the articles/books and webpages, 
and for the latter it removes the need to write the cumbersome
"&a.committer; &lt;<a
href="mailto:committer@FreeBSD.org">committer@FreeBSD.org</a>&gt;"
(in head, with &a.committer pulled in from the removed
share/xml/developers.ent) as
"&a.committer.email;" suffices.

> +  <xsl:template match="xhtml:email">
> +    <xsl:text>&lt;</xsl:text>
> +    <xsl:choose>
> +      <xsl:when test="@role='nolink'">
> +    <xsl:apply-templates />
> +      </xsl:when>
> +      <xsl:otherwise>
> +    <a>
> +      <xsl:attribute name="href">
> +        <xsl:text>mailto:</xsl:text>
> +        <xsl:value-of select="." />
> +      </xsl:attribute>
> +      <xsl:apply-templates />
> +    </a>
> +      </xsl:otherwise>
> +    </xsl:choose>
> +    <xsl:text>&gt;</xsl:text>
> +  </xsl:template>
>
> And with this change, this part becomes redundant:
>
> --- share/xsl/freebsd-xhtml-common.xsl   
> (svn+ssh://svn.freebsd.org/doc/projects/entities)    (working copy)
> +++ svn+ssh://svn.freebsd.org/doc/projects/entities    (revision 42173)
> @@ -6,6 +6,7 @@
>                  version='1.0'
>                  xmlns="http://www.w3.org/TR/xhtml1/transitional"
>          xmlns:str="http://exslt.org/strings"
> +        xmlns:xhtml="http://www.w3.org/1999/xhtml"
>          extension-element-prefixes="str"
>                  exclude-result-prefixes="#default">
>  
> @@ -162,6 +163,27 @@
>      <xsl:call-template name="svnref.genlink"/>
>    </xsl:template>
>  
> +  <xsl:template match="xhtml:email">
> +    <code class="email">
> +      <xsl:text>&lt;</xsl:text>
> +      <xsl:choose>
> +    <xsl:when test="@role='nolink'">
> +      <xsl:apply-templates />
> +    </xsl:when>
> +    <xsl:otherwise>
> +      <a class="email">
> +        <xsl:attribute name="href">
> +          <xsl:text>mailto:</xsl:text>
> +          <xsl:value-of select="."/>
> +        </xsl:attribute>
> +        <xsl:apply-templates />
> +      </a>
> +    </xsl:otherwise>
> +      </xsl:choose>
> +      <xsl:text>&gt;</xsl:text>
> +    </code>
> +  </xsl:template>
>
If it works, shorter XSLT files are fine with me.
> The rest looks fine, thanks for your work on this!
>
Thanks,

René




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51D98705.4070403>