From: <ko...@us...> - 2010-07-15 08:08:10
|
Revision: 8725 http://docbook.svn.sourceforge.net/docbook/?rev=8725&view=rev Author: kosek Date: 2010-07-15 08:08:04 +0000 (Thu, 15 Jul 2010) Log Message: ----------- Upgraded to use common entities. Fixed bug when some code used @sortas and some not for grouping/sorting of indexterms. Modified Paths: -------------- trunk/xsl/common/autoidx-kosek.xsl trunk/xsl/common/entities.ent trunk/xsl/fo/autoidx-kosek.xsl trunk/xsl/html/autoidx-kosek.xsl Modified: trunk/xsl/common/autoidx-kosek.xsl =================================================================== --- trunk/xsl/common/autoidx-kosek.xsl 2010-07-15 07:53:27 UTC (rev 8724) +++ trunk/xsl/common/autoidx-kosek.xsl 2010-07-15 08:08:04 UTC (rev 8725) @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet [ -<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'> - +<!ENTITY % common.entities SYSTEM "entities.ent"> +%common.entities; ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" Modified: trunk/xsl/common/entities.ent =================================================================== --- trunk/xsl/common/entities.ent 2010-07-15 07:53:27 UTC (rev 8724) +++ trunk/xsl/common/entities.ent 2010-07-15 08:08:04 UTC (rev 8725) @@ -23,11 +23,11 @@ with the same @sortas. If @sortas is not present, the first item is empty, and the added space is removed when normalize-space is applied, leaving just the entry --> + <!ENTITY primary 'normalize-space(concat(primary/@sortas, " ", primary))'> <!ENTITY secondary 'normalize-space(concat(secondary/@sortas, " ", secondary))'> <!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, " ", tertiary))'> - <!ENTITY section '(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()]'> <!ENTITY section.id 'generate-id(§ion;)'> Modified: trunk/xsl/fo/autoidx-kosek.xsl =================================================================== --- trunk/xsl/fo/autoidx-kosek.xsl 2010-07-15 07:53:27 UTC (rev 8724) +++ trunk/xsl/fo/autoidx-kosek.xsl 2010-07-15 08:08:04 UTC (rev 8725) @@ -1,17 +1,7 @@ <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet [ - -<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = ""]))'> -<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = ""]))'> -<!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = ""]))'> - -<!ENTITY sep '" "'> -<!-- Documents using the kimber index method must have a lang attribute --> -<!-- Only one of these should be present in the entity --> - -<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node()) - and ($role = @role or $type = @type or - (string-length($role) = 0 and string-length($type) = 0))'> +<!ENTITY % common.entities SYSTEM "../common/entities.ent"> +%common.entities; ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" Modified: trunk/xsl/html/autoidx-kosek.xsl =================================================================== --- trunk/xsl/html/autoidx-kosek.xsl 2010-07-15 07:53:27 UTC (rev 8724) +++ trunk/xsl/html/autoidx-kosek.xsl 2010-07-15 08:08:04 UTC (rev 8725) @@ -1,11 +1,7 @@ <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet [ - -<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = ""]))'> -<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = ""]))'> -<!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = ""]))'> - -<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))'> +<!ENTITY % common.entities SYSTEM "../common/entities.ent"> +%common.entities; ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:i="urn:cz-kosek:functions:index" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |