cancel
Showing results for 
Search instead for 
Did you mean: 
Security Alert Log4j Security Vulnerability. Click here to know more.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply background color for some tags which having attribute in arbortext editor

rnavath
1-Newbie

How to apply background color for some tags which having attribute in arbortext editor

Hi developers,

I want to apply background color for particular tag with attribute (<dl ishcondition="output-type=content-in-pdf-only">). How can i achieve this using styler files?

Thanks in advance

Roopesh N

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Roopesh,

you can do this in Styler by using the "condition" dialog.

  1. In Styler, select the particular tag/element
  2. In the top menu select "Insert" > "condition" (or simply press F11)
    The "condition" dialog pops up.
  3. Click on "New Attribute Test"
    The "Attribute test" dialog pops up.
  4. Insert your individual attribute check. You can access a specific help page from the "Attribute Test" dialog, if you have problems to do this.
  5. Once you're done, click "ok" in the "Attribute Test" dialog, and again "ok" in the "condition" dialog.
    The new condition appears in the list of elements in styler, nested in the particular tag/element
  6. Select the condition.

You can now style the condition in any way you want. The style will only be applied to elements with the condition you just set up. (Condition check = true)

The background color can be set in the very first tab "font". There you find a setting called "shading".

View solution in original post

7 REPLIES 7

Hi Roopesh,

you can do this in Styler by using the "condition" dialog.

  1. In Styler, select the particular tag/element
  2. In the top menu select "Insert" > "condition" (or simply press F11)
    The "condition" dialog pops up.
  3. Click on "New Attribute Test"
    The "Attribute test" dialog pops up.
  4. Insert your individual attribute check. You can access a specific help page from the "Attribute Test" dialog, if you have problems to do this.
  5. Once you're done, click "ok" in the "Attribute Test" dialog, and again "ok" in the "condition" dialog.
    The new condition appears in the list of elements in styler, nested in the particular tag/element
  6. Select the condition.

You can now style the condition in any way you want. The style will only be applied to elements with the condition you just set up. (Condition check = true)

The background color can be set in the very first tab "font". There you find a setting called "shading".

View solution in original post

Hi Reichelt Bert,

Thank you for your help. I tried with the above steps color is reflecting, but when i reload the xml files color is not appearing.

It is appearing oly if i click edit ditabase.style file(arbortext editor-->styler-->Edit stylesheet).

Could you please suggest me what is wrong i am doing.

    <Conditions>

    <Condition>

    <Tests logic="and">

    <AttributeTest attributeName="ishcondition" testValue="#ANY"/></Tests>

    <BaseProperties propertySetReferences="ishcondition">

    <GeneratedText>

    <AddBefore>

    <_sfe:BeforeOrAfterText>

    <_ufe:ishcondition-beginmarkup>

    <_gte:AttributeContent attr="ishcondition" occur="1" scope="condition"

    ></_gte:AttributeContent>

    </_ufe:ishcondition-beginmarkup>

    </_sfe:BeforeOrAfterText>

    </AddBefore>

    </GeneratedText>

    </BaseProperties>

    <OutputProperties output="editor">

    <Highlight color="#0000FF"/></OutputProperties>

    </Condition>

Thanks in advance

Roopesh

Well, If the colors show up, when you edit ditabase.style, then it means you made the settings in styler right! Good Job, so far!

So, the problem is something else. Probably it has something to do with the general settings in Arbortext. When you open a dita file, on default Arbortext will style the xml with the settings of ditabase.style. If you made the settings in another style file, then they won't show up. So either you have to change the ditabase file OR you have to change Arbortext defaullt settings to no use ditabase.style, but the style file you made the settings.

Unfortuanetely I can't tell how to do this, since I never had to change the default settings of our Arbortext.

TimPhelps
5-Regular Member
(To:ReicheltBert)

You should use Format > Select Stylesheet to "Associate" the edited style sheet to the document.

Arbortext Editor Help describes how to do the association.

Hi

I tried File association also but no luck. I notice some .fos files are controlling the styles of xml. concept.fos ,ditabase.fos etc. Do i need to change these files to reflect in arbortext editor.

Thanks in advance.

Roopesh

Thank you all for your support. Finally i found a solution for this in FOSI stylesheet. Now i am able to apply color based on attribute.

Thanks

Roopesh N

TimPhelps
5-Regular Member
(To:rnavath)

Could let the community know what was the best advice that helped you resolve this issue, by marking on of the answers with a Correct Answer?

Announcements