Index: /documentation/trunk/tutorials/xml-source/tutorial_en.xml
===================================================================
--- /documentation/trunk/tutorials/xml-source/tutorial_en.xml	(revision 26109)
+++ /documentation/trunk/tutorials/xml-source/tutorial_en.xml	(revision 26110)
@@ -1744,5 +1744,5 @@
 </NumberedItem>
 <NumberedItem>
-<Text id="0452">The search page includes a pulldown menu that allows you to select one of these partitions for searching. For example, try searching the <i>relatives</i> partition for <i>mary</i> and then search the <i>monarchs</i> partition for the same thing.</Text>
+<Text id="0452">The <MajorVersion number="2">search</MajorVersion><MajorVersion number="3"><AutoText text="form search"/></MajorVersion> page includes a pulldown menu that allows you to select one of these partitions for searching. For example, try searching the <i>relatives</i> partition for <i>mary</i> and then search the <i>monarchs</i> partition for the same thing.</Text>
 </NumberedItem>
 <NumberedItem>
@@ -1783,5 +1783,6 @@
 <Content>
 <NumberedItem>
-<Text id="0468">Open up your <b>tudor</b> collection, go to the <AutoText key="glidict::GUI.Format"/> panel (by clicking on its tab) and select <AutoText key="glidict::CDM.GUI.Formats"/> from the left-hand list. Leave the editing controls at their default value, so that <AutoText key="glidict::CDM.FormatManager.Feature"/> displays <AutoText key="glidict::CDM.FormatManager.AllFeatures" type="italics"/> and <AutoText text="VList"/> is selected as the <AutoText key="glidict::CDM.FormatManager.Part"/>. The text in the <AutoText key="glidict::CDM.FormatManager.Editor"/> box reads as follows:</Text>
+<Text id="0468">Open up your <b>tudor</b> collection, go to the <AutoText key="glidict::GUI.Format"/> panel (by clicking on its tab) and select <AutoText key="glidict::CDM.GUI.Formats"/> from the left-hand list. <MajorVersion number="2">Leave the editing controls at their default value, so that <AutoText key="glidict::CDM.FormatManager.Feature"/> displays <AutoText key="glidict::CDM.FormatManager.AllFeatures" type="italics"/> and <AutoText text="VList"/> is selected as the <AutoText key="glidict::CDM.FormatManager.Part"/>. The text in the <AutoText key="glidict::CDM.FormatManager.Editor"/> box reads as follows:</MajorVersion><MajorVersion number="3">Select the <AutoText text="browse"/> format feature and inspect its long format statement.</MajorVersion></Text>
+<MajorVersion number="2">
 <Format>
 &lt;td valign=top&gt;[link][icon][/link]&lt;/td&gt;<br/>
@@ -1790,5 +1791,6 @@
 {Or}{[dc.Title],[exp.Title],[ex.Title],Untitled}<br/>
 [/highlight]{If}{[ex.Source],&lt;br&gt;&lt;i&gt;([ex.Source])&lt;/i&gt;}&lt;/td&gt;
-</Format> 
+</Format>
+</MajorVersion>
 <Text id="0469">This displays something that looks like this: </Text>
 <Indent>
@@ -1796,5 +1798,5 @@
 </Indent>
 <Text id="0472">for a particular document whose <i>Title</i> metadata is <AutoText text="A discussion of question five from Tudor Quiz: Henry VIII"/> and whose <i>Source</i> metadata is <AutoText text="quizstuff.html"/>.</Text>
-<Text id="0473">This format appears in the search results list, in the <AutoText key="coredm::_Global:labelTitle_"/> list, and also when you get down to individual documents in the <AutoText key="coredm::_Global:labelSubject_"/> hierarchy. This is Greenstone's default format statement.</Text>
+<Text id="0473">This format appears in the search results list, in the <AutoText key="coredm::_Global:labelTitle_"/> list, and also when you get down to individual documents in the <AutoText key="coredm::_Global:labelSubject_"/> hierarchy. This is Greenstone's default format statement<MajorVersion number="3"> used in the <AutoText text="browse"/> and <AutoText text="search"/> format features.</MajorVersion>.</Text>
 </NumberedItem>
 <Comment>
@@ -1802,34 +1804,114 @@
 </Comment>
 <NumberedItem>
