I need to generate a Sequence id for TOC part and idref for the referenced places using the content first three letters.
Input:
<tocentry><title>List of Boxed Readings</title></tocentry>
<tocentry><title>Foreword</title></tocentry>
<tocentry><title>About the Author</title></tocentry>
<tocentry><title>Preface</title></tocentry>
<tocentry><title>A Dinosaur Dictionary</title></tocentry>
<tocentry><title>GLOSSARY</title></tocentry>
<tocentry><title>INDEX</title></tocentry>
Required OUtput:
<p class="Toc-part"><a href="#LOBRSec1">List of Boxed Readings</a></p>
<p class="Toc-part"><a href="#ForeSec2">Foreword</a></p>
<p class="Toc-part"><a href="#AtASec3">About the Author</a></p>
<p class="Toc-part"><a href="#PrefSec4">Preface</a></p>
<p class="Toc-part"><a href="#ADDSec5">A Dinosaur Dictionary</a></p>
<p class="Toc-part"><a href="#GLOSSec6">GLOSSARY</a></p>
<p class="Toc-part"><a href="#INDXSec7">INDEX</a></p>
Please help me to generate ID from the content first letters...
Best regards, Antony