# HG changeset patch # User Sergey Kandaurov # Date 1706786751 -14400 # Node ID c1d078b1352717f23112bd07e2ae5cb340ee17b6 # Parent 2ff222c4ff8a1ef6d17cc8aa3e1550757d3aa885 Fixed dirindex and varindex for top level modules. diff -r 2ff222c4ff8a -r c1d078b13527 xsls/link.xsls --- a/xsls/link.xsls Thu Feb 01 15:25:49 2024 +0400 +++ b/xsls/link.xsls Thu Feb 01 15:25:51 2024 +0400 @@ -50,7 +50,11 @@ !{@id} X:if "count(../link[@id = current()/@id]) > 1" { X:text{ (} - !{substring-before(substring-after(@doc, '/'), '.xml')} + X:if "contains(@doc, '/')" { + !{substring-before(substring-after(@doc, '/'), '.xml')} + } else { + !{substring-before(@doc, '.xml')} + } X:text{)} }
@@ -62,7 +66,11 @@ !!; X:if "count(../link[@id = current()/@id and @doc != current()/@doc]) > 0" { X:text{ (} - !{substring-before(substring-after(@doc, '/'), '.xml')} + X:if "contains(@doc, '/')" { + !{substring-before(substring-after(@doc, '/'), '.xml')} + } else { + !{substring-before(@doc, '.xml')} + } X:text{)} }