You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by Yoshiki Hayashi <yo...@xemacs.org> on 2002/05/15 11:56:01 UTC
Should language be attribute or element?
I think language should be the attributed of modulesynopsis
instead of a top level element. <modulesynopsis language="ja">
looks more natural than
<modulesynposis><language>ja</language> to me.
This patch changes XSLT stylesheet to look for language
attribute of modulesynopsis. It also uses xsl:choose to
replace "if then ..., if not then ..." construct. What do
people think about this patch?
Index: manual/style/modulesynopsis.dtd
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/style/modulesynopsis.dtd,v
retrieving revision 1.7
diff -u -r1.7 modulesynopsis.dtd
--- manual/style/modulesynopsis.dtd 6 May 2002 08:19:07 -0000 1.7
+++ manual/style/modulesynopsis.dtd 15 May 2002 09:44:56 -0000
@@ -16,6 +16,7 @@
<!ELEMENT modulesynopsis (name , description, status , sourcefile?,
identifier? , compatibility? , summary? , seealso* , section*,
directivesynopsis*)>
+<!ATTLIST modulesynopsis language CDATA #IMPLIED>
<!ELEMENT directivesynopsis (name , description? , syntax? , default?
, contextlist? , override? , modulelist?, status?, compatibility? ,
Index: manual/style/settings.xsl
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/style/settings.xsl,v
retrieving revision 1.1
diff -u -r1.1 settings.xsl
--- manual/style/settings.xsl 3 Mar 2002 15:32:57 -0000 1.1
+++ manual/style/settings.xsl 15 May 2002 09:44:56 -0000
@@ -15,10 +15,12 @@
<!-- English is the default language -->
<xsl:variable name="language">
- <xsl:if test="modulesynopsis/language">
- <xsl:value-of select="modulesynopsis/language"/>
- </xsl:if>
- <xsl:if test="not(modulesynopsis/language)">en</xsl:if>
+ <xsl:choose>
+ <xsl:when test="modulesynopsis/@language">
+ <xsl:value-of select="modulesynopsis/@language"/>
+ </xsl:when>
+ <xsl:otherwise>en</xsl:otherwise>
+ </xsl:choose>
</xsl:variable>
<!-- Read the localized messages from the specified language file -->
--
Yoshiki Hayashi
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Should language be attribute or element?
Posted by Joshua Slive <jo...@slive.ca>.
On 15 May 2002, Yoshiki Hayashi wrote:
> I think language should be the attributed of modulesynopsis
> instead of a top level element. <modulesynopsis language="ja">
> looks more natural than
> <modulesynposis><language>ja</language> to me.
As I said in my other message, I think we shouldn't need to pass
the language at all if we are using language-specific xsl stylesheets.
Joshua.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org