texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Add a test of spaces around subentry. Output XML


From: Patrice Dumas
Subject: branch master updated: Add a test of spaces around subentry. Output XML in indices tests
Date: Sat, 01 Oct 2022 09:25:58 -0400

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 625a806807 Add a test of spaces around subentry. Output XML in indices 
tests
625a806807 is described below

commit 625a8068076ab17b751fb4b1164380f1d8c7a0bb
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Oct 1 15:25:10 2022 +0200

    Add a test of spaces around subentry. Output XML in indices tests
---
 tp/t/09indices.t                                   |   19 +-
 tp/t/results/indices/def_existing_index.pl         |    4 +
 tp/t/results/indices/def_syn_indices.pl            |   68 ++
 ...default_cp_index_and_one_letter_syncodeindex.pl |   11 +
 tp/t/results/indices/double_index_entry.pl         |   20 +
 tp/t/results/indices/double_seeentry_seealso.pl    |   17 +
 tp/t/results/indices/double_syncodeindex.pl        |   13 +
 tp/t/results/indices/empty_cindex_entry.pl         |    6 +
 tp/t/results/indices/empty_index_entry.pl          |   11 +
 tp/t/results/indices/empty_string_index_entry.pl   |   17 +
 tp/t/results/indices/explicit_sort_key.pl          |   22 +
 tp/t/results/indices/ftable_vtable.pl              |   26 +
 tp/t/results/indices/image_lines_count.pl          |   10 +
 tp/t/results/indices/image_text_lines_count.pl     |   10 +
 tp/t/results/indices/index_entries_locations.pl    |   23 +
 .../indices/index_entry_before_first_node.pl       |    9 +
 tp/t/results/indices/index_entry_before_node.pl    |   19 +
 tp/t/results/indices/index_entry_in_footnote.pl    |   10 +
 .../index_entry_in_footnote_different_node_end.pl  |   22 +
 .../indices/index_entry_in_footnote_separate.pl    |   23 +
 .../multiple_index_text_sortas_seeentry_seealso.pl |   16 +
 .../indices/printindex_index_entry_in_copying.pl   |   40 +
 ...rintindex_index_entry_in_copying_in_footnote.pl |   31 +
 ...ndex_index_entry_in_copying_no_insertcopying.pl |   38 +
 .../indices/printindex_with_space_before.pl        |    9 +
 .../indices/same_index_entry_merged_indices.pl     |   20 +
 tp/t/results/indices/same_only_seealso_seeentry.pl |   21 +
 tp/t/results/indices/same_seealso_seeentry.pl      |   23 +
 tp/t/results/indices/seealso_duplicate.pl          |    9 +
 tp/t/results/indices/seeentry.pl                   |   19 +
 tp/t/results/indices/subentries.pl                 |   23 +
 tp/t/results/indices/subentry_and_sortas.pl        |   17 +
 tp/t/results/indices/subentry_and_sortas_spaces.pl | 1034 ++++++++++++++++++++
 tp/t/results/indices/syncode_index_print_both.pl   |   25 +
 tp/t/results/indices/syncodeindex_to_plain.pl      |   16 +
 tp/t/results/indices/transparent_sort_chars.pl     |   16 +
 tp/t/results/indices/w_lines_count.pl              |   14 +
 37 files changed, 1730 insertions(+), 1 deletion(-)

diff --git a/tp/t/09indices.t b/tp/t/09indices.t
index fed71cdd1a..f8f7fa5d62 100644
--- a/tp/t/09indices.t
+++ b/tp/t/09indices.t
@@ -657,6 +657,20 @@ in a reuglar para @sortas{foo}. @code{inside another 
@sortas{command}}.
 @printindex fn
 ', {'test_formats' => ['docbook']}
 ],
