Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hi,
I want to apply font color for more than 50 elements in one element context(dt--definition term). Below is the coding for making individual element font color.
<e-i-c gi="ph" occur="all">
<charlist inherit="1">
<indent inherit="0"/></charlist>
<att>
<specval attname="ishcondition" attloc="ph" attval="#ANY"/>
<specval attname="EDITOR-ONLY" attloc="system-var" attval="#ANY"/>
<charsubset>
<indent inherit="0"/>
<highlt fontclr="#663399"/></charsubset>
</att>
</e-i-c>
Similar way i want to apply all element inside <dt> element. instead of applying individual element is there any option for defining all in one <e-i-c>
Thanks
Roopesh
Solved! Go to Solution.
Hi Roopesh,
In the following example, I have named the text entity highlight. The entity declaration in the FOSI would look like this in an ASCII editor:
<!ENTITY highlight '<att>
<specval attname="ishcondition" attval="#ANY"/>
<specval attname="EDITOR-ONLY" attloc="system-var" attval="#ANY"/>
<charsubset>
<indent inherit="0"/>
<highlt fontclr="#663399"/>
</charsubset>
</att>'>
The e-i-c for each element in <dt> would look like this in an ASCII editor:
<e-i-c gi="ph" occur="dt">
<charlist inherit="1">
<indent inherit="0"/>
</charlist>
&highlight;
</e-i-c>
Good luck!
Suzanne
Hi Roopesh,
When duplicate attribute rules are needed, you can create a text entity and reference it in any e-i-c.
Note that in this case, you should not specify attval in the first specval so the ishcondition attribute is looked for on the current element, which will not always be <ph>.
In the FOSI tagged editor, highlight the <att> and select Entities>Create Text Entity from Selection:
<att>
<specval attname="ishcondition" attval="#ANY"/>
<specval attname="EDITOR-ONLY" attloc="system-var" attval="#ANY"/>
<charsubset>
<indent inherit="0"/>
<highlt fontclr="#663399"/>
</charsubset>
</att>
When the text entity has been created, you can reference it the e-i-cs for all the elements in <dt>. If you ever want to change the color, you only have to change the text entity.
The Entities>Text... dialog makes it easy to work with text entities. Note that it counts and finds every reference to any text entity.
I have attached a few pages from my forthcoming book, Practical FOSI, with an example of a text entity used for security classification. It shows how the entity and references appear in the ASCII file.
Good luck!
Suzanne Napoleon
www.FOSIexpert.com
"WYSIWYG is last-century technology!"
Hi Suzanne Napoleon,
Thank you for the help. Could you please provide sample entity code and reference for the above element? As i am new in this FOSI, i tried to generated in Arbortext editor, it was not successful.
Thanks in Advance
Roopesh
Hi Roopesh,
In the following example, I have named the text entity highlight. The entity declaration in the FOSI would look like this in an ASCII editor:
<!ENTITY highlight '<att>
<specval attname="ishcondition" attval="#ANY"/>
<specval attname="EDITOR-ONLY" attloc="system-var" attval="#ANY"/>
<charsubset>
<indent inherit="0"/>
<highlt fontclr="#663399"/>
</charsubset>
</att>'>
The e-i-c for each element in <dt> would look like this in an ASCII editor:
<e-i-c gi="ph" occur="dt">
<charlist inherit="1">
<indent inherit="0"/>
</charlist>
&highlight;
</e-i-c>
Good luck!
Suzanne
Hi Suzanne,
Thank you for the code. I added above code in concept.fos and ditabase.fos just above the root tag<outspec> and call the entity reference. But i am getting many errors
1. object out of context specval
2. undeclared entity reference highlight
3. Extra end tag encountered. The end tag is for element 'att'. A begin tag will be supplied
please help me where i need to place this entity?
Thanks
Roopesh
It sounds like there is a typo.
Suzanne
Hey Roopesh,
Were you able to sort this out?
Let us know if you have any more questions.