Home Forums DITA and XMetaL Discussion Syntax Diagram Element Output in Red ? Reply To: Syntax Diagram Element Output in Red ?

Derek Read

Reply to: Syntax Diagram Element Output in Red ?

For approach #1 you would need to modify this file:

%programdata%SoftQuadXMetaLSharedpluginsorg.dita.xhtmlxslxslhtmlsyntax-braces.xsl

Replace with the version of the DITA OT you are using. In some versions of XMetaL Author Enterprise multiple versions of the DITA OT are included. Look at the output log file to check the path of the one being run. Look for “DITA OT path”.

On most Windows installations the %programdata% environment variable points to C:Program Data.
On most Windows installations that folder is hidden by default.

Do this carefully. Create a copy of any file you modify so you can easily restore it.

The offending line in the XSLT file is as follows:



...don't touch anything else...

There's the hard-coded blob of CSS styling that is causing the “maroon” colouring.
Change it to remove that blob and include a class attribute instead and you should be good to go (or at least perhaps with the help of the person designing the CSS files used on your website). I'd recommend something like this (but check with the website person to see what they prefer):



...don't touch anything else...

If you make that change and don't see that class attribute in the HTML output (and output isn't broken) then you have probably modified the wrong copy of the DITA OT.

You should see this in the HTML (unless you chose to make a different change of course):

So how did I find this XSLT file?
I used the Find in Files feature in Notepad++ to search all the XSLT files (*.xsl) inside the DITA OT location looking for the word “maroon” (which as it turns out is only used once). This is a good approach in this case as that word is unlikely to have been generated from a variable or something else. I could also have searched for any other portion of the HTML markup that is likely to be unique (values, not elements or attributes). Or I could have searched for the DITA element name “syntaxdiagram” as it was likely to appear in one of the XSLT templates as was the case here. That will not always give good results however, as sometimes a template match is performed on a parent element and not the element you are directly interested in.

Keep in mind that if you move to a newer version of XMetaL Author Enterprise (and you are using the DITA OT that it installs) then you should check to see if this change is still needed in the new version of the DITA OT included.

Reply

Products
Downloads
Support