On 12/11/2012 05:06 PM, Bob Stayton wrote:
> Hi,
> You can set the stylesheet parameter 'generate.id.attributes' to 1 to
> get that result.  That causes the stylesheet to generate id attributes
> instead of named 
> anchors.
>  
> Bob Stayton
> Sagehill Enterprises
> [email protected] <mailto:[email protected]>

Hi Bob:

Thanks for the quick reply! And I thought I'd seen all the stylesheet
parameters...

Be Seeing You,
jec
>
> *From:* Jeffrey Chimene <mailto:[email protected]>
> *Sent:* Tuesday, December 11, 2012 3:50 PM
> *To:* DocBook Apps <mailto:[email protected]>
> *Subject:* [docbook-apps] Use id instead of name in onechunk?
>
> Hi:
>
> I'd like to generate the following HTML. Note the presence of the ID
> attribute.
>> <div class="section" title="Getting Started">
>>             <div class="titlepage">
>>                 <div>
>>                     <div>
>>                         <h2 class="title" style="clear: both">
>>                             <a id="gettingStartedTopic"></a>Getting
>> Started
>>                         </h2>
>>                     </div>
>>                 </div>
>>             </div>
> from the following XML
>> <section id="&idGettingStarted;">
>>         <title>Getting Started</title>
>
> As you know, the ONECHUNK stylesheet generates the following HTML.
> Note the presence of the NAME attribute.
>
>> <div class="section" title="Getting Started">
>>             <div class="titlepage">
>>                 <div>
>>                     <div>
>>                         <h2 class="title" style="clear: both">
>>                             <a name="gettingStartedTopic"></a>Getting
>> Started
>>                         </h2>
>>                     </div>
>>                 </div>
>>             </div>
>
> The issue is that I want to present this document using Javascript.
> There exists no "getElementByName" that is the equivalent of the DOM
> query method getElementById().
>
> As a workaround, I run the generated HTML through a post-processor to
> replace all /name/ attribute names with the /id/ attribute name.
>
> tia,
> jec

Reply via email to