-<Text id="0475">Delete the contents of the <AutoText key="glidict::CDM.FormatManager.Editor"/> box and replace it with this simpler version:</Text>
-<Format>
+<MajorVersion number="2"><Text id="0475">Delete the contents of the <AutoText key="glidict::CDM.FormatManager.Editor"/> box and replace it with this simpler version:</Text></MajorVersion>
+<MajorVersion number="3"><Text id="0475-3">Replace the <AutoText text="documentNode"/> template of the <AutoText text="browse"/> format feature with:</Text></MajorVersion>
+<Format>
+<MajorVersion number="2">
 &lt;td&gt;[link][icon][/link]&lt;/td&gt; <br/>
 &lt;td&gt;[ex.Title]&lt;br&gt;<br/>
 &nbsp;&nbsp;&nbsp;&nbsp;&lt;i&gt;([ex.Source])&lt;/i&gt;<br/>
 &lt;/td&gt;
-</Format>
-<Text id="0476"><b>Preview</b> the result (you don't need to build the collection, because changes to format statements take effect immediately). Look at some search results and at the <AutoText key="coredm::_Global:labelTitle_"/> list. They are just the same as before! Under most circumstances this far simpler format statement is entirely equivalent to Greenstone's more complex default. </Text>
+</MajorVersion>
+<MajorVersion number="3">
+  &lt;gsf:template match=&quot;documentNode&quot;&gt;<br/>
+    <Tab n="1"/>&lt;td valign=&quot;top&quot;&gt;<br/>
+      <Tab n="2"/>&lt;gsf:link type=&quot;document&quot;&gt;<br/>
+        <Tab n="3"/>&lt;gsf:icon type=&quot;document&quot;/&gt;<br/>
+      <Tab n="2"/>&lt;/gsf:link&gt;<br/>
+    <Tab n="1"/>&lt;/td&gt;<br/>
+    <Tab n="1"/>&lt;td valign=&quot;top&quot;&gt;<br/>
+      <Tab n="2"/>&lt;gsf:metadata name=&quot;Title&quot;/&gt;<br/>
+      <Tab n="2"/>&lt;br/&gt;<br/>
+      <Tab n="2"/>&lt;i&gt;(&lt;gsf:metadata name=&quot;Source&quot;/&gt;)&lt;/i&gt;<br/>
+    <Tab n="1"/>&lt;/td&gt;<br/>
+  &lt;/gsf:template&gt;
+</MajorVersion>
+</Format>
+<MajorVersion number="3">
+<Text id="0475-3a">Replace the <AutoText text="search"/> format feature with the above format statement too.</Text>
+</MajorVersion>
+<Text id="0476"><b>Preview</b> the result (you don't need to build the collection, because changes to format statements take effect immediately). Look at some search results and at the <AutoText key="coredm::_Global:labelTitle_"/> list. They are just the same as before! Under most circumstances this far simpler format statement is entirely equivalent to Greenstone's more complex default.</Text>
+<MajorVersion number="3">
+<Text id="0476-3">We can also reduce the <AutoText text="VList classifierNode"/> template of the <AutoText text="browse"/> format feature further, also without changing the display. Replace it with:</Text>
+<Format>
+  &lt;gsf:template match=&quot;classifierNode[@classifierStyle = 'VList']&quot;&gt;<br/>
+    <Tab n="1"/>&lt;td valign=&quot;top&quot;&gt;<br/>
+      <Tab n="2"/>&lt;gsf:link type=&quot;classifier&quot;&gt;<br/>
+        <Tab n="3"/>&lt;gsf:icon type=&quot;classifier&quot;/&gt;<br/>
+      <Tab n="2"/>&lt;/gsf:link&gt;<br/>
+    <Tab n="1"/>&lt;/td&gt;<br/>
+    <Tab n="1"/>&lt;td valign=&quot;top&quot;&gt;<br/>
+      <Tab n="2"/>&lt;gsf:metadata name=&quot;Title&quot;/&gt;<br/>
+      <Tab n="2"/>&lt;br/&gt;<br/>
+      <Tab n="2"/>&lt;i&gt;(&lt;gsf:metadata name=&quot;Source&quot;/&gt;)&lt;/i&gt;<br/>
+    <Tab n="1"/>&lt;/td&gt;<br/>
+  &lt;/gsf:template&gt;
+</Format>
+</MajorVersion>
+<MajorVersion number="2">
 <Comment>
 <Text id="0478">But there's a problem. Beside the bookshelves in the <AutoText key="coredm::_Global:labelSubject_"/> browser, beneath the subject appears a mysterious "()". What is printed for these bookshelves is governed by the same format statement, and though bookshelf nodes of the hierarchy have associated <i>Title</i> metadata&mdash;their title is the name of the metadata value associated with that bookshelf&mdash;they do not have <AutoText key="metadata::ex.Source"/> metadata, so it comes out blank.</Text>
 </Comment>
-</NumberedItem>
-<NumberedItem>
+</MajorVersion>
+</NumberedItem>
+<NumberedItem>
+<MajorVersion number="2">
 <Text id="0482">In the <AutoText key="glidict::CDM.GUI.Formats"/> section of the <AutoText key="glidict::GUI.Format"/> panel, the <AutoText key="glidict::CDM.FormatManager.Feature"/> menu (just above <AutoText key="glidict::CDM.FormatManager.Part"/> menu) displays <AutoText key="glidict::CDM.FormatManager.AllFeatures" type="italics"/>. That implies that the same format is used for the search results, titles, and all nodes in the subject hierarchy&mdash;including internal nodes (that is, bookshelves). The <AutoText key="glidict::CDM.FormatManager.Feature"/> menu can be used to restrict a format statement to a specific one of these lists. We will override this format statement for the hierarchical <i>subject</i> classifier. In the <AutoText key="glidict::CDM.FormatManager.Feature"/> menu, scroll down to the item that says</Text>
+</MajorVersion>
+<MajorVersion number="3">
+<Text id="0482-3">Since we edited the <AutoText text="browse"/> format feature, the same format statements are used for the titles, and all nodes in the subject hierarchy&mdash;including internal nodes (that is, bookshelves). The <AutoText key="glidict::CDM.FormatManager.Feature"/> menu can be used to restrict a format statement to a specific classifier and its nodes. We will override this format statement for the hierarchical <i>subject</i> classifier. In the <AutoText key="glidict::CDM.FormatManager.Feature"/> menu, scroll down to the item that says</Text>
+</MajorVersion>
 <Indent>
-CL2: Hierarchy -metadata <AutoText key="metadata::dc.Subject" type="plain"/>
+CL2<MajorVersion number="2">:</MajorVersion> Hierarchy -metadata <AutoText key="metadata::dc.Subject" type="plain"/>
 </Indent> 
 <Text id="0483">and select it. This is the format statement that affects the second classifier (i.e., "CL2"), which is a <AutoText text="Hierarchy"/> classifier based on <AutoText key="metadata::dc.Subject"/> metadata.</Text>
 <Text id="0483a">Click <AutoText key="glidict::CDM.FormatManager.Add" type="button"/> to add this format statement to the collection.</Text>
+<MajorVersion number="2">
 <Text id="0484">Edit the <AutoText key="glidict::CDM.FormatManager.Editor"/> box below to read</Text>
-<Format>
+</MajorVersion>
+<MajorVersion number="3">
+<Text id="0484-3">Edit the <AutoText key="glidict::CDM.FormatManager.Editor"/> box below to contain the following format statements for the <AutoText text="documentNode"/> and <AutoText text="VList classifierNode"/> templates. (The changes to the <AutoText text="documentNode"/> template are mostly the same as before, but without reference to the Source document. This time, the <AutoText text="VList classifierNode"/> template is simplified further still.)</Text>
+</MajorVersion>
+<Format>
+<MajorVersion number="2">
 &lt;td&gt;[link][icon][/link]&lt;/td&gt;<br/>
 &lt;td&gt;[ex.Title]&lt;/td&gt;
+</MajorVersion>
+<MajorVersion number="3">
+&lt;gsf:template match=&quot;documentNode&quot;&gt;<br/>
+    <Tab n="1"/>&lt;td valign=&quot;top&quot;&gt;<br/>
+      <Tab n="2"/>&lt;gsf:link type=&quot;document&quot;&gt;<br/>
+        <Tab n="3"/>&lt;gsf:icon type=&quot;document&quot;/&gt;<br/>
+      <Tab n="2"/>&lt;/gsf:link&gt;<br/>
+    <Tab n="1"/>&lt;/td&gt;<br/>
+    <Tab n="1"/>&lt;td valign=&quot;top&quot;&gt;<br/>
+      <Tab n="2"/>&lt;gsf:metadata name=&quot;Title&quot;/&gt;<br/>
+    <Tab n="1"/>&lt;/td&gt;<br/>
+  &lt;/gsf:template&gt;<br/>
+<br/>
+  &lt;gsf:template match=&quot;classifierNode[@classifierStyle = 'VList']&quot;&gt;<br/>
+    <Tab n="1"/>&lt;td valign=&quot;top&quot;&gt;<br/>
+      <Tab n="2"/>&lt;gsf:link type=&quot;classifier&quot;&gt;<br/>
+        <Tab n="3"/>&lt;gsf:icon type=&quot;classifier&quot;/&gt;<br/>
+      <Tab n="2"/>&lt;/gsf:link&gt;<br/>
+    <Tab n="1"/>&lt;/td&gt;<br/>
+    <Tab n="1"/>&lt;td valign=&quot;top&quot;&gt;<br/>
+      <Tab n="2"/>&lt;gsf:metadata name=&quot;Title&quot;/&gt;<br/>
+    <Tab n="1"/>&lt;/td&gt;<br/>
+  &lt;/gsf:template&gt;
+</MajorVersion>
 </Format> 
 </NumberedItem>
 <NumberedItem>
-<Text id="0486"><b>Preview</b> the <AutoText key="coredm::_Global:labelSubject_"/> list in the collection. First, the offending "()" has disappeared from the bookshelves. Second, when you get down to a list of documents in the subject hierarchy, the filename does not appear beside the title, because <AutoText key="metadata::ex.Source"/> is not specified in the format statement and this format statement applies to all nodes in the <i>subject</i> classifier. Note that the search results and titles lists have not changed: they still display the filename underneath the title.</Text>
-</NumberedItem>
-<NumberedItem>
+<Text id="0486"><b>Preview</b> the <AutoText key="coredm::_Global:labelSubject_"/> list in the collection. <MajorVersion number="2">First, the offending "()" has disappeared from the bookshelves. Second, when</MajorVersion><MajorVersion number="3">When</MajorVersion> you get down to a list of documents in the subject hierarchy, the filename does not appear beside the title, because <AutoText key="metadata::ex.Source"/> is not specified in the format statement and this format statement applies to all nodes in the <i>subject</i> classifier. Note that the search results and titles lists have not changed: they still display the filename underneath the title.</Text>
+</NumberedItem>
+<NumberedItem>
+<MajorVersion number="2">
 <Text id="0487">Let's change the search results format so that <AutoText key="metadata::dc.Subject"/> metadata is displayed here instead of the filename. In the <AutoText key="glidict::CDM.FormatManager.Feature"/> menu (under <AutoText key="glidict::CDM.GUI.Formats"/> on the <AutoText key="glidict::GUI.Format"/> panel), scroll down to the item <AutoText text="Search"/> and select it. Click <AutoText key="glidict::CDM.FormatManager.Add" type="button"/> to add this format statement to the collection. Change the <AutoText key="glidict::CDM.FormatManager.Editor"/> box below to read</Text>
+</MajorVersion>
+<MajorVersion number="3">
+<Text id="0487-3">Select the <AutoText text="search"/> format feature once more for some further editing. Replace the line:</Text>
+</MajorVersion>
+<MajorVersion number="2">
 <Format>
 &lt;td&gt;[link][icon][/link]&lt;/td&gt;<br/>
@@ -1838,8 +1920,20 @@
 &lt;/td&gt;<br/>
 </Format> 
-</NumberedItem>
+</MajorVersion>
+<MajorVersion number="3">
+<Format>
+  &lt;i&gt;(&lt;gsf:metadata name=&quot;Source&quot;/&gt;)&lt;/i&gt;<br/>
+</Format>
+<Text id="ep-16">with</Text>
+<Format>
+  &lt;gsf:metadata name=&quot;dc.Subject&quot;/&gt;<br/>
+</Format> 
+</MajorVersion>
+</NumberedItem>
+<MajorVersion number="2">
 <NumberedItem>
 <Text id="0489">To insert the <AutoText text="[dc.Subject]"/>, position the cursor at the appropriate point and either type it in, or select it from the <AutoText key="glidict::CDM.FormatManager.Insert_Variable"/> drop down menu. This menu shows many of the things that you can put in square brackets in the format statement.</Text>
 </NumberedItem>
+</MajorVersion>
 <NumberedItem>
 <Text id="0490"><b>Preview</b> the collection. Documents in the search results list will be displayed like this:</Text>
@@ -1849,8 +1943,9 @@
 </NumberedItem>
 <NumberedItem>
-<Text id="0494">Finally, let's return to the <AutoText key="coredm::_Global:labelSubject_" type="italics"/> hierarchy and learn how to do different things to the bookshelves and to the documents themselves. In the <AutoText key="glidict::CDM.FormatManager.Feature"/> menu, re-select the item</Text>
+<Text id="0494">Finally, let's return to the <AutoText key="coredm::_Global:labelSubject_" type="italics"/> hierarchy and learn how to do different things to the bookshelves and to the documents themselves. <MajorVersion number="2">In the <AutoText key="glidict::CDM.FormatManager.Feature"/> menu, re-select the item</MajorVersion><MajorVersion number="3">Reselect the format feature for</MajorVersion></Text>
 <Indent>
-CL2: Hierarchy -metadata <AutoText key="metadata::dc.Subject" type="plain"/>
-</Indent> 
+CL2<MajorVersion number="2">:</MajorVersion> Hierarchy -metadata <AutoText key="metadata::dc.Subject" type="plain"/>
+</Indent>
+<MajorVersion number="2">
 <Text id="0495">Edit the <AutoText key="glidict::CDM.FormatManager.Editor"/> box below to read</Text>
 <Format>
@@ -1864,7 +1959,22 @@
 <Text id="0497">The <AutoText text="If"/> statement tests the value of the variable <AutoText text="numleafdocs"/>. This variable is only set for internal nodes of the hierarchy, i.e. bookshelves, and gives the number of documents below that node. If it is set we take the first branch, otherwise we take the second. Commas are used to separate the branches. The curly brackets serve to indicate that the <AutoText text="If"/> is special&mdash;otherwise the word <AutoText text="If" type="quoted"/> itself would be output.</Text>
 </Comment>
-</NumberedItem>
-<NumberedItem>
-<Text id="0498"><b>Preview</b> the collection and examine the subject hierarchy again to see the effect of your changes. Bookshelves should say <AutoText text="Bookshelf title:"/> and then the title, while documents will display <AutoText text="Title:"/> and the title. Note that the number of documents in the bookshelf is not displayed: we are using <Format>[numleafdocs]</Format> to test what kind of item in the list we are at, but we are not displaying it.</Text>
+</MajorVersion>
+<MajorVersion number="3">
+<Text id="0495-3">For the <AutoText text="documentNode"/> template, adjust its display of the title to:</Text>
+<Format>
+  &lt;td valign=&quot;top&quot;&gt;<br/>
+    <Tab n="1"/>&lt;b&gt;Title:&lt;/b&gt; &lt;gsf:metadata name=&quot;Title&quot;/&gt;<br/>
+  &lt;/td&gt;
+</Format>
+<Text id="0496-3">Next adjust the title display of the <AutoText text="VList classifierNode"/> template too:</Text>
+<Format>
+  &lt;td valign=&quot;top&quot;&gt;<br/>
+    <Tab n="1"/>&lt;b&gt;Bookshelf title:&lt;/b&gt; &lt;gsf:metadata name=&quot;Title&quot;/&gt;<br/>
+  &lt;/td&gt;
+</Format>
+</MajorVersion>
+</NumberedItem>
+<NumberedItem>
+<Text id="0498"><b>Preview</b> the collection and examine the subject hierarchy again to see the effect of your changes. Bookshelves should say <AutoText text="Bookshelf title:"/> and then the title, while documents will display <AutoText text="Title:"/> and the title.<MajorVersion number="2"> Note that the number of documents in the bookshelf is not displayed: we are using <Format>[numleafdocs]</Format> to test what kind of item in the list we are at, but we are not displaying it.</MajorVersion></Text>
 </NumberedItem>
 </Content>
