- Timestamp:
- 2012-08-16T20:55:03+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/trunk/tutorials/xml-source/tutorial_en.xml
r26110 r26122 2775 2775 <Path>sample_files → beatles → advbeat_small</Path> 2776 2776 <Text id="0555">into your new collection. Do this by opening up <Path>advbeat_small</Path>, selecting the eight items within it (from <Path>discography</Path> to <Path>beatles_midi.zip</Path>), and dragging them across. Because some of these files are in MP3 and MARC formats you will be asked whether to include <AutoText text="MP3Plugin" /> and <AutoText text="MARCPlugin" /> in your collection. Click <AutoText key="glidict::CDM.PlugInManager.QuickAdd" type="button"/>.</Text> 2777 <MajorVersion number="2"> 2777 2778 <Text id="0555a">A window may pop up explaining that the import documents contain css files, which none of Greenstone's plugins are expected to process directly. CSS files normally belong to a web page and we don't need to process them directly. Click <AutoText key="glidict::General.OK" type="button"/> button.</Text> 2779 </MajorVersion> 2778 2780 </NumberedItem> 2779 2781 <NumberedItem> … … 2837 2839 </Bullet> 2838 2840 <Bullet> 2839 <Text id="0582">Ensure that < AutoText text="VList"/> is selected, and make the changes that are highlighted below. You need to insert five lines into the first line, and delete the second line. (Note, the changes are available in a text file, see below.)</Text>2841 <Text id="0582">Ensure that <MajorVersion number="2"><AutoText text="VList"/></MajorVersion><MajorVersion number="3">the <AutoText text="browse"/> format feature</MajorVersion> is selected, and make the changes that are highlighted below<MajorVersion number="3"> to its <AutoText text="documentNode"/> template</MajorVersion>.<MajorVersion number="2"> You need to insert five lines into the first line, and delete the second line. (Note, the changes are available in a text file, see below.)</MajorVersion> </Text> 2840 2842 <Text id="0582a">Change:</Text> 2841 2843 <Format> 2844 <MajorVersion number="2"> 2842 2845 <td valign=top><highlight>[link][icon][/link]</highlight></td><br/> 2843 2846 <highlight><td valign=top>[ex.srclink]{Or}{[ex.thumbicon],[ex.srcicon]}[ex./srclink]</td> </highlight><br/> … … 2845 2848 {Or}{[dc.Title],[exp.Title],[ex.Title],Untitled} <br/> 2846 2849 [/highlight]{If}{[ex.Source],<br><i>([ex.Source])</i>}</td> 2850 </MajorVersion> 2851 <MajorVersion number="3"> 2852 <td valign="top"><br /> 2853 <Tab n="1"/><highlight><gsf:link type="document"><br /> 2854 <Tab n="2"/><gsf:icon type="document"/><br /> 2855 <Tab n="1"/></gsf:link><br /> 2856 </td><br /> 2857 <td valign="top"><br /> 2858 <Tab n="1"/><gsf:link type="source"><br /> 2859 <Tab n="2"/><gsf:choose-metadata><br /> 2860 <Tab n="3"/><gsf:metadata name="thumbicon"/><br /> 2861 <Tab n="3"/><gsf:metadata name="srcicon"/><br /> 2862 <Tab n="2"/></gsf:choose-metadata><br /> 2863 <Tab n="1"/></gsf:link></highlight><br /> 2864 </td> 2865 </MajorVersion> 2847 2866 </Format> 2848 2867 <Text id="0583">to this:</Text> 2849 2868 <Format> 2869 <MajorVersion number="2"> 2850 2870 <td valign=top><br/> 2851 2871 <highlight>{If}{[dc.Format] eq 'Audio', </highlight><br/> … … 2859 2879 {Or}{[dc.Title],[exp.Title],[ex.Title],Untitled}<br/> 2860 2880 [/highlight]{If}{[ex.Source],<br><i>([ex.Source])</i>}</td> 2881 </MajorVersion> 2882 <MajorVersion number="3"> 2883 <td valign="top"><br /> 2884 <Tab n="1"/><highlight><gsf:switch><br /> 2885 <Tab n="2"/><gsf:metadata name="dc.Format"/><br /> 2886 <Tab n="2"/><gsf:when test='equals' test-value='Audio'><br /> 2887 <Tab n="3"/><gsf:link type="source"><gsf:metadata name="srcicon"/></gsf:link><br /> 2888 <Tab n="2"/></gsf:when><br /> 2889 <Tab n="2"/><gsf:when test='equals' test-value='Images'><br /> 2890 <Tab n="3"/><gsf:link type="source"><gsf:metadata name="thumbicon"/></gsf:link><br /> 2891 <Tab n="2"/></gsf:when><br /> 2892 <Tab n="2"/><gsf:when test='equals' test-value='Supplementary'><br /> 2893 <Tab n="3"/><gsf:link type="source"><gsf:metadata name="srcicon"/></gsf:link> <gsf:link type="document"><gsf:icon type="document"/></gsf:link><br /> 2894 <Tab n="2"/></gsf:when><br /> 2895 <Tab n="2"/><gsf:otherwise><br /> 2896 <Tab n="3"/><gsf:link type="document"><gsf:icon type="document"/></gsf:link><br /> 2897 <Tab n="2"/></gsf:otherwise><br /> 2898 <Tab n="1"/></gsf:switch></highlight><br /> 2899 </td> 2900 </MajorVersion> 2861 2901 </Format> 2862 2902 </Bullet> 2863 2903 </BulletList> 2864 2904 <Text id="0585">To make this easier for you we have prepared a plain text file that contains the new text. In WordPad open the following file:</Text> 2865 <Path>sample_files → beatles → format_tweaks → audio_tweak .txt</Path>2866 <Text id="0586">(Be sure to use WordPad rather than Notepad, because Notepad does not display the line breaks correctly.) Place it in the copy buffer by highlighting the text in WordPad and selecting <Menu>Edit → Copy</Menu>. Now move back to the Librarian Interface, highlight all the text that makes up the current <AutoText text="VList"/> format statement, and use <Menu><AutoText key="glidict::Menu.Edit"/> → <AutoText key="glidict::Menu.Edit_Paste"/></Menu> to transform the old statement to the new one.</Text>2905 <Path>sample_files → beatles → format_tweaks → audio_tweak<MajorVersion number="3">_3</MajorVersion>.txt</Path> 2906 <Text id="0586">(Be sure to use WordPad rather than Notepad, because Notepad does not display the line breaks correctly.) Place it in the copy buffer by highlighting the text in WordPad and selecting <Menu>Edit → Copy</Menu>. Now move back to the Librarian Interface, <MajorVersion number="2">highlight all the text that makes up the current <AutoText text="VList"/> format statement</MajorVersion><MajorVersion number="3">highlight the portion of the existing <AutoText text="documentNode"/> template of the <AutoText text="browse"/> format statement that needs to be replaced</MajorVersion>, and use <Menu><AutoText key="glidict::Menu.Edit"/> → <AutoText key="glidict::Menu.Edit_Paste"/></Menu> to transform the old statement to the new one.</Text> 2867 2907 <Text id="0589"><b>Preview</b> the result. You may need to click the browser's <<b>Reload</b>> button to force it to re-load the page.</Text> 2868 2908 </NumberedItem> … … 2871 2911 <BulletList> 2872 2912 <Bullet> 2913 <MajorVersion number="2"> 2873 2914 <Text id="0594">In the <AutoText text="VList"/> format feature, delete the text that is highlighted below:</Text> 2874 <Format> 2915 </MajorVersion> 2916 <MajorVersion number="3"> 2917 <Text id="0594-3">In the <AutoText text="documentNode"/> template of the <AutoText text="browse"/> format feature, delete the following text:</Text> 2918 </MajorVersion> 2919 <Format> 2920 <MajorVersion number="2"> 2875 2921 <td valign=top><br/> 2876 2922 {If}{[dc.Format] eq 'Audio',<br/> … … 2883 2929 <td valign=top>[highlight]<br/> 2884 2930 {Or}{[dc.Title],[exp.Title],[ex.Title],Untitled}<br/> 2885 [/highlight]<highlight>{If}{[ex.Source],<br><i>([ex.Source])</i>}</highlight></td></Format> 2931 [/highlight]<highlight>{If}{[ex.Source],<br><i>([ex.Source])</i>}</highlight></td> 2932 </MajorVersion> 2933 <MajorVersion number="3"> 2934 <gsf:switch><br /> 2935 <Tab n="1"/><gsf:metadata name="Source"/><br /> 2936 <Tab n="1"/><gsf:when test="exists"><br /> 2937 <Tab n="2"/><br/><br /> 2938 <Tab n="2"/><i>(<gsf:metadata name="Source"/>)</i><br /> 2939 <Tab n="1"/></gsf:when><br /> 2940 </gsf:switch> 2941 </MajorVersion> 2942 </Format> 2886 2943 </Bullet> 2887 2944 </BulletList> … … 2916 2973 </Heading> 2917 2974 <NumberedItem> 2975 <MajorVersion number="2"> 2918 2976 <Text id="0606">Make the bookshelves show how many documents they contain by inserting a line in the <AutoText text="VList"/> format statement in the <AutoText key="glidict::CDM.GUI.Formats"/> section of the <AutoText key="glidict::GUI.Format"/> panel. The added line is shown highlighted below. The complete format statement can be copied from <Path>sample_files → beatles → format_tweaks → show_num_docs.txt</Path>.</Text> 2919 2977 <Format> … … 2930 2988 {Or}{[dc.Title],[exp.Title],[ex.Title],Untitled}<br/> 2931 2989 [/highlight]</td></Format> 2990 </MajorVersion> 2991 <MajorVersion number="3"> 2992 <Text id="0606-3">Make the bookshelves show how many documents they contain by modifying the <AutoText text="VList classifierNode"/> template of the <AutoText text="browse"/> format feature in the <AutoText key="glidict::CDM.GUI.Formats"/> section of the <AutoText key="glidict::GUI.Format"/> panel. Remove the portion highlighted below:</Text> 2993 <Format> 2994 <Tab n="1"/>...<br /> 2995 <Tab n="1"/><xsl:call-template name="choose-title"/><br /> 2996 <Tab n="1"/><highlight><gsf:switch><br /> 2997 <Tab n="2"/><gsf:metadata name="Source"/><br /> 2998 <Tab n="2"/><gsf:when test="exists"><br /> 2999 <Tab n="3"/><br/><br /> 3000 <Tab n="3"/><i>(<gsf:metadata name="Source"/>)</i><br /> 3001 <Tab n="2"/></gsf:when><br /> 3002 <Tab n="1"/></gsf:switch><br /> 3003 </td></highlight> 3004 </Format> 3005 And replace it with the statements highlighted here: 3006 <Format> 3007 <Tab n="1"/>...<br /> 3008 <Tab n="1"/><xsl:call-template name="choose-title"/><br /> 3009 <highlight></td><br /> 3010 <td><br /> 3011 <Tab n="1"/>(<gsf:metadata name="numleafdocs"/>)<br /> 3012 </td></highlight> 3013 </Format> 3014 <Text id="0606-3a">The complete format statement for the <AutoText text="VList classifierNode"/> template of the <AutoText text="browse"/> format feature can be copied from <Path>sample_files → beatles → format_tweaks → show_num_docs_3.txt</Path>.</Text> 3015 </MajorVersion> 2932 3016 <Text id="0609"><b>Preview</b> the result (you don't need to build the collection.) Bookshelves in the titles and browse classifiers should show how many documents they contain.</Text> 2933 3017 </NumberedItem> … … 2994 3078 </Bullet> 2995 3079 </BulletList> 2996 <Text id="0638"><b>Build</b> the collection and <b>preview</b> the result. Observe how many more times similar titles have been amalgamated under the same bookshelf. Test your understanding of regular expressions by trying to rationalize the amalgamations. (Note: <AutoText text="[[:punct:]]" type="italics"/> stands for any punctuation character.) The icons beside the Word and PDF documents are not the correct ones, but that will be fixed in the next format statement.</Text>3080 <Text id="0638"><b>Build</b> the collection and <b>preview</b> the result. Observe how many more times similar titles have been amalgamated under the same bookshelf. Test your understanding of regular expressions by trying to rationalize the amalgamations. (Note: <AutoText text="[[:punct:]]" type="italics"/> stands for any punctuation character.)<MajorVersion number="2"> The icons beside the Word and PDF documents are not the correct ones, but that will be fixed in the next format statement.</MajorVersion></Text> 2997 3081 </NumberedItem> 2998 3082 <Comment> … … 3000 3084 </Comment> 3001 3085 <Heading> 3002 <Text id="0643">Using non-standard macro files</Text> 3086 <MajorVersion number="2"><Text id="0643">Using non-standard macro files</Text></MajorVersion> 3087 <MajorVersion number="3"><Text id="0647">Using different icons for different media types</Text></MajorVersion> 3003 3088 </Heading> 3004 3089 <Comment> … … 3018 3103 </NumberedItem> 3019 3104 <NumberedItem> 3105 <MajorVersion number="2"> 3020 3106 <Text id="0646">Using the file browser, copy the <Path>images</Path> and <Path>macros</Path> folders from the <Path>advbeat_large</Path> folder into the <Path>smallbea</Path> folder. (It's OK to overwrite the existing <Path>images</Path> folder: the image in it is included in the folder being copied.) The <Path>images</Path> folder includes some useful icons, and the <Path>macros</Path> folder defines some macro names that use these images.</Text> 3107 </MajorVersion> 3108 <MajorVersion number="3"> 3109 <Text id="0646-3">Using the file browser, copy the <Path>images</Path> folder from the <Path>advbeat_large</Path> folder into the <Path>smallbea</Path> folder. (It's OK to overwrite the existing <Path>images</Path> folder: the image in it is included in the folder being copied.) The <Path>images</Path> folder includes some useful icons.</Text> 3110 </MajorVersion> 3111 <MajorVersion number="2"> 3021 3112 <Text id="0646a">To see the macro definitions, open the collection in the Librarian Interface (<Menu><AutoText key="glidict::Menu.File"/> → <AutoText key="glidict::Menu.File_Open"/></Menu>) and view the <AutoText key="glidict::CDM.GUI.Macros"/> section in the <AutoText key="glidict::GUI.Format"/> panel.</Text> 3022 </NumberedItem> 3113 </MajorVersion> 3114 </NumberedItem> 3115 <MajorVersion number="2"> 3023 3116 <Heading> 3024 3117 <Text id="0647">Using different icons for different media types</Text> 3025 3118 </Heading> 3026 <NumberedItem> 3027 <Text id="0648">Re-edit your <AutoText text="VList" /> format statement to be the following (in <AutoText key="glidict::CDM.GUI.Formats"/> on the <AutoText key="glidict::GUI.Format"/> panel). You can copy this text from the file <Path>sample_files → beatles → format_tweaks → multi_icons.txt</Path>.</Text> 3028 <Format><highlight><td valign=top></highlight><br/> 3119 </MajorVersion> 3120 <NumberedItem> 3121 <Text id="0648">Re-edit <MajorVersion number="2"><AutoText text="VList" /> your format statement</MajorVersion><MajorVersion number="3">the previously edited portion of the <AutoText text="documentNode"/> format statement of the <AutoText text="browse"/> format feature</MajorVersion> (in <AutoText key="glidict::CDM.GUI.Formats"/> on the <AutoText key="glidict::GUI.Format"/> panel) to be the following. You can copy this text from the file <Path>sample_files → beatles → format_tweaks → multi_icons<MajorVersion number="3">_3</MajorVersion>.txt</Path>.</Text> 3122 <Format> 3123 <MajorVersion number="2"> 3124 <highlight><td valign=top></highlight><br/> 3029 3125 <highlight>{If}{[numleafdocs],[link][icon][/link]}</highlight><br/> 3030 3126 <highlight>{If}{[dc.Format] eq 'Lyrics',[link]_iconlyrics_[/link]}</highlight><br/> … … 3043 3139 {Or}{[dc.Title],[Title],Untitled}<br/> 3044 3140 [/highlight]<br/> 3045 </td></Format> 3046 </NumberedItem> 3047 <NumberedItem> 3048 <Text id="0651"><b>Preview</b> your collection as before. Now different icons are used for discography, lyrics, tablature, and MARC metadata. Even MP3 and MIDI audio file types are distinguished. If you let the mouse hover over one of these images a "tool tip" appears explaining what file type the icon represents in the current interface language (note: <Path>extra.dm</Path> only defines English and French).</Text> 3141 </td> 3142 </MajorVersion> 3143 <MajorVersion number="3"> 3144 <td valign="top"><br /> 3145 <Tab n="1"/><gsf:switch><br /> 3146 <Tab n="2"/><gsf:metadata name="dc.Format"/><br /> 3147 <Tab n="2"/><gsf:when test="equals" test-value="Lyrics"><br /> 3148 <Tab n="3"/><gsf:link type="document"><br /> 3149 <Tab n="4"/><gsf:icon file="lyrics.gif"/><br /> 3150 <Tab n="3"/></gsf:link><br /> 3151 <Tab n="2"/></gsf:when><br /> 3152 <Tab n="2"/><gsf:when test="equals" test-value="Discography"><br /> 3153 <Tab n="3"/><gsf:link type="document"><br /> 3154 <Tab n="4"/><gsf:icon file="disc.gif"/><br /> 3155 <Tab n="3"/></gsf:link><br /> 3156 <Tab n="2"/></gsf:when><br /> 3157 <Tab n="2"/><gsf:when test="equals" test-value="Tablature"><br /> 3158 <Tab n="3"/><gsf:link type="document"><br /> 3159 <Tab n="4"/><gsf:icon file="tab.gif"/><br /> 3160 <Tab n="3"/></gsf:link><br /> 3161 <Tab n="2"/></gsf:when><br /> 3162 <Tab n="2"/><gsf:when test="equals" test-value="MARC"><br /> 3163 <Tab n="3"/><gsf:link type="document"><br /> 3164 <Tab n="4"/><gsf:icon file="marc.gif"/><br /> 3165 <Tab n="3"/></gsf:link><br /> 3166 <Tab n="2"/></gsf:when><br /> 3167 <Tab n="2"/><gsf:when test="equals" test-value="Images"><br /> 3168 <Tab n="3"/><gsf:link type="source"><br /> 3169 <Tab n="4"/><gsf:metadata name="thumbicon"/><br /> 3170 <Tab n="3"/></gsf:link><br /> 3171 <Tab n="2"/></gsf:when><br /> 3172 <Tab n="2"/><gsf:when test="equals" test-value="Supplementary"><br /> 3173 <Tab n="3"/><gsf:link type="source"><br /> 3174 <Tab n="4"/><gsf:metadata name="srcicon"/><br /> 3175 <Tab n="3"/></gsf:link><br /> 3176 <Tab n="2"/></gsf:when><br /> 3177 <Tab n="2"/><gsf:when test="equals" test-value="Audio"><br /> 3178 <Tab n="3"/><gsf:link type="source"><br /> 3179 <Tab n="4"/><gsf:switch><br /> 3180 <Tab n="5"/><gsf:metadata name="FileFormat"/><br /> 3181 <Tab n="5"/><gsf:when test="equals" test-value="MIDI"><br /> 3182 <Tab n="6"/><gsf:icon file="midi.gif"/><br /> 3183 <Tab n="5"/></gsf:when><br /> 3184 <Tab n="5"/><gsf:otherwise><br /> 3185 <Tab n="6"/><gsf:metadata name="srcicon"/><br /> 3186 <Tab n="5"/></gsf:otherwise><br /> 3187 <Tab n="4"/></gsf:switch><br /> 3188 <Tab n="3"/></gsf:link><br /> 3189 <Tab n="2"/></gsf:when><br /> 3190 <Tab n="1"/></gsf:switch><br /> 3191 </td> 3192 </MajorVersion> 3193 </Format> 3194 </NumberedItem> 3195 <NumberedItem> 3196 <Text id="0651"><b>Preview</b> your collection as before. Now different icons are used for discography, lyrics, tablature, and MARC metadata. Even MP3 and MIDI audio file types are distinguished.<MajorVersion number="2"> If you let the mouse hover over one of these images a "tool tip" appears explaining what file type the icon represents in the current interface language (note: <Path>extra.dm</Path> only defines English and French).</MajorVersion></Text> 3049 3197 </NumberedItem> 3050 3198 <Heading>
Note:
See TracChangeset
for help on using the changeset viewer.