httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yoshiki Hayashi <yosh...@xemacs.org>
Subject Should language be attribute or element?
Date Wed, 15 May 2002 09:56:01 GMT
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


Mime
View raw message