[CFT] merging projects/entities
René Ladan
rene at freebsd.org
Sun Jul 7 15:19:37 UTC 2013
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; <<a
href="mailto:committer at FreeBSD.org">committer at FreeBSD.org</a>>"
(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><</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>></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><</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>></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é
More information about the freebsd-doc
mailing list