Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50798 - trunk/tools/boostbook/xsl
From: daniel_james_at_[hidden]
Date: 2009-01-26 18:14:54


Author: danieljames
Date: 2009-01-26 18:14:53 EST (Mon, 26 Jan 2009)
New Revision: 50798
URL: http://svn.boost.org/trac/boost/changeset/50798

Log:
Make checking for duplicated names case insensitive.

This avoids generating filenames with names that only differ by case as they
cause problems on case insensitive file systems.

Text files modified:
   trunk/tools/boostbook/xsl/annotation.xsl | 5 ++++-
   trunk/tools/boostbook/xsl/lookup.xsl | 3 ++-
   trunk/tools/boostbook/xsl/macro.xsl | 3 ++-
   3 files changed, 8 insertions(+), 3 deletions(-)

Modified: trunk/tools/boostbook/xsl/annotation.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/annotation.xsl (original)
+++ trunk/tools/boostbook/xsl/annotation.xsl 2009-01-26 18:14:53 EST (Mon, 26 Jan 2009)
@@ -8,6 +8,9 @@
   -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version="1.0">
+ <xsl:variable name="uppercase-letters" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
+ <xsl:variable name="lowercase-letters" select="'abcdefghijklmnopqrstuvwxyz'"/>
+
   <xsl:key name="classes" match="class|struct|union|typedef" use="@name"/>
   <xsl:key name="methods" match="method|overloaded-method" use="@name"/>
   <xsl:key name="functions" match="function|overloaded-function" use="@name"/>
@@ -17,7 +20,7 @@
   <xsl:key name="macros" match="macro" use="@name"/>
   <xsl:key name="headers" match="header" use="@name"/>
   <xsl:key name="globals" match="namespace/data-member|header/data-member" use="@name"/>
- <xsl:key name="named-entities" match="class|struct|union|concept|function|overloaded-function|macro|library|namespace/data-member|header/data-member|*[attribute::id]" use="@name|@id"/>
+ <xsl:key name="named-entities" match="class|struct|union|concept|function|overloaded-function|macro|library|namespace/data-member|header/data-member|*[attribute::id]" use="translate(@name|@id, $uppercase-letters, $lowercase-letters)"/>
 
   <xsl:template match="function|overloaded-function" mode="generate.id">
     <xsl:call-template name="fully-qualified-id">

Modified: trunk/tools/boostbook/xsl/lookup.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/lookup.xsl (original)
+++ trunk/tools/boostbook/xsl/lookup.xsl 2009-01-26 18:14:53 EST (Mon, 26 Jan 2009)
@@ -225,7 +225,8 @@
   </xsl:template>
 
   <xsl:template match="function|overloaded-function" mode="unique.name">
- <xsl:value-of select="number(count(key('named-entities', @name)) = 1)"/>
+ <xsl:value-of select="number(count(key('named-entities',
+ translate(@name, $uppercase-letters, $lowercase-letters))) = 1)"/>
   </xsl:template>
 
   <!-- Print the name of the current node -->

Modified: trunk/tools/boostbook/xsl/macro.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/macro.xsl (original)
+++ trunk/tools/boostbook/xsl/macro.xsl 2009-01-26 18:14:53 EST (Mon, 26 Jan 2009)
@@ -74,7 +74,8 @@
 
   <xsl:template match="macro" mode="generate.id">
     <xsl:value-of select="@name"/>
- <xsl:if test="count(key('named-entities', @name))!=1">
+ <xsl:if test="count(key('named-entities',
+ translate(@name, $uppercase-letters, $lowercase-letters)))!=1">
       <xsl:text>_</xsl:text>
       <xsl:value-of select="generate-id(.)"/>
     </xsl:if>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk