Adobe Forums

Add Me
Adobe Forums » Software Discussions » FrameMaker » Document title in footer (using DITA)

Tags:



Reply
LinkBack Thread Tools Display Modes
Document title in footer (using DITA)
  #1 (permalink)  
Old 11-21-2008, 07:15 AM
Larry_Jodoin@adobeforums.com
Guest
 
Posts: n/a
Default Document title in footer (using DITA)

We want to put our document title in the footer. I did it by editing the FM template to include an empty DocTitle variable, and importing a DocTitle variable from another file into the book after map-to-book.

This works well. But is there a way to accomplish something similar that doesn't require post-processing after map-to-book?

Currently, the only mention of the document title is in the title attribute of the map element in the ditamap file. Any suggestions on how to automatically pull the document title from the map attribute into the structured FM template for footer use?

If it requires much coding, it may be easier to continue the manual import. But I wanted to check in case there's a simple solution. Any thoughts?

Thanks,

Larry


Reply With Quote


  #2 (permalink)  
Old 11-21-2008, 07:15 AM
Larry_Jodoin@adobeforums.com
Guest
 
Posts: n/a
Default Re: Document title in footer (using DITA)

Thanks for the response, Van.

You mentioned: "I am assuming that after you convert the map to a book, the attribute that holds the document title is in some element in the book."

I think that might be the issue. The attribute I need doesn't end up in the book after the map-to-book process.

Looks like I need to use the variable import method, or put the title into a topic attribute that survives the map-to-book process. I'll probably stay with the variable method, as the other would be tough to manage since topics are used in multiple documents.

Thanks again,

Larry
Reply With Quote


  #3 (permalink)  
Old 11-22-2008, 06:57 AM
Van_Kurtz@adobeforums.com
Guest
 
Posts: n/a
Default Re: Document title in footer (using DITA)

Larry,

Just to be clear...

When you create the book from the map, select the book window and open the structure view. Does the structure view have a root element and possibly some child elements that are NOT the document root elements? If so, and I think it should be, then it seems that one of those elements should have the attribute you want. Again, just guessing because that is the way it is in structured books.

Van
Reply With Quote


  #4 (permalink)  
Old 11-22-2008, 06:57 AM
Larry_Jodoin@adobeforums.com
Guest
 
Posts: n/a
Default Re: Document title in footer (using DITA)

The root element of the book is "fm-ditabook", with two attributes (href and format). Child "fm-ditafile" elements represent each generated FM file, and they also have two attributes (href and format).

In the ditamap, the root element is "map" and the attribute of interest is "title". This element and attribute are not carried forward during the map-to-book process.

If the map-to-book function could be modified to create and populate a title attribute in the "fm-ditabook" element (based on the ditamap "map" title attribute), I think the running header/footer variable could then access it. But I'm not sure how to modify that map-to-book function. It may require editing the XSL.

Thanks,

Larry
Reply With Quote


  #5 (permalink)  
Old 11-22-2008, 06:57 AM
Scott_Prentice@adobeforums.com
Guest
 
Posts: n/a
Default Re: Document title in footer (using DITA)

The map-to-book process basically works like this ..

- select command from menu
- specify output book name
- map is opened with the Book application, which runs the XSLT import script to aggregate the separate XML topic files into chapter files
- after book has been built, a process runs over the book to relink the references

Note that this assumes that you select the command from the menu rather than opening the map with the Book app .. which may seem to work, but does not properly relink the references in the generated FM files.

So, yes .. if you make tweaks to the XSLT, you should be able to get your additional attributes onto the fm-ditabook element.

Cheers,

....scott
Reply With Quote


  #6 (permalink)  
Old 11-22-2008, 06:57 AM
Larry_Jodoin@adobeforums.com
Guest
 
Posts: n/a
Default Re: Document title in footer (using DITA)

Got it. Thanks Van and Scott! Here's a summary in case anyone is interested:

1. Edited the dita-book-fm.dtd to add support for a "doctitle" attribute in the fm-ditabook element.

2. Made the same edit to the book.edd.fm, and imported definitions into the structured template.

3. Edited ditamap2fmbook.xsl to include: <xsl:attribute name="doctitle"><xsl:value-of select="@title"/></xsl:attribute> in the <fm-ditabook> area.

4. Entered a title attribute in the ditamap map element.

5. Built the book and the fm-ditabook doctitle element contains the correct title from the map, which can now be used in running headers/footers.

Seems to work well so far. Thanks again.

Larry
Reply With Quote


  #7 (permalink)  
Old 11-22-2008, 06:57 AM
Scott_Prentice@adobeforums.com
Guest
 
Posts: n/a
Default Re: Document title in footer (using DITA)

Hey Larry...

That's great! This is probably something that others will want to do as well. If you can take a moment and add this to the DITA/FrameMaker Community KB, then it will be preserved for easy access by others ..

<http://kb.leximation.com/dfm/>

Cheers!

....scott
Reply With Quote


Reply



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Hairstyles | UFO Videos | Bollywood Wallpapers | Poems  | WWE


All times are GMT. The time now is 08:42 AM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.