Pages: 1
Print
Author Topic: Removing the Block Title from Topic Group  (Read 3344 times)
kwag_myers
Member

Posts: 69


« on: April 28, 2011, 06:51:46 AM »

By default, the <topicgroup> element for a DITA map displays "Topicgroup" as a navtitle. However, the navtitle attribute is not allowed for <topicgroup> and I haven't been able to figure out how to edit or remove "Topicgroup".

I've been playing around with the CSS files in ...\XMetaL 6.0\Author\DITA\XACs\shared and ...\bookmap. Yesterday, I thought I was on to something when I discovered I could change the content attribute for topicgroup on bookmap_bookmap_structure.css. However, when I deleted or commented out the attribute, "Untitledgroup" displays. Today, I can't seem to get anything to respond to my edits. Please advise.

More info: I have to convert XML documents to comply with DITA DTDs. So, where the original DTD calls for a <ptxt> I convert that to <p>, <emph> to <i>, etc. Several of these documents are TOCs and the best way I've found to match the original is to use a DITAMAP instead of a TOPIC. The originals have several nested groupings (groups inside groups inside groups) and the only option I've found to match this is the <topicgroup> element.
Logged

XMetaL 6 Author in Windows 7 Home Premium
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #1 on: April 28, 2011, 05:14:50 PM »

I'm assuming we're discussing XMetaL Author Enterprise 6.0 and that a CMS system is not involved here.

What do you want it to display instead of the text "Topicgroup"? I guess knowing your goal doesn't mean I cannot answer your question about which file to modify, but it would be interesting to know what problem you are attempting to solve.

CSS files with "_structure.css" in their name are for the Structure View and not Tags On or Normal view. So, adding something to the Structure View CSS file (as you have been trying) will only affect the Structure View.

Also, there is no supported way to alter the rendering of maps viewed in the Map Editor (which is hosted inside the Window labelled "Resource Manager").

If you are editing the map in Tags On or Normal view then we support altering the styling of those views by changing the CSS. The file that renders the text "Topicgroup" with a grey background inside the <topicgroup> elements in Tags On and Normal view is this file (for standard DITA map files):

<XMetaL Install Path>\Author\DITA\XACs\shared\map-derived.css

The CSS selector is: [class~="mapgroup-d/topicgroup"]:before

The last CSS file to be loaded for (standard) DITA maps is as follows. So you can either edit the CSS file listed above and modify that selectors properties directly, or override that selector by adding a duplicate for it in the 'override' file below and override any properties you want to change there:

<XMetaL Install Path>\Author\DITA\XACs\map\map-derived-override.css

It would be cleaner (so in theory easier to maintain) to add something like the following into that 'override' CSS file but the choice of which file to make the modification in is ultimately up to you (the outcome will be the same):

[class~="mapgroup-d/topicgroup"]:before{
   content: "foo bar";
}


Note: If you want to change the value for content from "Topicgroup" so that nothing appears you cannot just set the value to an empty string (because that is the same as not setting the value). You will need to set it to contain a space in that case:

[class~="mapgroup-d/topicgroup"]:before{
   content: " ";
}


For interest's sake (may help understand how the CSS files for DITA are loaded), the main file that controls all the CSS that is loaded for a map is this one (you will see that it consists of 4 @import statements that load CSS files in a specific order):

<XMetaL Install Path>\Author\DITA\XACs\map\map_map.css
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #2 on: April 28, 2011, 05:26:52 PM »

Regarding your last point about using <topicgroup>.

I'm not exactly sure what your original content looks like (and more importantly perhaps, what the markup structure might have meant). However,  DITA maps allow <topicref> elements to be nested if that makes more sense than using the <topicgroup> element.

You might wish to have a look at the DITA Language Reference to see what it says about the difference between usage of <topicgroup> and nesting <topicref> elements. Also, if you are producing output using the DITA Open Toolkit (which I assume is the case) you may wish to see what the default output looks like for the outputs you produce in case there is a difference between the two (so that you need not try to alter its behavior, which in this particular case would probably not be trivial).

You can view the DITA Language Reference by selecting Help > Specifications > DITA Language Reference. You can also jump directly to the DITA Language Reference topic for a particular element by placing your cursor inside the element and selecting Alt+F1 (this only works in Tags On or Normal view).
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #3 on: April 28, 2011, 05:41:04 PM »

Sorry, I answered your question in context of "standard" map files.
If you are in fact working with a bookmap then here are the CSS files you need to look at...

Main CSS file that loads all others for bookmaps:
<XMetaL Install Path>\Author\DITA\XACs\bookmap\bookmap_bookmap.css

CSS file that includes the styling for "text before" in <topicref> elements:
<XMetaL Install Path>\Author\DITA\XACs\shared\bookmap-base.css

The CSS selector is the same (because bookmap is a specialization of map and so uses the same class attribute and <topicref> element):
[class~="map/topicref"]:before{

You can do overrides in either of the following files:
<XMetaL Install Path>\Author\DITA\XACs\bookmap\bookmap-derived-override.css
<XMetaL Install Path>\Author\DITA\XACs\bookmap\bookmap\bookmap-base-override.css
Logged
kwag_myers
Member

Posts: 69


« Reply #4 on: May 03, 2011, 01:35:18 PM »

Thanks for the prompt response. I, on the other hand, have not been so prompt in getting back to this thread. Sorry!

I'm assuming we're discussing XMetaL Author Enterprise 6.0
Yeah, I have that in my signature. Maybe not the best place for that info.

Quote
What do you want it to display instead of the text "Topicgroup"?

I don't want anything to display. Here's theirs (I've modified it a bit to conceal the client's id):

<system attribute1="00" id="d1e2">
  <system-toc groupname="00"/>
  <systemname>00 - Some Data</systemname>
    <subsystem...


Here's mine:

<topicgroup type="system" base="00" id="d1e2">
  <topichead type="system-toc" navtitle="00"></topichead>
  <topichead navtitle="00 - Some Data"></topichead>
    <topicgroup type="subsystem"...


Referring to the first line, there is nothing following the tag, i.e., it just acts as a wrapper for the other tags. And I have to keep the structure intact to facilitate a reverse conversion.

Quote
CSS files with "_structure.css" in their name are for the Structure View and not Tags On or Normal view. So, adding something to the Structure View CSS file (as you have been trying) will only affect the Structure View.

Feeling stupid for not making that connection.

Anyway, it wasn't until I employed the bookmap-base-override.css that I obtained the desired results. Thanks!!!!!!!

As for <topicref>, same issue. However, I am using this tag in the deeper layers.
Logged

XMetaL 6 Author in Windows 7 Home Premium
Pages: 1
Print
Jump to:  

email us