mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 15:03:57 +00:00
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. [SVN r50798]
This commit is contained in:
parent
5db61ec62a
commit
e0f2099dc2
@ -8,6 +8,9 @@
|
|||||||
-->
|
-->
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
version="1.0">
|
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="classes" match="class|struct|union|typedef" use="@name"/>
|
||||||
<xsl:key name="methods" match="method|overloaded-method" use="@name"/>
|
<xsl:key name="methods" match="method|overloaded-method" use="@name"/>
|
||||||
<xsl:key name="functions" match="function|overloaded-function" 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="macros" match="macro" use="@name"/>
|
||||||
<xsl:key name="headers" match="header" 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="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:template match="function|overloaded-function" mode="generate.id">
|
||||||
<xsl:call-template name="fully-qualified-id">
|
<xsl:call-template name="fully-qualified-id">
|
||||||
|
@ -225,7 +225,8 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="function|overloaded-function" mode="unique.name">
|
<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>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- Print the name of the current node -->
|
<!-- Print the name of the current node -->
|
||||||
|
@ -74,7 +74,8 @@
|
|||||||
|
|
||||||
<xsl:template match="macro" mode="generate.id">
|
<xsl:template match="macro" mode="generate.id">
|
||||||
<xsl:value-of select="@name"/>
|
<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:text>_</xsl:text>
|
||||||
<xsl:value-of select="generate-id(.)"/>
|
<xsl:value-of select="generate-id(.)"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user