Extracting Essay Ids
<h3 class="heading-h6"><a name="THLToolboxhomegtDevelopersZonegtWebDevelopmentgtXMLBooksgtExtractingEssayIDs" class="anchorpoint"></a><a href="/tools/wiki/home.html">THL Toolbox</a> > <a href="/tools/wiki/Developers%27%20Zone.html">Developers' Zone</a> > <a href="/tools/wiki/Web%20Development.html">Web Development</a> > <a href="/tools/wiki/XML%20Books.html">XML Books</a> > Extracting Essay IDs</h3><p class="paragraph">
</p><h3 class="heading-h1"><a name="ExtractingEssayIDs" class="anchorpoint"></a>Extracting Essay IDs</h3><p class="paragraph"><strong class="bold">Contributor(s);</strong> Than Grove, Steven Weinberger</p><p class="paragraph">From Than Grove, 2010-08-10: I set up a cocoon pipeline that should work for any book on the cocoon/texts/book site. It should also work for essays etc but I haven't had time to test that yet and there may be glitches.</p><p class="paragraph">If you use the following URL: <img src="/" alt="external link: " title="external link"/><span class="nobr"><a href="http://local.thlib.org:8080/cocoon/texts/books/bonpo-monasteries/ids/main.xml?l=3" target="rwikiexternal">http://local.thlib.org:8080/cocoon/texts/books/bonpo-monasteries/ids/main.xml?l=3</a></span>
<br/><strong class="bold">Note:</strong> If your localhost address may be different, if the above address is erroneous, try: <img src="/" alt="external link: " title="external link"/><span class="nobr"><a href="http://localhost:8080/cocoon/texts/books/bonpo-monasteries/ids/main.xml?l=3" target="rwikiexternal">http://localhost:8080/cocoon/texts/books/bonpo-monasteries/ids/main.xml?l=3</a></span></p><p class="paragraph">Then it gives you a list of: id numbers and the head text for that id, down to the div3s.</p><p class="paragraph">If you use: <img src="/" alt="external link: " title="external link"/><span class="nobr"><a href="http://local.thlib.org:8080/cocoon/texts/books/bonpo-monasteries/ids/main.xml?l=2&lang=wyl" target="rwikiexternal">http://local.thlib.org:8080/cocoon/texts/books/bonpo-monasteries/ids/main.xml?l=2&lang=wyl</a></span>
<br/><strong class="bold">Note:</strong> If your localhost address may be different, if the above address is erroneous, try: <img src="/" alt="external link: " title="external link"/><span class="nobr"><a href="http://localhost:8080/cocoon/texts/books/bonpo-monasteries/ids/main.xml?l=2&lang=wyl" target="rwikiexternal">http://localhost:8080/cocoon/texts/books/bonpo-monasteries/ids/main.xml?l=2&lang=wyl</a></span></p><p class="paragraph">it gives you: id #, Unicode Tibetan of Head, the Wylie Head text down to level of div2s.</p><p class="paragraph">If you use:<img src="/" alt="external link: " title="external link"/><span class="nobr"><a href="http://local.thlib.org:8080/cocoon/texts/books/bonpo-monasteries/ids/main.xml?l=4&lang=tib" target="rwikiexternal">http://local.thlib.org:8080/cocoon/texts/books/bonpo-monasteries/ids/main.xml?l=4&lang=tib</a></span>
<br/><strong class="bold">Note:</strong> If your localhost address may be different, if the above address is erroneous, try: <img src="/" alt="external link: " title="external link"/><span class="nobr"><a href="http://localhost:8080/cocoon/texts/books/bonpo-monasteries/ids/main.xml?l=4&lang=tib" target="rwikiexternal">http://localhost:8080/cocoon/texts/books/bonpo-monasteries/ids/main.xml?l=4&lang=tib</a></span></p><p class="paragraph">It gives you: id#, Head in Unicode Tibetan, the head text converted into Wylie down to level of div4s (but there are no div4s in that document).</p><p class="paragraph">So the l param is the level to go down to, and the lang can be either "tib" if the header of each section is in Unicode Tibetan and it will translate it to Wylie. If lang=wyl, then it will translate Wylie headers into Unicode Tibetan. If no lang param is given, no conversion happens.
</p><h3 class="heading-h6"><a name="ProvidedforunrestrictedusebythespanclassnobrimgsrcsakairwikitoolimagesicklearrowgifaltexternallinktitleexternallinkahrefhttpwwwthliborgtargetrwikiexternalTibetanandHimalayanLibraryaspan" class="anchorpoint"></a><em class="italic">Provided for unrestricted use by the <span class="nobr"><img src="/" alt="external link: " title="external link"/><a href="http://www.thlib.org" target="rwikiexternal">Tibetan and Himalayan Library</a></span></em></h3>