Changeset 25794 for documentation/trunk


Ignore:
Timestamp:
2012-06-14T21:10:36+12:00 (12 years ago)
Author:
ak19
Message:

Updated for GS3 - 2nd part of the tutorial on Formatting the Word and the PDF collection, where the numleafdocs metadata was used for display.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentation/trunk/tutorials/xml-source/tutorial_en.xml

    r25792 r25794  
    949949</Heading>
    950950<NumberedItem>
    951 <Text id="fw-14">Next, we'll customize the format for the <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list. Classifier bookshelves have only a few pieces of metadata to display: <Format>[ex.Title]</Format> and <Format>[numleafdocs]</Format>. Whatever metadata the classifier has been built on, the bookshelf label is always stored as <Format>[ex.Title]</Format>. This is why a Creator is printed out for each bookshelf even though <Format>[dc.Creator]</Format> is not specified in the format statement. <Format>[numleafdocs]</Format> is only defined for bookshelves, so this metadata can be used in an <Format>{If}</Format> statement to make bookshelves and documents display differently in the list.</Text>
     951<Text id="fw-14">Next, we'll customize the format for the <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list. Classifier bookshelves have only a few pieces of metadata to display: <Format>[ex.Title]</Format> and <Format>[numleafdocs]</Format>. Whatever metadata the classifier has been built on, the bookshelf label is always stored as <Format>[ex.Title]</Format>. This is why a Creator is printed out for each bookshelf even though <Format>[dc.Creator]</Format> is not specified in the format statement.
     952<MajorVersion number="2">
     953 <Format>[numleafdocs]</Format> is only defined for bookshelves, so this metadata can be used in an <Format>{If}</Format> statement to make bookshelves and documents display differently in the list.
     954</MajorVersion>
     955</Text>
     956<MajorVersion number="2">
    952957<Text id="fw-15">Make each bookshelf in the Creator classifier show how many entries it contains. In the <AutoText key="glidict::CDM.GUI.Formats"/> section of the <AutoText key="glidict::GUI.Format"/> panel, select the <AutoText text="CL2 AZCompactList"/> classifier (which is based on <AutoText key="metadata::dc.Creator"/> metadata) from the <AutoText key="glidict::CDM.FormatManager.Feature"/> drop down list, and <AutoText text="VList"/> from the <AutoText key="glidict::CDM.FormatManager.Part"/> list. Click the <AutoText key="glidict::CDM.FormatManager.Add" type="button"/> button to add this format into the list of assigned formats. Note that it gets added as <AutoText text="CL2VList"/> in this list: it is the <AutoText text="VList"/> format for the second (<AutoText text="CL2"/>) classifier.</Text>
    953958<Text id="fw15a">Append the following text to the bottom of the format statement:</Text>
     
    955960{If}{[numleafdocs],&lt;td&gt;&lt;i&gt;([numleafdocs])&lt;/i&gt;&lt;/td&gt;}
    956961</Format>
     962</MajorVersion>
     963<MajorVersion number="3">
     964<Text id="fw-15-3">Make each bookshelf in the Creator classifier show how many entries it contains. In the <AutoText key="glidict::CDM.GUI.Formats"/> section of the <AutoText key="glidict::GUI.Format"/> panel, select the <AutoText key="coredm::_Global:labelBrowse_"/> format statement. This consists of three parts: the first gsf:template is the format statement defining the display of a <b>documentNode</b>, the second one is the format statement that controls the appearance of <b>VList classifierNodes</b> (which appear as bookshelves here), while the final gsf:template block is the format statement defining the display of <b>HList classifierNodes</b>.</Text>
     965<Text id="fw-15a-3">Scroll down to the end of the second format statement, which is the one for the VList classifiers and appears just before the start of the format statement for HList classifiers. Then insert the line highlighted below, which will display the number of leaf documents inside a classifier bookshelf:</Text>
     966<Format>
     967  &lt;gsf:template match=&quot;classifierNode[@classifierStyle = 'VList']&quot;&gt;<br />
     968    <Tab n="1"/>...<br />
     969    <Tab n="1"/><highlight>&lt;td&gt;(&lt;gsf:metadata name=&quot;numleafdocs&quot;/&gt;)&lt;/td&gt;</highlight><br />
     970  &lt;/gsf:template&gt;<br />
     971  &lt;gsf:template match=&quot;classifierNode[@classifierStyle = 'HList']&quot;&gt;<br />
     972    <Tab n="1"/>&lt;gsf:link type=&quot;classifier&quot;&gt;<br />
     973     <Tab n="2"/> &lt;gsf:metadata name=&quot;Title&quot;/&gt;<br />
     974    <Tab n="1"/>&lt;/gsf:link&gt;<br />
     975  &lt;/gsf:template&gt;<br />
     976</Format>
     977</MajorVersion>
    957978<Text id="fw-16"><b>Preview</b> the collection. Click on the <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list and notice that the bookshelves now display how many documents they contain.</Text>
    958 <Text id="fw-17">This revised format statement has the effect of specifying in brackets how many items are contained within a bookshelf.  Since only bookshelves define <Format>[numleafdocs]</Format>, only they will display this. By modifying <AutoText text="CL2VList"/> instead of <AutoText text="VList"/>, the change will only apply to the second classifier (<AutoText key="coredm::_Global:labelCreator_" type="plain"/>).</Text>
     979<Text id="fw-17">This revised format statement has the effect of specifying in brackets how many items are contained within a bookshelf.
     980<MajorVersion number="2">
     981 Since only bookshelves define <Format>[numleafdocs]</Format>, only they will display this. By modifying <AutoText text="CL2VList"/> instead of <AutoText text="VList"/>, the change will only apply to the second classifier (<AutoText key="coredm::_Global:labelCreator_" type="plain"/>).
     982</MajorVersion>
     983</Text>
    959984</NumberedItem>
    960985<Heading>
Note: See TracChangeset for help on using the changeset viewer.