+['subentry_and_sortas_spaces',
+'@node Top
+@top
+
+@node chapter index
+@chapter Index
+
+@cindex aaa @sortas{A---S}@subentry @sortas{C---S1}bbb sort as c
+@cindex aaa @subentry@sortas{B---S1} 
+@cindex aaa@subentry bbb @subentry ccc@sortas{D}
+@cindex aaa @subentry bbb@subentry ccc
+
+@printindex cp
+', {'test_formats' => ['docbook']}],
 # note that Texinfo TeX ignores everything after index brace commands,
 # texi2any parsers keep them and they end up in the entry.
 ['multiple_index_text_sortas_seeentry_seealso',
@@ -786,7 +800,9 @@ undef,
 my @latex_tests_cases_tests = ('syncode_index_print_both',
   'empty_index_entry', 'empty_cindex_entry', 'empty_string_index_entry',
   'explicit_sort_key', 'transparent_sort_chars',
-  'def_syn_indices', 'seeentry', 'subentry_and_sortas', 'subentries',
+  'def_syn_indices', 'seeentry', 'subentry_and_sortas',
+  'subentry_and_sortas_spaces',
+  'subentries',
   'double_seeentry_seealso', 'seealso_duplicate',
   'multiple_index_text_sortas_seeentry_seealso', 'same_seealso_seeentry',
   'same_only_seealso_seeentry');
@@ -795,6 +811,7 @@ foreach my $test (@test_formatted) {
   push @{$test->[2]->{'test_formats'}}, 'info';
   push @{$test->[2]->{'test_formats'}}, 'plaintext';
   push @{$test->[2]->{'test_formats'}}, 'html_text';
+  push @{$test->[2]->{'test_formats'}}, 'xml';
   push @{$test->[2]->{'test_formats'}}, 'latex'
     if (grep {$_ eq $test->[0]} @latex_tests_cases_tests);
   $test->[2]->{'full_document'} = 1 unless 
(exists($test->[2]->{'full_document'}));
diff --git a/tp/t/results/indices/def_existing_index.pl 
b/tp/t/results/indices/def_existing_index.pl
index a4ce7a429f..92a33e26ef 100644
--- a/tp/t/results/indices/def_existing_index.pl
+++ b/tp/t/results/indices/def_existing_index.pl
@@ -102,4 +102,8 @@ $result_converted{'plaintext'}->{'def_existing_index'} = '';
 
 $result_converted{'html_text'}->{'def_existing_index'} = '';
 
+
+$result_converted{'xml'}->{'def_existing_index'} = '<defcodeindex spaces=" " 
line="cp"></defcodeindex>
+';
+
 1;
diff --git a/tp/t/results/indices/def_syn_indices.pl 
b/tp/t/results/indices/def_syn_indices.pl
index 8b89d700f2..46c5632560 100644
--- a/tp/t/results/indices/def_syn_indices.pl
+++ b/tp/t/results/indices/def_syn_indices.pl
@@ -2118,6 +2118,74 @@ after
 ';
 
 
+$result_converted{'xml'}->{'def_syn_indices'} = '<syncodeindex spaces=" " 
from="cp" to="fn" line="cp fn"></syncodeindex>
+
+<node name="Top" spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">Chapter index</nodenext></node>
+<top spaces=" "><sectiontitle>top</sectiontitle>
+
+</top>
+<node name="Chapter-index" spaces=" "><nodename>Chapter 
index</nodename><nodeprev automatic="on">Top</nodeprev><nodeup 
automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Index</sectiontitle>
+
+<para>definedx truc
+<defindex spaces=" " value="truc" line="truc"></defindex>
+after
+</para>
+<indexcommand command="trucindex" index="truc" spaces=" "><indexterm 
index="truc" number="1" incode="0" mergedindex="fn">index 
truc</indexterm></indexcommand>
+
+<defcodeindex spaces=" " value="codeidx" line="codeidx"></defcodeindex>
+
+<indexcommand command="codeidxindex" index="codeidx" spaces=" "><indexterm 
index="codeidx" number="1" incode="1">a <var>index entry</var> t<accent 
type="tilde" bracketed="off">e</accent> <accent 
type="circ"><dotless>i</dotless></accent></indexterm></indexcommand>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1" incode="1" 
mergedindex="fn">cindex entry</indexterm></cindex>
+
+<syncodeindex spaces=" " from="ky" to="pg" line="ky pg"></syncodeindex>
+
+<kindex index="ky" spaces=" "><indexterm index="ky" number="1" 
mergedindex="pg">truc kindex</indexterm></kindex>
+<pindex index="pg" spaces=" "><indexterm index="pg" number="1">pindex 
codeidx</indexterm></pindex>
+
+<synindex spaces=" " from="truc" to="cp" line="truc cp"></synindex>
+
+<defindex spaces=" " value="abc" line="abc"></defindex>
+<defindex spaces=" " value="defg" line="defg"></defindex>
+
+<synindex spaces=" " from="abc" to="defg" line="abc defg"></synindex>
+<synindex spaces=" " from="defg" to="ky" line="defg ky"></synindex>
+
+<indexcommand command="defgindex" index="defg" spaces=" "><indexterm 
index="defg" number="1" incode="0" mergedindex="pg">defg index 
entry</indexterm></indexcommand>
+
+<indexcommand command="abcindex" index="abc" spaces=" "><indexterm index="abc" 
number="1" incode="0" mergedindex="pg">abc index 
entry</indexterm></indexcommand>
+
+<para>pg
+</para><printindex spaces=" " value="pg" line="pg"></printindex>
+
+<para>ky
+</para><printindex spaces=" " value="ky" line="ky"></printindex>
+
+<para>truc
+</para><printindex spaces=" " value="truc" line="truc"></printindex>
+
+<para>value truc
+</para><printindex spaces=" " value="truc" line="truc"></printindex>
+
+<para>cp
+</para><printindex spaces=" " value="cp" line="cp"></printindex>
+
+<para>value cp
+</para><printindex spaces=" " value="cp" line="cp"></printindex>
+
+<para>defg
+</para><printindex spaces=" " value="defg" line="defg"></printindex>
+
+<para>abc
+</para><printindex spaces=" " value="abc" line="abc"></printindex>
+
+<para>fn
+</para><printindex spaces=" " value="fn" line="fn"></printindex>
+</chapter>
+';
+
+
 $result_converted{'latex'}->{'def_syn_indices'} = '\\documentclass{book}
 \\usepackage{imakeidx}
 \\usepackage{amsfonts}
diff --git 
a/tp/t/results/indices/default_cp_index_and_one_letter_syncodeindex.pl 
b/tp/t/results/indices/default_cp_index_and_one_letter_syncodeindex.pl
index e226220e03..9826bc45f9 100644
--- a/tp/t/results/indices/default_cp_index_and_one_letter_syncodeindex.pl
+++ b/tp/t/results/indices/default_cp_index_and_one_letter_syncodeindex.pl
@@ -403,4 +403,15 @@ 
$result_converted{'html_text'}->{'default_cp_index_and_one_letter_syncodeindex'}
 </div>
 ';
 
+
+$result_converted{'xml'}->{'default_cp_index_and_one_letter_syncodeindex'} = 
'<node name="Top" spaces=" "><nodename>Top</nodename></node>
+
+<syncodeindex spaces=" " from="cp" to="fn" line="cp fn"></syncodeindex>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1" incode="1" 
mergedindex="fn">--cindex</indexterm></cindex>
+<cpindex index="cp" spaces=" "><indexterm index="cp" number="2" incode="1" 
mergedindex="fn">--cpindex</indexterm></cpindex>
+
+<printindex spaces=" " value="fn" line="fn"></printindex>
+';
+
 1;
diff --git a/tp/t/results/indices/double_index_entry.pl 
b/tp/t/results/indices/double_index_entry.pl
index 0b14b5e0b3..51e1bda360 100644
--- a/tp/t/results/indices/double_index_entry.pl
+++ b/tp/t/results/indices/double_index_entry.pl
@@ -693,4 +693,24 @@ $result_converted{'html_text'}->{'double_index_entry'} = 
'<a class="node-id" id=
 </div>
 ';
 
+
+$result_converted{'xml'}->{'double_index_entry'} = '<node name="Top" spaces=" 
"><nodename>Top</nodename><nodenext automatic="on">other node</nodenext></node>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="1">aaa</indexterm></cindex>
+
+<para>Text
+</para>
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="2">aaa</indexterm></cindex>
+
+<menu endspaces=" ">
+<menuentry leadingtext="* "><menunode separator="::">other 
node</menunode><menudescription><pre xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+<node name="other-node" spaces=" "><nodename>other 
node</nodename><nodenext></nodenext><nodeprev 
automatic="on">Top</nodeprev><nodeup>Top</nodeup></node>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="3">aaa</indexterm></cindex>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+';
+
 1;
diff --git a/tp/t/results/indices/double_seeentry_seealso.pl 
b/tp/t/results/indices/double_seeentry_seealso.pl
index ec7bec976b..95cfb2a799 100644
--- a/tp/t/results/indices/double_seeentry_seealso.pl
+++ b/tp/t/results/indices/double_seeentry_seealso.pl
@@ -961,6 +961,23 @@ 
$result_converted_errors{'html_text'}->{'double_seeentry_seealso'} = [
 
 
 
+$result_converted{'xml'}->{'double_seeentry_seealso'} = '<node name="Top" 
spaces=" "><nodename>top</nodename><nodenext automatic="on">node 
index</nodenext></node>
+<top spaces=" "><sectiontitle>top</sectiontitle>
+
+</top>
+<node name="node-index" spaces=" "><nodename>node index</nodename><nodeprev 
automatic="on">Top</nodeprev><nodeup automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Chapter Index</sectiontitle>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">aaa 
<seeentry>bbb</seeentry> <seeentry>ccc</seeentry></indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="2"><seealso>ccc</seealso> ddd 
<seealso>eee</seealso></indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="3">ggg 
<seeentry>hhh</seeentry> <seealso>iii</seealso></indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="4"><seealso>fff</seealso></indexterm></cindex> <subentry spaces=" 
">subggg <seeentry>subhhh</seeentry></subentry>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+</chapter>
+';
+
+
 $result_converted{'latex'}->{'double_seeentry_seealso'} = 
'\\documentclass{book}
 \\usepackage{imakeidx}
 \\usepackage{amsfonts}
diff --git a/tp/t/results/indices/double_syncodeindex.pl 
b/tp/t/results/indices/double_syncodeindex.pl
index ac89ad28ae..69bfdbceaa 100644
--- a/tp/t/results/indices/double_syncodeindex.pl
+++ b/tp/t/results/indices/double_syncodeindex.pl
@@ -497,4 +497,17 @@ $result_converted{'html_text'}->{'double_syncodeindex'} = '
 </div>
 ';
 
+
+$result_converted{'xml'}->{'double_syncodeindex'} = '<syncodeindex spaces=" " 
from="cp" to="fn" line="cp fn"></syncodeindex>
+<syncodeindex spaces=" " from="cp" to="fn" line="cp fn"></syncodeindex>
+
+<node name="Top" spaces=" "><nodename>Top</nodename></node>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1" incode="1" 
mergedindex="fn">cindex entry</indexterm></cindex>
+<findex index="fn" spaces=" "><indexterm index="fn" number="1">findex 
entry</indexterm></findex>
+
+<printindex spaces=" " value="fn" line="fn"></printindex>
+<printindex spaces=" " value="cp" line="cp"></printindex>
+';
+
 1;
diff --git a/tp/t/results/indices/empty_cindex_entry.pl 
b/tp/t/results/indices/empty_cindex_entry.pl
index 740a3e45c3..5cffb6383e 100644
--- a/tp/t/results/indices/empty_cindex_entry.pl
+++ b/tp/t/results/indices/empty_cindex_entry.pl
@@ -232,6 +232,12 @@ $result_converted{'html_text'}->{'empty_cindex_entry'} = 
'<a class="node-id" id=
 ';
 
 
+$result_converted{'xml'}->{'empty_cindex_entry'} = '<node name="Top" spaces=" 
"><nodename>Top</nodename><nodenext automatic="on">node</nodenext></node>
+<node name="node" spaces=" "><nodename>node</nodename><nodeprev 
automatic="on">Top</nodeprev></node>
+<cindex></cindex>
+';
+
+
 $result_converted{'latex'}->{'empty_cindex_entry'} = '\\documentclass{book}
 \\usepackage{amsfonts}
 \\usepackage{amsmath}
diff --git a/tp/t/results/indices/empty_index_entry.pl 
b/tp/t/results/indices/empty_index_entry.pl
index 2e8a91a676..914376884b 100644
--- a/tp/t/results/indices/empty_index_entry.pl
+++ b/tp/t/results/indices/empty_index_entry.pl
@@ -408,6 +408,17 @@ $result_converted{'html_text'}->{'empty_index_entry'} = 
'<a class="node-id" id="
 ';
 
 
+$result_converted{'xml'}->{'empty_index_entry'} = '<node name="Top" spaces=" 
"><nodename>Top</nodename><nodenext automatic="on">node</nodenext></node>
+
+<node name="node" spaces=" "><nodename>node</nodename><nodeprev 
automatic="on">Top</nodeprev></node>
+
+<deffn spaces=" " endspaces=" "><definitionterm><defcategory 
bracketed="on"></defcategory> <deffunction bracketed="on" spaces=" 
"></deffunction></definitionterm>
+</deffn>
+
+<printindex spaces=" " value="fn" line="fn"></printindex>
+';
+
+
 $result_converted{'latex'}->{'empty_index_entry'} = '\\documentclass{book}
 \\usepackage{amsfonts}
 \\usepackage{amsmath}
diff --git a/tp/t/results/indices/empty_string_index_entry.pl 
b/tp/t/results/indices/empty_string_index_entry.pl
index e63f31fe76..410e14bfed 100644
--- a/tp/t/results/indices/empty_string_index_entry.pl
+++ b/tp/t/results/indices/empty_string_index_entry.pl
@@ -1035,6 +1035,23 @@ 
$result_converted_errors{'html_text'}->{'empty_string_index_entry'} = [
 
 
 
+$result_converted{'xml'}->{'empty_string_index_entry'} = '<node name="Top" 
spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">node</nodenext></node>
+<node name="node" spaces=" "><nodename>node</nodename><nodeprev 
automatic="on">Top</nodeprev></node>
+
+<findex index="fn" spaces=" "><indexterm index="fn" 
number="1"><w></w></indexterm></findex>
+
+<ftable commandarg="code" spaces=" " endspaces=" ">
+<tableentry><tableterm><item spaces=" "><itemformat command="code"><indexterm 
index="fn" number="2"><w></w></indexterm><w></w></itemformat></item>
+</tableterm></tableentry></ftable>
+
+<defun spaces=" " endspaces=" "><definitionterm><indexterm index="fn" 
number="3"><w></w></indexterm><defcategory automatic="on" 
bracketed="on">Function</defcategory> <deffunction 
bracketed="on"><w></w></deffunction> <defparam bracketed="on"></defparam> 
<defparam bracketed="on"></defparam></definitionterm>
+<defunx spaces=" "><definitionterm><indexterm index="fn" 
number="4"><w></w></indexterm><defcategory automatic="on" 
bracketed="on">Function</defcategory> <deffunction 
bracketed="on"><w></w></deffunction> <defparam bracketed="on"></defparam> 
<defparam bracketed="on"></defparam></definitionterm></defunx>
+</defun>
+
+<printindex spaces=" " value="fn" line="fn"></printindex>
+';
+
+
 $result_converted{'latex'}->{'empty_string_index_entry'} = 
'\\documentclass{book}
 \\usepackage{imakeidx}
 \\usepackage{amsfonts}
diff --git a/tp/t/results/indices/explicit_sort_key.pl 
b/tp/t/results/indices/explicit_sort_key.pl
index 2bc4a5467a..d845b3ab4b 100644
--- a/tp/t/results/indices/explicit_sort_key.pl
+++ b/tp/t/results/indices/explicit_sort_key.pl
@@ -1109,6 +1109,28 @@ $result_converted{'html_text'}->{'explicit_sort_key'} = 
'<div class="top-level-e
 ';
 
 
+$result_converted{'xml'}->{'explicit_sort_key'} = '<node name="Top" spaces=" 
"><nodename>Top</nodename><nodenext automatic="on">node</nodenext></node>
+<top><sectiontitle></sectiontitle>
+
+<node name="node" spaces=" "><nodename>node</nodename><nodeprev 
automatic="on">Top</nodeprev></node>
+
+<defindex spaces=" " value="SK" line="SK"></defindex>
+
+<indexcommand command="SKindex" index="SK" spaces=" "><indexterm index="SK" 
number="1" incode="0"><sortas>A</sortas> bbbbbbb 
(first)</indexterm></indexcommand>
+<indexcommand command="SKindex" index="SK" spaces=" "><indexterm index="SK" 
number="2" incode="0"><sortas>B</sortas> aaaaaaa 
(second)</indexterm></indexcommand>
+<indexcommand command="SKindex" index="SK" spaces=" "><indexterm index="SK" 
number="3" incode="0"><sortas>0</sortas> zero sort 
key</indexterm></indexcommand>
+<indexcommand command="SKindex" index="SK" spaces=" "><indexterm index="SK" 
number="4" incode="0"><b>aaa <sortas>invalid 
nesting</sortas></b></indexterm></indexcommand>
+
+<para>in a reuglar para <sortas>foo</sortas>. <code>inside another 
<sortas>command</sortas></code>.
+</para>
+<para><sortas>and cmd <b>inside</b></sortas>.
+<url><urefurl>and cmd <sortas>inside</sortas></urefurl></url>.
+</para>
+<printindex spaces=" " value="SK" line="SK"></printindex>
+</top>
+';
+
+
 $result_converted{'latex'}->{'explicit_sort_key'} = '\\documentclass{book}
 \\usepackage{imakeidx}
 \\usepackage{amsfonts}
diff --git a/tp/t/results/indices/ftable_vtable.pl 
b/tp/t/results/indices/ftable_vtable.pl
index 59eb86c5df..1b28fb991d 100644
--- a/tp/t/results/indices/ftable_vtable.pl
+++ b/tp/t/results/indices/ftable_vtable.pl
@@ -982,4 +982,30 @@ $result_converted{'html_text'}->{'ftable_vtable'} = '<h1 
class="node" id="Top">T
 
 ';
 
+
+$result_converted{'xml'}->{'ftable_vtable'} = '<preamblebeforebeginning>
+</preamblebeforebeginning><node name="Top" spaces=" 
"><nodename>Top</nodename></node>
+
+<ftable commandarg="emph" spaces=" " endspaces=" ">
+<tableentry><tableterm><item spaces=" "><itemformat command="emph"><indexterm 
index="fn" number="1">function1</indexterm>function1</itemformat></item>
+<itemx spaces=" "><itemformat command="emph"><indexterm index="fn" 
number="2">function2x</indexterm>function2x</itemformat></itemx>
+</tableterm><tableitem><para>Text
+</para></tableitem></tableentry><tableentry><tableterm><item spaces=" 
"><itemformat command="emph"><indexterm index="fn" 
number="3">fun3</indexterm>fun3</itemformat></item>
+</tableterm></tableentry></ftable>
+
+<vtable commandarg="emph" spaces=" " endspaces=" ">
+<tableentry><tableterm><item spaces=" "><itemformat command="emph"><indexterm 
index="vr" number="1">var1 &errorglyph;</indexterm>var1 
&errorglyph;</itemformat></item>
+<itemx spaces=" "><itemformat command="emph"><indexterm index="vr" 
number="2">varx2</indexterm>varx2</itemformat></itemx>
+</tableterm><tableitem><para>Text
+</para></tableitem></tableentry><tableentry><tableterm><item spaces=" 
"><itemformat command="emph"><indexterm index="vr" 
number="3">var3</indexterm>var3</itemformat></item>
+</tableterm></tableentry></vtable>
+
+<findex index="fn" spaces=" "><indexterm index="fn" 
number="4">function1</indexterm></findex>
+
+<printindex spaces=" " value="fn" line="fn"></printindex>
+
+<printindex spaces=" " value="vr" line="vr"></printindex>
+
+';
+
 1;
diff --git a/tp/t/results/indices/image_lines_count.pl 
b/tp/t/results/indices/image_lines_count.pl
index f1ead55593..3be9ef12e7 100644
--- a/tp/t/results/indices/image_lines_count.pl
+++ b/tp/t/results/indices/image_lines_count.pl
@@ -319,4 +319,14 @@ $result_converted{'html_text'}->{'image_lines_count'} = 
'<h1 class="node" id="To
 </div>
 ';
 
+
+$result_converted{'xml'}->{'image_lines_count'} = '<node name="Top" spaces=" 
"><nodename>Top</nodename></node>
+
+<image><imagefile>count_image</imagefile></image>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">index 
entry</indexterm></cindex>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+';
+
 1;
diff --git a/tp/t/results/indices/image_text_lines_count.pl 
b/tp/t/results/indices/image_text_lines_count.pl
index e1f41d1e79..9196310e02 100644
--- a/tp/t/results/indices/image_text_lines_count.pl
+++ b/tp/t/results/indices/image_text_lines_count.pl
@@ -331,4 +331,14 @@ 
$result_converted_errors{'html_text'}->{'image_text_lines_count'} = [
 ];
 
 
+
+$result_converted{'xml'}->{'image_text_lines_count'} = '<node name="Top" 
spaces=" "><nodename>Top</nodename></node>
+
+<image><imagefile>count_image_text</imagefile></image>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">index 
entry</indexterm></cindex>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+';
+
 1;
diff --git a/tp/t/results/indices/index_entries_locations.pl 
b/tp/t/results/indices/index_entries_locations.pl
index c44b797754..1333654ee3 100644
--- a/tp/t/results/indices/index_entries_locations.pl
+++ b/tp/t/results/indices/index_entries_locations.pl
@@ -604,4 +604,27 @@ end paragraph.
 </div>
 ';
 
+
+$result_converted{'xml'}->{'index_entries_locations'} = 
'<preamblebeforebeginning>
+</preamblebeforebeginning><node name="Top" spaces=" 
"><nodename>Top</nodename></node>
+
+<para>Initial paragraph.
+</para>
+<para>Paragraph
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">entry in 
paragraph</indexterm></cindex>
+end paragraph.
+<cindex index="cp" spaces=" "><indexterm index="cp" number="2">entry at end of 
paragraph.</indexterm></cindex>
+</para>
+<para>New paragraph.
+</para>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="3">Entry before 
paragraph</indexterm></cindex>
+<para>Another paragraph.
+</para>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="4">lone 
entry</indexterm></cindex>
+
+<para>Last paragraph.
+</para>
+<printindex spaces=" " value="cp" line="cp"></printindex>
+';
+
 1;
diff --git a/tp/t/results/indices/index_entry_before_first_node.pl 
b/tp/t/results/indices/index_entry_before_first_node.pl
index df802fb131..d554e3a031 100644
--- a/tp/t/results/indices/index_entry_before_first_node.pl
+++ b/tp/t/results/indices/index_entry_before_first_node.pl
@@ -305,4 +305,13 @@ 
$result_converted{'html_text'}->{'index_entry_before_first_node'} = '<a class="i
 </div>
 ';
 
+
+$result_converted{'xml'}->{'index_entry_before_first_node'} = 
'<preamblebeforebeginning>
+</preamblebeforebeginning><cindex index="cp" spaces=" "><indexterm index="cp" 
number="1">before nodes</indexterm></cindex>
+
+<node name="Top" spaces=" "><nodename>Top</nodename></node>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+';
+
 1;
diff --git a/tp/t/results/indices/index_entry_before_node.pl 
b/tp/t/results/indices/index_entry_before_node.pl
index 108a6bf283..7a1527918b 100644
--- a/tp/t/results/indices/index_entry_before_node.pl
+++ b/tp/t/results/indices/index_entry_before_node.pl
@@ -787,4 +787,23 @@ 
$result_converted{'html_text'}->{'index_entry_before_node'} = '<a class="node-id
 </div>
 ';
 
+
+$result_converted{'xml'}->{'index_entry_before_node'} = '<node name="Top" 
spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">first</nodenext></node>
+
+<menu endspaces=" ">
+<menuentry leadingtext="* "><menunode 
separator="::">first</menunode><menudescription><pre xml:space="preserve">
+</pre></menudescription></menuentry><menuentry leadingtext="* "><menunode 
separator="::">second</menunode><menudescription><pre xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+<node name="first" spaces=" 
"><nodename>first</nodename><nodenext>second</nodenext><nodeprev 
automatic="on">Top</nodeprev><nodeup>Top</nodeup></node>
+
+<para>Para.
+</para>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">lone 
entry</indexterm></cindex>
+
+<node name="second" spaces=" 
"><nodename>second</nodename><nodenext></nodenext><nodeprev>first</nodeprev><nodeup>Top</nodeup></node>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+';
+
 1;
diff --git a/tp/t/results/indices/index_entry_in_footnote.pl 
b/tp/t/results/indices/index_entry_in_footnote.pl
index 19f2495461..47b0ca569d 100644
--- a/tp/t/results/indices/index_entry_in_footnote.pl
+++ b/tp/t/results/indices/index_entry_in_footnote.pl
@@ -331,4 +331,14 @@ 
$result_converted{'html_text'}->{'index_entry_in_footnote'} = '<h1 class="node"
 </div>
 ';
 
+
+$result_converted{'xml'}->{'index_entry_in_footnote'} = '<node name="Top" 
spaces=" "><nodename>Top</nodename></node>
+
+<para>Top node<footnote><para>in footnote
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">index entry in 
footnote</indexterm></cindex>
+</para></footnote>
+</para>
+<printindex spaces=" " value="cp" line="cp"></printindex>
+';
+
 1;
diff --git a/tp/t/results/indices/index_entry_in_footnote_different_node_end.pl 
b/tp/t/results/indices/index_entry_in_footnote_different_node_end.pl
index b2fbf4ad55..9097675b30 100644
--- a/tp/t/results/indices/index_entry_in_footnote_different_node_end.pl
+++ b/tp/t/results/indices/index_entry_in_footnote_different_node_end.pl
@@ -709,4 +709,26 @@ 
$result_converted{'html_text'}->{'index_entry_in_footnote_different_node_end'} =
 </div>
 ';
 
+
+$result_converted{'xml'}->{'index_entry_in_footnote_different_node_end'} = 
'<node name="Top" spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">First</nodenext></node>
+
+<menu endspaces=" ">
+<menuentry leadingtext="* "><menunode 
separator="::">First</menunode><menudescription><pre xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+<para>Top node<footnote><para>in footnote
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">index entry in 
footnote</indexterm></cindex>
+</para>
+<para>Blah
+</para>
+<para>Blih
+</para>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="2">counting 
entry</indexterm></cindex>
+</footnote>
+</para>
+<node name="First" spaces=" "><nodename>First</nodename><nodeprev 
automatic="on">Top</nodeprev><nodeup automatic="on">Top</nodeup></node>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+';
+
 1;
diff --git a/tp/t/results/indices/index_entry_in_footnote_separate.pl 
b/tp/t/results/indices/index_entry_in_footnote_separate.pl
index da12b62427..00a27a904f 100644
--- a/tp/t/results/indices/index_entry_in_footnote_separate.pl
+++ b/tp/t/results/indices/index_entry_in_footnote_separate.pl
@@ -747,4 +747,27 @@ 
$result_converted{'html_text'}->{'index_entry_in_footnote_separate'} = '<a class
 <a class="index-entry-id" id="index-counting-entry"></a>
 </div>';
 
+
+$result_converted{'xml'}->{'index_entry_in_footnote_separate'} = 
'<footnotestyle spaces=" " value="separate" line="separate"></footnotestyle>
+<node name="Top" spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">First</nodenext></node>
+
+<menu endspaces=" ">
+<menuentry leadingtext="* "><menunode 
separator="::">First</menunode><menudescription><pre xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+<para>Top node<footnote><para>in footnote
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">index entry in 
footnote</indexterm></cindex>
+</para>
+<para>Blah
+</para>
+<para>Blih
+</para>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="2">counting 
entry</indexterm></cindex>
+</footnote>
+</para>
+<node name="First" spaces=" "><nodename>First</nodename><nodeprev 
automatic="on">Top</nodeprev><nodeup automatic="on">Top</nodeup></node>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+';
+
 1;
diff --git 
a/tp/t/results/indices/multiple_index_text_sortas_seeentry_seealso.pl 
b/tp/t/results/indices/multiple_index_text_sortas_seeentry_seealso.pl
index ce2da5c510..d25702cc17 100644
--- a/tp/t/results/indices/multiple_index_text_sortas_seeentry_seealso.pl
+++ b/tp/t/results/indices/multiple_index_text_sortas_seeentry_seealso.pl
@@ -790,6 +790,22 @@ 
$result_converted{'html_text'}->{'multiple_index_text_sortas_seeentry_seealso'}
 ';
 
 
+$result_converted{'xml'}->{'multiple_index_text_sortas_seeentry_seealso'} = 
'<node name="Top" spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">chapter index</nodenext></node>
+<top><sectiontitle></sectiontitle>
+
+</top>
+<node name="chapter-index" spaces=" "><nodename>chapter 
index</nodename><nodeprev automatic="on">Top</nodeprev><nodeup 
automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Index</sectiontitle>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">aaa 
<sortas>A&textmdash;S</sortas> continue <seeentry>other second</seeentry> 
aagain <seealso>toto</seealso></indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="2">other 
<sortas>BB</sortas> second</indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="3">entry 
<seeentry>something else</seeentry> secret</indexterm></cindex>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+</chapter>
+';
+
+
 $result_converted{'latex'}->{'multiple_index_text_sortas_seeentry_seealso'} = 
'\\documentclass{book}
 \\usepackage{imakeidx}
 \\usepackage{amsfonts}
diff --git a/tp/t/results/indices/printindex_index_entry_in_copying.pl 
b/tp/t/results/indices/printindex_index_entry_in_copying.pl
index daff6fd84b..bf3d05ab1f 100644
--- a/tp/t/results/indices/printindex_index_entry_in_copying.pl
+++ b/tp/t/results/indices/printindex_index_entry_in_copying.pl
@@ -1544,4 +1544,44 @@ 
$result_converted{'html_text'}->{'printindex_index_entry_in_copying'} = '
 </div>
 ';
 
+
+$result_converted{'xml'}->{'printindex_index_entry_in_copying'} = '<copying 
endspaces=" ">
+
+<findex index="fn" spaces=" "><indexterm index="fn" number="1">Copying this 
document</indexterm></findex>
+
+<defun spaces=" " endspaces=" "><definitionterm><indexterm index="fn" 
number="2">fun</indexterm><defcategory automatic="on" 
bracketed="on">Function</defcategory> <deffunction>fun</deffunction> 
<defparam>arg</defparam></definitionterm>
+<defunx spaces=" "><definitionterm><indexterm index="fn" 
number="3">xf</indexterm><defcategory automatic="on" 
bracketed="on">Function</defcategory> <deffunction>xf</deffunction> 
<defparam>arg</defparam></definitionterm></defunx>
+<definitionitem><para>Defun
+</para></definitionitem></defun>
+
+<ftable commandarg="asis" spaces=" " endspaces=" ">
+<tableentry><tableterm><item spaces=" "><itemformat command="asis"><indexterm 
index="fn" number="4">ftable item</indexterm>ftable item</itemformat></item>
+<itemx spaces=" "><itemformat command="asis"><indexterm index="fn" 
number="5">xftable xitem</indexterm>xftable xitem</itemformat></itemx>
+</tableterm></tableentry></ftable>
+
+<printindex spaces=" " value="fn" line="fn"></printindex>
+
+</copying>
+
+<node name="Top" spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">chapter</nodenext></node>
+<top spaces=" "><sectiontitle>top</sectiontitle>
+
+<para>Top.
+</para><insertcopying></insertcopying>
+
+<menu endspaces=" ">
+<menuentry leadingtext="* "><menunode 
separator="::">chapter</menunode><menudescription><pre xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+</top>
+<node name="chapter" spaces=" "><nodename>chapter</nodename><nodeprev 
automatic="on">Top</nodeprev><nodeup automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Chapter</sectiontitle>
+
+<insertcopying></insertcopying>
+
+<printindex spaces=" " value="fn" line="fn"></printindex>
+
+</chapter>
+';
+
 1;
diff --git 
a/tp/t/results/indices/printindex_index_entry_in_copying_in_footnote.pl 
b/tp/t/results/indices/printindex_index_entry_in_copying_in_footnote.pl
index aa5d597900..ecfc8d612b 100644
--- a/tp/t/results/indices/printindex_index_entry_in_copying_in_footnote.pl
+++ b/tp/t/results/indices/printindex_index_entry_in_copying_in_footnote.pl
@@ -937,4 +937,35 @@ 
$result_converted{'html_text'}->{'printindex_index_entry_in_copying_in_footnote'
 </div>
 ';
 
+
+$result_converted{'xml'}->{'printindex_index_entry_in_copying_in_footnote'} = 
'<copying endspaces=" ">
+
+<para>Copying<footnote spaces="\\n"><para>In footnote
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">Copying this 
document</indexterm></cindex>
+</para>
+</footnote>.
+</para>
+<printindex spaces=" " value="cp" line="cp"></printindex>
+
+</copying>
+
+<node name="Top" spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">chapter</nodenext></node>
+<top spaces=" "><sectiontitle>top</sectiontitle>
+
+<para>Top.
+</para><insertcopying></insertcopying>
+
+<menu endspaces=" ">
+<menuentry leadingtext="* "><menunode 
separator="::">chapter</menunode><menudescription><pre xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+</top>
+<node name="chapter" spaces=" "><nodename>chapter</nodename><nodeprev 
automatic="on">Top</nodeprev><nodeup automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Chapter</sectiontitle>
+
+<insertcopying></insertcopying>
+
+</chapter>
+';
+
 1;
diff --git 
a/tp/t/results/indices/printindex_index_entry_in_copying_no_insertcopying.pl 
b/tp/t/results/indices/printindex_index_entry_in_copying_no_insertcopying.pl
index 6defc72ea5..cf6212cf93 100644
--- a/tp/t/results/indices/printindex_index_entry_in_copying_no_insertcopying.pl
+++ b/tp/t/results/indices/printindex_index_entry_in_copying_no_insertcopying.pl
@@ -1333,4 +1333,42 @@ 
$result_converted{'html_text'}->{'printindex_index_entry_in_copying_no_insertcop
 </div>
 ';
 
+
+$result_converted{'xml'}->{'printindex_index_entry_in_copying_no_insertcopying'}
 = '<copying endspaces=" ">
+
+<findex index="fn" spaces=" "><indexterm index="fn" number="1">Copying this 
document</indexterm></findex>
+
+<defun spaces=" " endspaces=" "><definitionterm><indexterm index="fn" 
number="2">fun</indexterm><defcategory automatic="on" 
bracketed="on">Function</defcategory> <deffunction>fun</deffunction> 
<defparam>arg</defparam></definitionterm>
+<defunx spaces=" "><definitionterm><indexterm index="fn" 
number="3">xf</indexterm><defcategory automatic="on" 
bracketed="on">Function</defcategory> <deffunction>xf</deffunction> 
<defparam>arg</defparam></definitionterm></defunx>
+<definitionitem><para>Defun
+</para></definitionitem></defun>
+
+<ftable commandarg="asis" spaces=" " endspaces=" ">
+<tableentry><tableterm><item spaces=" "><itemformat command="asis"><indexterm 
index="fn" number="4">ftable item</indexterm>ftable item</itemformat></item>
+<itemx spaces=" "><itemformat command="asis"><indexterm index="fn" 
number="5">xftable xitem</indexterm>xftable xitem</itemformat></itemx>
+</tableterm></tableentry></ftable>
+
+<printindex spaces=" " value="fn" line="fn"></printindex>
+
+</copying>
+
+<node name="Top" spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">chapter</nodenext></node>
+<top spaces=" "><sectiontitle>top</sectiontitle>
+
+<para>Top.
+</para>
+<menu endspaces=" ">
+<menuentry leadingtext="* "><menunode 
separator="::">chapter</menunode><menudescription><pre xml:space="preserve">
+</pre></menudescription></menuentry></menu>
+
+</top>
+<node name="chapter" spaces=" "><nodename>chapter</nodename><nodeprev 
automatic="on">Top</nodeprev><nodeup automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Chapter</sectiontitle>
+
+
+<printindex spaces=" " value="fn" line="fn"></printindex>
+
+</chapter>
+';
+
 1;
diff --git a/tp/t/results/indices/printindex_with_space_before.pl 
b/tp/t/results/indices/printindex_with_space_before.pl
index 861ce3ae97..46ec8b7e83 100644
--- a/tp/t/results/indices/printindex_with_space_before.pl
+++ b/tp/t/results/indices/printindex_with_space_before.pl
@@ -276,4 +276,13 @@ 
$result_converted{'html_text'}->{'printindex_with_space_before'} = '<h1 class="n
 </div>
 ';
 
+
+$result_converted{'xml'}->{'printindex_with_space_before'} = '<node name="Top" 
spaces=" "><nodename>Top</nodename></node>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="1">index</indexterm></cindex>
+
+<para>Text.
+</para><printindex spaces=" " value="cp" line="cp"></printindex>
+';
+
 1;
diff --git a/tp/t/results/indices/same_index_entry_merged_indices.pl 
b/tp/t/results/indices/same_index_entry_merged_indices.pl
index 6c296c905d..850bcf0708 100644
--- a/tp/t/results/indices/same_index_entry_merged_indices.pl
+++ b/tp/t/results/indices/same_index_entry_merged_indices.pl
@@ -773,4 +773,24 @@ 
$result_converted{'html_text'}->{'same_index_entry_merged_indices'} = '
 </div>
 ';
 
+
+$result_converted{'xml'}->{'same_index_entry_merged_indices'} = '<syncodeindex 
spaces=" " from="vr" to="fn" line="vr fn"></syncodeindex>
+
+<node name="Top" spaces=" "><nodename>Top</nodename></node>
+<top><sectiontitle></sectiontitle>
+
+<para>Text.
+</para>
+<deffn spaces=" " endspaces=" "><definitionterm><indexterm index="fn" 
number="1">mmm-mode</indexterm><defcategory>Command</defcategory> 
<deffunction>mmm-mode</deffunction> 
<defparam><var>arg</var></defparam></definitionterm>
+<definitionitem><para>Toggle the state of MMM Mode.
+</para></definitionitem></deffn>
+
+<defvar spaces=" " endspaces=" "><definitionterm><indexterm index="vr" 
number="1" mergedindex="fn">mmm-mode</indexterm><defcategory automatic="on" 
bracketed="on">Variable</defcategory> 
<defvariable>mmm-mode</defvariable></definitionterm>
+<definitionitem><para>This variable represents MMM Mode.
+</para></definitionitem></defvar>
+
+<printindex spaces=" " value="fn" line="fn"></printindex>
+</top>
+';
+
 1;
diff --git a/tp/t/results/indices/same_only_seealso_seeentry.pl 
b/tp/t/results/indices/same_only_seealso_seeentry.pl
index ebc2ea4ec1..1094acdb2d 100644
--- a/tp/t/results/indices/same_only_seealso_seeentry.pl
+++ b/tp/t/results/indices/same_only_seealso_seeentry.pl
@@ -939,6 +939,27 @@ 
$result_converted{'html_text'}->{'same_only_seealso_seeentry'} = '<div class="to
 ';
 
 
+$result_converted{'xml'}->{'same_only_seealso_seeentry'} = '<node name="Top" 
spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">node</nodenext></node>
+<top spaces=" "><sectiontitle>top</sectiontitle>
+
+</top>
+<node name="node" spaces=" "><nodename>node</nodename><nodeprev 
automatic="on">Top</nodeprev><nodeup automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>chap</sectiontitle>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">aaa 
<seealso>sss</seealso></indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="2">aaa 
<seealso>123</seealso></indexterm></cindex>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="3">bbb 
<seeentry>yyy</seeentry></indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="4">bbb 
<seeentry>ttt</seeentry></indexterm></cindex>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="5">ccc 
<seealso>also</seealso></indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="6">ccc 
<seeentry>entry</seeentry></indexterm></cindex>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+</chapter>
+';
+
+
 $result_converted{'latex'}->{'same_only_seealso_seeentry'} = 
'\\documentclass{book}
 \\usepackage{imakeidx}
 \\usepackage{amsfonts}
diff --git a/tp/t/results/indices/same_seealso_seeentry.pl 
b/tp/t/results/indices/same_seealso_seeentry.pl
index f3d3fed932..b66884d120 100644
--- a/tp/t/results/indices/same_seealso_seeentry.pl
+++ b/tp/t/results/indices/same_seealso_seeentry.pl
@@ -1018,6 +1018,29 @@ 
$result_converted{'html_text'}->{'same_seealso_seeentry'} = '<div class="top-lev
 ';
 
 
+$result_converted{'xml'}->{'same_seealso_seeentry'} = '<node name="Top" 
spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">node</nodenext></node>
+<top spaces=" "><sectiontitle>top</sectiontitle>
+
+</top>
+<node name="node" spaces=" "><nodename>node</nodename><nodeprev 
automatic="on">Top</nodeprev><nodeup automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>chap</sectiontitle>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">aaa 
<seealso>sss</seealso></indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="2">aaa 
<seealso>123</seealso></indexterm></cindex>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="3">bbb 
<seeentry>yyy</seeentry></indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="4">bbb 
<seeentry>ttt</seeentry></indexterm></cindex>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="5">ccc 
<seealso>also</seealso></indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="6">ccc 
<seeentry>entry</seeentry></indexterm></cindex>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="7">entry</indexterm></cindex>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+</chapter>
+';
+
+
 $result_converted{'latex'}->{'same_seealso_seeentry'} = '\\documentclass{book}
 \\usepackage{imakeidx}
 \\usepackage{amsfonts}
diff --git a/tp/t/results/indices/seealso_duplicate.pl 
b/tp/t/results/indices/seealso_duplicate.pl
index dbea4236fb..62a7cb2879 100644
--- a/tp/t/results/indices/seealso_duplicate.pl
+++ b/tp/t/results/indices/seealso_duplicate.pl
@@ -471,6 +471,15 @@ $result_converted{'html_text'}->{'seealso_duplicate'} = 
'<h1 class="node" id="To
 ';
 
 
+$result_converted{'xml'}->{'seealso_duplicate'} = '<node name="Top" spaces=" 
"><nodename>Top</nodename></node>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="1"><command>awk</command></indexterm></cindex> <subentry spaces=" 
">POSIX and</subentry>
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="2"><command>awk</command></indexterm></cindex> <subentry spaces=" 
">POSIX and <seealso>POSIX <command>awk</command></seealso></subentry>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+';
+
+
 $result_converted{'latex'}->{'seealso_duplicate'} = '\\documentclass{book}
 \\usepackage{imakeidx}
 \\usepackage{amsfonts}
diff --git a/tp/t/results/indices/seeentry.pl b/tp/t/results/indices/seeentry.pl
index 707c8127e3..b07540bf9c 100644
--- a/tp/t/results/indices/seeentry.pl
+++ b/tp/t/results/indices/seeentry.pl
@@ -799,6 +799,25 @@ $result_converted{'html_text'}->{'seeentry'} = '<div 
class="top-level-extent" id
 ';
 
 
+$result_converted{'xml'}->{'seeentry'} = '<node name="Top" spaces=" 
"><nodename>Top</nodename><nodenext automatic="on">chapter 
index</nodenext></node>
+<top><sectiontitle></sectiontitle>
+
+</top>
+<node name="chapter-index" spaces=" "><nodename>chapter 
index</nodename><nodeprev automatic="on">Top</nodeprev><nodeup 
automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Index</sectiontitle>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">aaa 
<seeentry>bbb</seeentry></indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="2"><seealso>ccc</seealso> ddd</indexterm></cindex>
+
+<findex index="fn" spaces=" "><indexterm index="fn" number="1">f---aaa 
<seeentry>f---bbb</seeentry></indexterm></findex>
+<findex index="fn" spaces=" "><indexterm index="fn" 
number="2"><seealso>f---ccc</seealso> f---ddd</indexterm></findex>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+<printindex spaces=" " value="fn" line="fn"></printindex>
+</chapter>
+';
+
+
 $result_converted{'latex'}->{'seeentry'} = '\\documentclass{book}
 \\usepackage{imakeidx}
 \\usepackage{amsfonts}
diff --git a/tp/t/results/indices/subentries.pl 
b/tp/t/results/indices/subentries.pl
index c0d94ecf42..8788560252 100644
--- a/tp/t/results/indices/subentries.pl
+++ b/tp/t/results/indices/subentries.pl
@@ -1370,6 +1370,29 @@ $result_converted{'html_text'}->{'subentries'} = '<div 
class="top-level-extent"
 ';
 
 
+$result_converted{'xml'}->{'subentries'} = '<node name="Top" spaces=" 
"><nodename>Top</nodename><nodenext automatic="on">chapter 
index</nodenext></node>
+<top><sectiontitle></sectiontitle>
+
+</top>
+<node name="chapter-index" spaces=" "><nodename>chapter 
index</nodename><nodeprev automatic="on">Top</nodeprev><nodeup 
automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Index</sectiontitle>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="1">a&textmdash;a</indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="2">b&textmdash;b</indexterm></cindex> <subentry spaces=" 
">c&textmdash;c</subentry>
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="3">d&textmdash;dd</indexterm></cindex> <subentry spaces=" 
">e&textmdash;ee </subentry><subentry spaces=" ">f&textmdash;ff</subentry>
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="4">g&textmdash;gg</indexterm></cindex> <subentry spaces=" 
">h&textmdash;hh jjj </subentry><subentry spaces=" ">k&textmdash;kk 
</subentry><subentry spaces=" ">l&textmdash;ll</subentry>
+
+<findex index="fn" spaces=" "><indexterm index="fn" 
number="1">f---aa</indexterm></findex>
+<findex index="fn" spaces=" "><indexterm index="fn" 
number="2">f---bb</indexterm></findex> <subentry spaces=" 
">f&textmdash;cc</subentry>
+<findex index="fn" spaces=" "><indexterm index="fn" 
number="3">f---ddd</indexterm></findex> <subentry spaces=" ">f&textmdash;eee 
</subentry><subentry spaces=" ">ffff</subentry>
+<findex index="fn" spaces=" "><indexterm index="fn" 
number="4">f---ggg</indexterm></findex> <subentry spaces=" ">f&textmdash;hhh 
fjjj </subentry><subentry spaces=" ">f&textmdash;kkk </subentry><subentry 
spaces=" ">f&textmdash;lll</subentry>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+<printindex spaces=" " value="fn" line="fn"></printindex>
+</chapter>
+';
+
+
 $result_converted{'latex'}->{'subentries'} = '\\documentclass{book}
 \\usepackage{imakeidx}
 \\usepackage{amsfonts}
diff --git a/tp/t/results/indices/subentry_and_sortas.pl 
b/tp/t/results/indices/subentry_and_sortas.pl
index 5794bf3629..783b791fc1 100644
--- a/tp/t/results/indices/subentry_and_sortas.pl
+++ b/tp/t/results/indices/subentry_and_sortas.pl
@@ -797,6 +797,23 @@ $result_converted{'html_text'}->{'subentry_and_sortas'} = 
'<div class="top-level
 ';
 
 
+$result_converted{'xml'}->{'subentry_and_sortas'} = '<node name="Top" spaces=" 
"><nodename>Top</nodename><nodenext automatic="on">chapter 
index</nodenext></node>
+<top><sectiontitle></sectiontitle>
+
+</top>
+<node name="chapter-index" spaces=" "><nodename>chapter 
index</nodename><nodeprev automatic="on">Top</nodeprev><nodeup 
automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Index</sectiontitle>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">aaa 
<sortas>A&textmdash;S</sortas></indexterm></cindex> <subentry spaces=" 
"><sortas>B&textmdash;S1</sortas> bbb</subentry>
+
+<findex index="fn" spaces=" "><indexterm index="fn" number="1">xxx 
<sortas>X---S</sortas></indexterm></findex> <subentry spaces=" 
"><sortas>X&textmdash;S1</sortas> zzz</subentry>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+<printindex spaces=" " value="fn" line="fn"></printindex>
+</chapter>
+';
+
+
 $result_converted{'latex'}->{'subentry_and_sortas'} = '\\documentclass{book}
 \\usepackage{imakeidx}
 \\usepackage{amsfonts}
diff --git a/tp/t/results/indices/subentry_and_sortas_spaces.pl 
b/tp/t/results/indices/subentry_and_sortas_spaces.pl
new file mode 100644
index 0000000000..9ad30da56a
--- /dev/null
+++ b/tp/t/results/indices/subentry_and_sortas_spaces.pl
@@ -0,0 +1,1034 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors 
+   %result_indices %result_sectioning %result_nodes %result_menus
+   %result_floats %result_converted %result_converted_errors 
+   %result_elements %result_directions_text %result_indices_sort_strings);
+
+use utf8;
+
+$result_trees{'subentry_and_sortas_spaces'} = {
+  'contents' => [
+    {
+      'contents' => [
+        {
+          'contents' => [],
+          'parent' => {},
+          'type' => 'preamble_before_content'
+        }
+      ],
+      'parent' => {},
+      'type' => 'before_node_section'
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'Top'
+            }
+          ],
+          'extra' => {
+            'spaces_after_argument' => '
+'
+          },
+          'parent' => {},
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'node_content' => [
+          {}
+        ],
+        'nodes_manuals' => [
+          {
+            'node_content' => [
+              {}
+            ],
+            'normalized' => 'Top'
+          }
+        ],
+        'normalized' => 'Top',
+        'spaces_before_argument' => ' '
+      },
+      'parent' => {},
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 1,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'extra' => {
+            'spaces_after_argument' => '
+'
+          },
+          'parent' => {},
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'top',
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        }
+      ],
+      'extra' => {},
+      'parent' => {},
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 2,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'chapter index'
+            }
+          ],
+          'extra' => {
+            'spaces_after_argument' => '
+'
+          },
+          'parent' => {},
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'node',
+      'extra' => {
+        'isindex' => 1,
+        'node_content' => [
+          {}
+        ],
+        'nodes_manuals' => [
+          {
+            'node_content' => [
+              {}
+            ],
+            'normalized' => 'chapter-index'
+          }
+        ],
+        'normalized' => 'chapter-index',
+        'spaces_before_argument' => ' '
+      },
+      'parent' => {},
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 4,
+        'macro' => ''
+      }
+    },
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'Index'
+            }
+          ],
+          'extra' => {
+            'spaces_after_argument' => '
+'
+          },
+          'parent' => {},
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'chapter',
+      'contents' => [
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => 'aaa'
+                },
+                {
+                  'parent' => {},
+                  'text' => ' ',
+                  'type' => 'spaces_at_end'
+                },
+                {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'parent' => {},
+                          'text' => 'A---S'
+                        }
+                      ],
+                      'parent' => {},
+                      'type' => 'brace_command_arg'
+                    }
+                  ],
+                  'cmdname' => 'sortas',
+                  'parent' => {},
+                  'source_info' => {
+                    'file_name' => '',
+                    'line_nr' => 7,
+                    'macro' => ''
+                  }
+                }
+              ],
+              'parent' => {},
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'cindex',
+          'extra' => {
+            'index_entry' => {
+              'content_normalized' => [],
+              'entry_content' => [],
+              'entry_element' => {},
+              'entry_node' => {},
+              'entry_number' => 1,
+              'in_code' => 0,
+              'index_at_command' => 'cindex',
+              'index_ignore_chars' => {},
+              'index_name' => 'cp',
+              'index_type_command' => 'cindex',
+              'sortas' => 'A---S'
+            },
+            'sortas' => 'A---S',
+            'spaces_before_argument' => ' ',
+            'subentry' => {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'args' => [
+                        {
+                          'contents' => [
+                            {
+                              'parent' => {},
+                              'text' => 'C---S1'
+                            }
+                          ],
+                          'parent' => {},
+                          'type' => 'brace_command_arg'
+                        }
+                      ],
+                      'cmdname' => 'sortas',
+                      'parent' => {},
+                      'source_info' => {
+                        'file_name' => '',
+                        'line_nr' => 7,
+                        'macro' => ''
+                      }
+                    },
+                    {
+                      'parent' => {},
+                      'text' => 'bbb sort as c'
+                    }
+                  ],
+                  'extra' => {
+                    'spaces_after_argument' => '
+'
+                  },
+                  'parent' => {},
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'subentry',
+              'extra' => {
+                'level' => 1,
+                'sortas' => 'C---S1',
+                'spaces_before_argument' => ' '
+              },
+              'parent' => {},
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 7,
+                'macro' => ''
+              }
+            }
+          },
+          'parent' => {},
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 7,
+            'macro' => ''
+          },
+          'type' => 'index_entry_command'
+        },
+        {},
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => 'aaa'
+                }
+              ],
+              'extra' => {
+                'spaces_after_argument' => ' '
+              },
+              'parent' => {},
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'cindex',
+          'extra' => {
+            'index_entry' => {
+              'content_normalized' => [],
+              'entry_content' => [],
+              'entry_element' => {},
+              'entry_node' => {},
+              'entry_number' => 2,
+              'in_code' => 0,
+              'index_at_command' => 'cindex',
+              'index_ignore_chars' => {},
+              'index_name' => 'cp',
+              'index_type_command' => 'cindex'
+            },
+            'spaces_before_argument' => ' ',
+            'subentry' => {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'args' => [
+                        {
+                          'contents' => [
+                            {
+                              'parent' => {},
+                              'text' => 'B---S1'
+                            }
+                          ],
+                          'parent' => {},
+                          'type' => 'brace_command_arg'
+                        }
+                      ],
+                      'cmdname' => 'sortas',
+                      'parent' => {},
+                      'source_info' => {
+                        'file_name' => '',
+                        'line_nr' => 8,
+                        'macro' => ''
+                      }
+                    }
+                  ],
+                  'extra' => {
+                    'spaces_after_argument' => ' 
+'
+                  },
+                  'parent' => {},
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'subentry',
+              'extra' => {
+                'level' => 1,
+                'sortas' => 'B---S1'
+              },
+              'parent' => {},
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 8,
+                'macro' => ''
+              }
+            }
+          },
+          'parent' => {},
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 8,
+            'macro' => ''
+          },
+          'type' => 'index_entry_command'
+        },
+        {},
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => 'aaa'
+                },
+                {
+                  'parent' => {},
+                  'text' => '',
+                  'type' => 'spaces_at_end'
+                }
+              ],
+              'parent' => {},
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'cindex',
+          'extra' => {
+            'index_entry' => {
+              'content_normalized' => [],
+              'entry_content' => [],
+              'entry_element' => {},
+              'entry_node' => {},
+              'entry_number' => 3,
+              'in_code' => 0,
+              'index_at_command' => 'cindex',
+              'index_ignore_chars' => {},
+              'index_name' => 'cp',
+              'index_type_command' => 'cindex'
+            },
+            'spaces_before_argument' => ' ',
+            'subentry' => {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'parent' => {},
+                      'text' => 'bbb'
+                    }
+                  ],
+                  'extra' => {
+                    'spaces_after_argument' => ' '
+                  },
+                  'parent' => {},
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'subentry',
+              'extra' => {
+                'level' => 1,
+                'spaces_before_argument' => ' ',
+                'subentry' => {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'parent' => {},
+                          'text' => 'ccc'
+                        },
+                        {
+                          'parent' => {},
+                          'text' => '',
+                          'type' => 'spaces_at_end'
+                        },
+                        {
+                          'args' => [
+                            {
+                              'contents' => [
+                                {
+                                  'parent' => {},
+                                  'text' => 'D'
+                                }
+                              ],
+                              'parent' => {},
+                              'type' => 'brace_command_arg'
+                            }
+                          ],
+                          'cmdname' => 'sortas',
+                          'parent' => {},
+                          'source_info' => {
+                            'file_name' => '',
+                            'line_nr' => 9,
+                            'macro' => ''
+                          }
+                        }
+                      ],
+                      'extra' => {
+                        'spaces_after_argument' => '
+'
+                      },
+                      'parent' => {},
+                      'type' => 'line_arg'
+                    }
+                  ],
+                  'cmdname' => 'subentry',
+                  'extra' => {
+                    'level' => 2,
+                    'sortas' => 'D',
+                    'spaces_before_argument' => ' '
+                  },
+                  'parent' => {},
+                  'source_info' => {
+                    'file_name' => '',
+                    'line_nr' => 9,
+                    'macro' => ''
+                  }
+                }
+              },
+              'parent' => {},
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 9,
+                'macro' => ''
+              }
+            }
+          },
+          'parent' => {},
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 9,
+            'macro' => ''
+          },
+          'type' => 'index_entry_command'
+        },
+        {},
+        {},
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => 'aaa'
+                }
+              ],
+              'extra' => {
+                'spaces_after_argument' => ' '
+              },
+              'parent' => {},
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'cindex',
+          'extra' => {
+            'index_entry' => {
+              'content_normalized' => [],
+              'entry_content' => [],
+              'entry_element' => {},
+              'entry_node' => {},
+              'entry_number' => 4,
+              'in_code' => 0,
+              'index_at_command' => 'cindex',
+              'index_ignore_chars' => {},
+              'index_name' => 'cp',
+              'index_type_command' => 'cindex'
+            },
+            'spaces_before_argument' => ' ',
+            'subentry' => {
+              'args' => [
+                {
+                  'contents' => [
+                    {
+                      'parent' => {},
+                      'text' => 'bbb'
+                    },
+                    {
+                      'parent' => {},
+                      'text' => '',
+                      'type' => 'spaces_at_end'
+                    }
+                  ],
+                  'parent' => {},
+                  'type' => 'line_arg'
+                }
+              ],
+              'cmdname' => 'subentry',
+              'extra' => {
+                'level' => 1,
+                'spaces_before_argument' => ' ',
+                'subentry' => {
+                  'args' => [
+                    {
+                      'contents' => [
+                        {
+                          'parent' => {},
+                          'text' => 'ccc'
+                        }
+                      ],
+                      'extra' => {
+                        'spaces_after_argument' => '
+'
+                      },
+                      'parent' => {},
+                      'type' => 'line_arg'
+                    }
+                  ],
+                  'cmdname' => 'subentry',
+                  'extra' => {
+                    'level' => 2,
+                    'spaces_before_argument' => ' '
+                  },
+                  'parent' => {},
+                  'source_info' => {
+                    'file_name' => '',
+                    'line_nr' => 10,
+                    'macro' => ''
+                  }
+                }
+              },
+              'parent' => {},
+              'source_info' => {
+                'file_name' => '',
+                'line_nr' => 10,
+                'macro' => ''
+              }
+            }
+          },
+          'parent' => {},
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 10,
+            'macro' => ''
+          },
+          'type' => 'index_entry_command'
+        },
+        {},
+        {},
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => 'cp'
+                }
+              ],
+              'extra' => {
+                'spaces_after_argument' => '
+'
+              },
+              'parent' => {},
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'printindex',
+          'extra' => {
+            'misc_args' => [
+              'cp'
+            ],
+            'spaces_before_argument' => ' '
+          },
+          'parent' => {},
+          'source_info' => {
+            'file_name' => '',
+            'line_nr' => 12,
+            'macro' => ''
+          }
+        }
+      ],
+      'extra' => {
+        'spaces_before_argument' => ' '
+      },
+      'parent' => {},
+      'source_info' => {
+        'file_name' => '',
+        'line_nr' => 5,
+        'macro' => ''
+      }
+    }
+  ],
+  'type' => 'document_root'
+};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[0]{'parent'} = 
$result_trees{'subentry_and_sortas_spaces'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[1]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[1]{'args'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[1];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[1]{'extra'}{'node_content'}[0]
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[1]{'args'}[0]{'contents'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[1]{'parent'} = 
$result_trees{'subentry_and_sortas_spaces'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[2]{'args'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[2];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[2]{'contents'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[2];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[2]{'parent'} = 
$result_trees{'subentry_and_sortas_spaces'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[3]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[3]{'args'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[3];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[3]{'extra'}{'node_content'}[0]
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[3]{'args'}[0]{'contents'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[3]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[3]{'args'}[0]{'contents'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[3]{'parent'} = 
$result_trees{'subentry_and_sortas_spaces'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'args'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[2]{'args'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[2];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'args'}[0]{'contents'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'index_entry'}{'entry_element'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'index_entry'}{'entry_node'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[3];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'}{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'}{'args'}[0]{'contents'}[0]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'}{'args'}[0]{'contents'}[0]{'args'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'}{'args'}[0]{'contents'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'}{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'}{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'}{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'}{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'}{'args'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'}{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[2] = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[1]{'extra'}{'subentry'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'args'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'args'}[0]{'contents'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'args'}[0]{'contents'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'extra'}{'index_entry'}{'entry_element'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'extra'}{'index_entry'}{'entry_node'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[3];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'extra'}{'subentry'}{'args'}[0]{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'extra'}{'subentry'}{'args'}[0]{'contents'}[0]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'extra'}{'subentry'}{'args'}[0]{'contents'}[0]{'args'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'extra'}{'subentry'}{'args'}[0]{'contents'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'extra'}{'subentry'}{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'extra'}{'subentry'}{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'extra'}{'subentry'}{'args'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'extra'}{'subentry'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'extra'}{'subentry'}{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[4] = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[3]{'extra'}{'subentry'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'args'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'args'}[0]{'contents'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'args'}[0]{'contents'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'index_entry'}{'entry_element'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'index_entry'}{'entry_node'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[3];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'args'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'extra'}{'subentry'}{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'extra'}{'subentry'}{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'extra'}{'subentry'}{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'extra'}{'subentry'}{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'extra'}{'subentry'}{'args'}[0]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'extra'}{'subentry'}{'args'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'extra'}{'subentry'}{'args'}[0]{'contents'}[2]{'args'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'extra'}{'subentry'}{'args'}[0]{'contents'}[2];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'extra'}{'subentry'}{'args'}[0]{'contents'}[2]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'extra'}{'subentry'}{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'extra'}{'subentry'}{'args'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'extra'}{'subentry'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'extra'}{'subentry'}{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[6] = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[7] = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[5]{'extra'}{'subentry'}{'extra'}{'subentry'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'index_entry'}{'content_normalized'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'contents'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'index_entry'}{'entry_content'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'args'}[0]{'contents'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'index_entry'}{'entry_element'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'index_entry'}{'entry_node'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[3];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'args'}[0]{'contents'}[1]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'args'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'extra'}{'subentry'}{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'extra'}{'subentry'}{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'extra'}{'subentry'}{'args'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'extra'}{'subentry'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'extra'}{'subentry'}{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[9] = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[10] = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[8]{'extra'}{'subentry'}{'extra'}{'subentry'};
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[11]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[12]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[12]{'args'}[0];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[12]{'args'}[0]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[12];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'contents'}[12]{'parent'}
 = $result_trees{'subentry_and_sortas_spaces'}{'contents'}[4];
+$result_trees{'subentry_and_sortas_spaces'}{'contents'}[4]{'parent'} = 
$result_trees{'subentry_and_sortas_spaces'};
+
+$result_texis{'subentry_and_sortas_spaces'} = '@node Top
+@top
+
+@node chapter index
+@chapter Index
+
+@cindex aaa @sortas{A---S}@subentry @sortas{C---S1}bbb sort as c
+@cindex aaa @subentry@sortas{B---S1} 
+@cindex aaa@subentry bbb @subentry ccc@sortas{D}
+@cindex aaa @subentry bbb@subentry ccc
+
+@printindex cp
+';
+
+
+$result_texts{'subentry_and_sortas_spaces'} = '
+1 Index
+*******
+
+
+';
+
+$result_sectioning{'subentry_and_sortas_spaces'} = {
+  'structure' => {
+    'section_childs' => [
+      {
+        'cmdname' => 'top',
+        'extra' => {
+          'associated_node' => {
+            'cmdname' => 'node',
+            'extra' => {
+              'normalized' => 'Top'
+            },
+            'structure' => {}
+          }
+        },
+        'structure' => {
+          'section_childs' => [
+            {
+              'cmdname' => 'chapter',
+              'extra' => {
+                'associated_node' => {
+                  'cmdname' => 'node',
+                  'extra' => {
+                    'isindex' => 1,
+                    'normalized' => 'chapter-index'
+                  },
+                  'structure' => {}
+                }
+              },
+              'structure' => {
+                'section_level' => 1,
+                'section_number' => 1,
+                'section_up' => {},
+                'toplevel_prev' => {},
+                'toplevel_up' => {}
+              }
+            }
+          ],
+          'section_level' => 0,
+          'section_up' => {}
+        }
+      }
+    ],
+    'section_level' => -1
+  }
+};
+$result_sectioning{'subentry_and_sortas_spaces'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'section_up'}
 = 
$result_sectioning{'subentry_and_sortas_spaces'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'subentry_and_sortas_spaces'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'toplevel_prev'}
 = 
$result_sectioning{'subentry_and_sortas_spaces'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'subentry_and_sortas_spaces'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'toplevel_up'}
 = 
$result_sectioning{'subentry_and_sortas_spaces'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'subentry_and_sortas_spaces'}{'structure'}{'section_childs'}[0]{'structure'}{'section_up'}
 = $result_sectioning{'subentry_and_sortas_spaces'};
+
+$result_nodes{'subentry_and_sortas_spaces'} = {
+  'cmdname' => 'node',
+  'extra' => {
+    'associated_section' => {
+      'cmdname' => 'top',
+      'extra' => {},
+      'structure' => {}
+    },
+    'normalized' => 'Top'
+  },
+  'structure' => {
+    'node_next' => {
+      'cmdname' => 'node',
+      'extra' => {
+        'associated_section' => {
+          'cmdname' => 'chapter',
+          'extra' => {},
+          'structure' => {
+            'section_number' => 1
+          }
+        },
+        'isindex' => 1,
+        'normalized' => 'chapter-index'
+      },
+      'structure' => {
+        'node_prev' => {},
+        'node_up' => {}
+      }
+    }
+  }
+};
+$result_nodes{'subentry_and_sortas_spaces'}{'structure'}{'node_next'}{'structure'}{'node_prev'}
 = $result_nodes{'subentry_and_sortas_spaces'};
+$result_nodes{'subentry_and_sortas_spaces'}{'structure'}{'node_next'}{'structure'}{'node_up'}
 = $result_nodes{'subentry_and_sortas_spaces'};
+
+$result_menus{'subentry_and_sortas_spaces'} = {
+  'cmdname' => 'node',
+  'extra' => {
+    'normalized' => 'Top'
+  },
+  'structure' => {}
+};
+
+$result_errors{'subentry_and_sortas_spaces'} = [];
+
+
+$result_floats{'subentry_and_sortas_spaces'} = {};
+
+
+$result_indices_sort_strings{'subentry_and_sortas_spaces'} = {
+  'cp' => [
+    'A---S',
+    'aaa',
+    'aaa',
+    'aaa'
+  ]
+};
+
+
+
+$result_converted{'docbook'}->{'subentry_and_sortas_spaces'} = '<chapter 
label="1" id="chapter-index">
+<title>Index</title>
+
+<indexterm role="cp"><primary>aaa</primary><secondary>bbb sort as 
c</secondary></indexterm><indexterm 
role="cp"><primary>aaa</primary><secondary></secondary></indexterm><indexterm 
role="cp"><primary>aaa</primary><secondary>bbb</secondary><tertiary>ccc</tertiary></indexterm><indexterm
 
role="cp"><primary>aaa</primary><secondary>bbb</secondary><tertiary>ccc</tertiary></indexterm>
+<index role="cp"></index>
+</chapter>
+';
+
+
+$result_converted{'info'}->{'subentry_and_sortas_spaces'} = 'This is , 
produced from .
+
+
+File: ,  Node: Top,  Next: chapter index,  Up: (dir)
+
+* Menu:
+
+* chapter index::
+
+
+File: ,  Node: chapter index,  Prev: Top,  Up: Top
+
+1 Index
+*******
+
+[index]
+* Menu:
+
+* aaa, bbb sort as c:                    chapter index.         (line 6)
+* aaa, :                                 chapter index.         (line 6)
+* aaa, bbb, ccc:                         chapter index.         (line 6)
+* aaa, bbb, ccc <1>:                     chapter index.         (line 6)
+
+
+
+Tag Table:
+Node: Top27
+Node: chapter index111
+
+End Tag Table
+
+
+Local Variables:
+coding: utf-8
+End:
+';
+
+
+$result_converted{'plaintext'}->{'subentry_and_sortas_spaces'} = '1 Index
+*******
+
+* Menu:
+
+* aaa, bbb sort as c:                    chapter index.         (line 3)
+* aaa, :                                 chapter index.         (line 3)
+* aaa, bbb, ccc:                         chapter index.         (line 3)
+* aaa, bbb, ccc <1>:                     chapter index.         (line 3)
+
+';
+
+
+$result_converted{'html_text'}->{'subentry_and_sortas_spaces'} = '<div 
class="top-level-extent" id="Top">
+<div class="nav-panel">
+<p>
+ &nbsp; [<a href="#chapter-index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a class="top" id="SEC_Top"></a>
+<ul class="mini-toc">
+<li><a href="#chapter-index" accesskey="1">Index</a></li>
+</ul>
+<hr>
+<div class="chapter-level-extent" id="chapter-index">
+<div class="nav-panel">
+<p>
+ &nbsp; [<a href="#chapter-index" title="Index" rel="index">Index</a>]</p>
+</div>
+<h2 class="chapter" id="Index">1 Index</h2>
+
+<a class="index-entry-id" id="index-aaa"></a>
+<a class="index-entry-id" id="index-aaa-1"></a>
+<a class="index-entry-id" id="index-aaa-2"></a>
+<a class="index-entry-id" id="index-aaa-3"></a>
+
+<div class="printindex cp-printindex">
+<table class="cp-entries-printindex" border="0">
+<tr><td></td><th class="entries-header-printindex">Index 
Entry</th><td>&nbsp;</td><th class="sections-header-printindex"> 
Section</th></tr>
+<tr><td colspan="4"> <hr></td></tr>
+<tr><th id="t_i_cp_letter-A">A</th><td></td><td></td></tr>
+<tr><td></td><td class="printindex-index-entry"><a href="#index-aaa">aaa, bbb 
sort as c</a>:</td><td>&nbsp;</td><td class="printindex-index-section"><a 
href="#chapter-index">chapter index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><a href="#index-aaa-1">aaa, 
</a>:</td><td>&nbsp;</td><td class="printindex-index-section"><a 
href="#chapter-index">chapter index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><a href="#index-aaa-2">aaa, 
bbb, ccc</a>:</td><td>&nbsp;</td><td class="printindex-index-section"><a 
href="#chapter-index">chapter index</a></td></tr>
+<tr><td></td><td class="printindex-index-entry"><a href="#index-aaa-3">aaa, 
bbb, ccc</a>:</td><td>&nbsp;</td><td class="printindex-index-section"><a 
href="#chapter-index">chapter index</a></td></tr>
+<tr><td colspan="4"> <hr></td></tr>
+</table>
+</div>
+</div>
+</div>
+';
+
+
+$result_converted{'xml'}->{'subentry_and_sortas_spaces'} = '<node name="Top" 
spaces=" "><nodename>Top</nodename><nodenext automatic="on">chapter 
index</nodenext></node>
+<top><sectiontitle></sectiontitle>
+
+</top>
+<node name="chapter-index" spaces=" "><nodename>chapter 
index</nodename><nodeprev automatic="on">Top</nodeprev><nodeup 
automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>Index</sectiontitle>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" number="1">aaa 
<sortas>A&textmdash;S</sortas></indexterm></cindex><subentry spaces=" 
"><sortas>C&textmdash;S1</sortas>bbb sort as c</subentry>
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="2">aaa</indexterm></cindex> <subentry><sortas>B&textmdash;S1</sortas> 
</subentry>
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="3">aaa</indexterm></cindex><subentry spaces=" ">bbb 
</subentry><subentry spaces=" ">ccc<sortas>D</sortas></subentry>
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="4">aaa</indexterm></cindex> <subentry spaces=" 
">bbb</subentry><subentry spaces=" ">ccc</subentry>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+</chapter>
+';
+
+
+$result_converted{'latex'}->{'subentry_and_sortas_spaces'} = 
'\\documentclass{book}
+\\usepackage{imakeidx}
+\\usepackage{amsfonts}
+\\usepackage{amsmath}
+\\usepackage[gen]{eurosym}
+\\usepackage[T1]{fontenc}
+\\usepackage{textcomp}
+\\usepackage{graphicx}
+\\usepackage{etoolbox}
+\\usepackage{titleps}
+\\usepackage{float}
+% use hidelinks to remove boxes around links to be similar to Texinfo TeX
+\\usepackage[hidelinks]{hyperref}
+\\usepackage[utf8]{inputenc}
+
+\\makeatletter
+\\newcommand{\\GNUTexinfosettitle}{No Title}%
+
+\\makeindex[name=cp]%
+
+% redefine the \\mainmatter command such that it does not clear page
+% as if in double page
+\\renewcommand\\mainmatter{\\clearpage\\@mainmattertrue\\pagenumbering{arabic}}
+\\newenvironment{GNUTexinfopreformatted}{%
+  
\\par\\GNUTobeylines\\obeyspaces\\frenchspacing\\parskip=\\z@\\parindent=\\z@}{}
+{\\catcode`\\^^M=13 \\gdef\\GNUTobeylines{\\catcode`\\^^M=13 
\\def^^M{\\null\\par}}}
+\\newenvironment{GNUTexinfoindented}{\\begin{list}{}{}\\item\\relax}{\\end{list}}
+
+% used for substitutions in commands
+\\newcommand{\\GNUTexinfoplaceholder}[1]{}
+
+\\newpagestyle{single}{\\sethead[\\chaptername{} \\thechapter{} 
\\chaptertitle{}][][\\thepage]
+                              {\\chaptername{} \\thechapter{} 
\\chaptertitle{}}{}{\\thepage}}
+
+\\renewcommand{\\includegraphics}[1]{\\fbox{FIG \\detokenize{#1}}}
+
+\\makeatother
+% set default for @setchapternewpage
+\\makeatletter
+\\patchcmd{\\chapter}{\\if@openright\\cleardoublepage\\else\\clearpage\\fi}{\\GNUTexinfoplaceholder{setchapternewpage
 placeholder}\\clearpage}{}{}
+\\makeatother
+\\pagestyle{single}%
+
+\\begin{document}
+\\label{anchor:Top}%
+\\chapter{{Index}}
+\\label{anchor:chapter-index}%
+
+\\index[cp]{A---S@aaa!C---S1@bbb sort as c}%
+\\index[cp]{aaa!B---S1@}%
+\\index[cp]{aaa!bbb!D@ccc}%
+\\index[cp]{aaa!bbb!ccc}%
+
+\\printindex[cp]
+\\end{document}
+';
+
+1;
diff --git a/tp/t/results/indices/syncode_index_print_both.pl 
b/tp/t/results/indices/syncode_index_print_both.pl
index f827fd9369..509ae68a51 100644
--- a/tp/t/results/indices/syncode_index_print_both.pl
+++ b/tp/t/results/indices/syncode_index_print_both.pl
@@ -791,6 +791,31 @@ 
$result_converted{'html_text'}->{'syncode_index_print_both'} = '
 ';
 
 
+$result_converted{'xml'}->{'syncode_index_print_both'} = '<syncodeindex 
spaces=" " from="fn" to="cp" line="fn cp"></syncodeindex>
+
+<node name="Top" spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">chapter index</nodenext></node>
+<top spaces=" "><sectiontitle>top</sectiontitle>
+
+</top>
+<node name="chapter-index" spaces=" "><nodename>chapter 
index</nodename><nodeprev automatic="on">Top</nodeprev><nodeup 
automatic="on">Top</nodeup></node>
+<chapter spaces=" "><sectiontitle>index</sectiontitle>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="1">c&textmdash;oncept</indexterm></cindex>
+<findex index="fn" spaces=" "><indexterm index="fn" number="1" 
mergedindex="cp">f---un</indexterm></findex>
+
+
+<para>Print fn
+</para>
+<printindex spaces=" " value="fn" line="fn"></printindex>
+
+<para>Print cp
+</para>
+<printindex spaces=" " value="cp" line="cp"></printindex>
+
+</chapter>
+';
+
+
 $result_converted{'latex'}->{'syncode_index_print_both'} = 
'\\documentclass{book}
 \\usepackage{imakeidx}
 \\usepackage{amsfonts}
diff --git a/tp/t/results/indices/syncodeindex_to_plain.pl 
b/tp/t/results/indices/syncodeindex_to_plain.pl
index 87b5bd00a9..b4e6e8dbbd 100644
--- a/tp/t/results/indices/syncodeindex_to_plain.pl
+++ b/tp/t/results/indices/syncodeindex_to_plain.pl
@@ -560,4 +560,20 @@ $result_converted{'html_text'}->{'syncodeindex_to_plain'} 
= '
 </div>
 ';
 
+
+$result_converted{'xml'}->{'syncodeindex_to_plain'} = '<syncodeindex spaces=" 
" from="ky" to="cp" line="ky cp"></syncodeindex>
+
+<node name="Top" spaces=" "><nodename>Top</nodename></node>
+
+<kindex index="ky" spaces=" "><indexterm index="ky" number="1" 
mergedindex="cp">--k1</indexterm></kindex>
+<vindex index="vr" spaces=" "><indexterm index="vr" 
number="1">--v</indexterm></vindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="1">&textndash;c</indexterm></cindex>
+
+<para>cp index.
+</para><printindex spaces=" " value="cp" line="cp"></printindex>
+
+<para>vr index.
+</para><printindex spaces=" " value="vr" line="vr"></printindex>
+';
+
 1;
diff --git a/tp/t/results/indices/transparent_sort_chars.pl 
b/tp/t/results/indices/transparent_sort_chars.pl
index bea49cd541..d54437a215 100644
--- a/tp/t/results/indices/transparent_sort_chars.pl
+++ b/tp/t/results/indices/transparent_sort_chars.pl
@@ -608,6 +608,22 @@ $result_converted{'html_text'}->{'transparent_sort_chars'} 
= '
 ';
 
 
+$result_converted{'xml'}->{'transparent_sort_chars'} = '<set 
name="txiindexhyphenignore" line=" txiindexhyphenignore"></set>
+
+<node name="Top" spaces=" "><nodename>Top</nodename><nodenext 
automatic="on">node</nodenext></node>
+<top><sectiontitle></sectiontitle>
+
+<node name="node" spaces=" "><nodename>node</nodename><nodeprev 
automatic="on">Top</nodeprev></node>
+
+<cindex index="cp" spaces=" "><indexterm index="cp" 
number="1"><code>--version</code>, for 
<command>install-info</command></indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="2">Source file 
format</indexterm></cindex>
+<cindex index="cp" spaces=" "><indexterm index="cp" number="3">Semantic 
markup</indexterm></cindex>
+
+<printindex spaces=" " value="cp" line="cp"></printindex>
+</top>
+';
+
+
 $result_converted{'latex'}->{'transparent_sort_chars'} = '\\documentclass{book}
 \\usepackage{imakeidx}
 \\usepackage{amsfonts}
diff --git a/tp/t/results/indices/w_lines_count.pl 
b/tp/t/results/indices/w_lines_count.pl
index d4af1ff2f2..facdad5fe7 100644
--- a/tp/t/results/indices/w_lines_count.pl
+++ b/tp/t/results/indices/w_lines_count.pl
@@ -467,4 +467,18 @@ $result_converted{'html_text'}->{'w_lines_count'} = '<div 
class="top-level-exten
 </div>
 ';
 
+
+$result_converted{'xml'}->{'w_lines_count'} = '<node name="Top" spaces=" 
"><nodename>Top</nodename></node>
+<top><sectiontitle></sectiontitle>
+
+<para>xzcompilationxdmbufferxmsubsequentmxCtxaxxmcommandsmadvancemfrommthere.  
+<w><code>C-u</code></w> starts again from the beginning
+</para>
+<findex index="fn" spaces=" "><indexterm index="fn" 
number="1">compilation-next-error</indexterm></findex>
+<para>Compilation mode also defines the keys <key>SPC</key> and <key>DEL</key> 
to
+</para>
+<printindex spaces=" " value="fn" line="fn"></printindex>
+</top>
+';
+
 1;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]