Skip to main content
September 27, 2019
Question

Appling 2 different styles based on attribute in xml

  • September 27, 2019
  • 1 reply
  • 378 views

Hello,

 

I have a DITA based structure application in FM. Currently dealing with xml topic based files. In my topic

.template.fm I have successfully added page style (landscape/etc.) based on XML attribute (you know the trick with the reference page rule to point to a landscape master page and it works). Now I want to do something similar but with other xml elements. Let's say I want a paragraph to have 2 different font style based on an xml attribute = font-1/font-2. How do I set these styles from the template file so when I load the xml the styles are applied in the editor view?

(I really want to stay and be DITA compatible, so don't want to update edd.dtd files. Why can't this be done from the template?)

This topic has been closed for replies.

1 reply

Matt-Tech Comm Tools
Community Expert
Community Expert
September 27, 2019

I can't quite follow what you're trying to accomplish, but setting formatting based on attribute(s) and value(s) is an EDD function.

Changing formatting rules (as opposed to changing element names, general rules, or other parts) in the EDD won't impact your DITA compatibility.

 

-Matt Sullivan, FrameMaker Course Creator, Author, Trainer, Consultant
Adobe Employee
September 27, 2019
You may wanna have a look at this blog post. Hopefully this should give you some ideas: