Highlighted

Appling 2 different styles based on attribute in xml

New Here ,
Sep 27, 2019

Copy link to clipboard

Copied

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?)

TOPICS
Structured

Views

96

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Appling 2 different styles based on attribute in xml

New Here ,
Sep 27, 2019

Copy link to clipboard

Copied

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?)

TOPICS
Structured

Views

97

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 27, 2019 0
Adobe Community Professional ,
Sep 27, 2019

Copy link to clipboard

Copied

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.

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 27, 2019 0
Adobe Employee ,
Sep 27, 2019

Copy link to clipboard

Copied

You may wanna have a look at this blog post. Hopefully this should give you some ideas:

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 27, 2019 0
Adobe Employee ,
Sep 27, 2019

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 27, 2019 0