From 4f59950307f520c00f5b3e4f66652820b3c963fb Mon Sep 17 00:00:00 2001 From: Nigel Metheringham Date: Wed, 14 Jul 2010 12:47:41 +0100 Subject: [PATCH] Index styling infrastructure changes Added class info to the Index chapters/sections. Sections now have surrounding div in html. Chapter/Sections carry id and class data through --- script/gen.pl | 6 ++++-- templates/doc/chapter.xsl | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/script/gen.pl b/script/gen.pl index 6073b56..0cfa5a1 100755 --- a/script/gen.pl +++ b/script/gen.pl @@ -237,13 +237,15 @@ sub build_indexes { foreach my $role ( sort { $a cmp $b } keys %{$index_hash} ) { my $chapter = XML::LibXML::Element->new('chapter'); $book->appendChild($chapter); - $chapter->setAttribute( 'id', 'index_' . $role ); + $chapter->setAttribute( 'id', join( '_', 'index', $role ) ); + $chapter->setAttribute( 'class', 'index' ); $chapter->appendTextChild( 'title', ( ucfirst($role) . ' Index' ) ); foreach my $first ( sort { $a cmp $b } keys %{ $index_hash->{$role} } ) { my $section = XML::LibXML::Element->new('section'); my $list = XML::LibXML::Element->new('variablelist'); $chapter->appendChild($section); - $section->setAttribute( 'id', 'index_' . $role . '_' . $first ); + $section->setAttribute( 'id', join( '_', 'index', $role, $first ) ); + $section->setAttribute( 'class', 'index' ); $section->appendTextChild( 'title', $first ? $first : 'Symbols' ); $section->appendChild($list); foreach my $primary ( sort { $a cmp $b } keys %{ $index_hash->{$role}{$first} } ) { diff --git a/templates/doc/chapter.xsl b/templates/doc/chapter.xsl index 13a7c91..5f13185 100644 --- a/templates/doc/chapter.xsl +++ b/templates/doc/chapter.xsl @@ -44,12 +44,12 @@ ]]> -

+

-
+
@@ -64,12 +64,14 @@ -

+

+
+
-- 2.30.2