Hi all
I thought this was going to be an easy one. I use Epic 4.4k.
Here's what I want to do:
Both tag <metric> and <imperial> shouldand do not break across line. This is ok.The content of <metric> could beon1 line and thecontent of <imperial> on the next line.
But I want thetag <spec> tobreak cross line but it does not. Both <metric> and <imperial> are always together and sometimes crosses the the right margin.
Here's an example howit is presented inxml:
<para>bla bla bla <spec><metric>999 999 999</metric><imperial>888,888,888</imperial></spec></para>
Here's the FOSI portion for both <metric> and <imperial>:
<charlist>
<wordsp inherit="0" minimum=".3em" nominal=".3em" maximum=".3em">
<highlt inherit="1">
<keeps scope="line" keep="7"></charlist>
Now here's the FOSI for <spec>
<e-i-c gi="spec"> <charlist> <highlt<br/>inherit="1"> <keeps scope="line" keep="0"></charlist> </e-i-c>
Is there something I do not understand
Thanks in advance for your help.
Sylvain
Hi,
Ok, that is what I have done. The keep for tag <spec> is 0 and the keep for the tag <metric> and <imperial> is 7.
The <metric> tag goes to the next line even if there is enough space on the current line. It seems that the keep rule for the tag <spec> is not applied. Tags <spec>, <metric> and <imperial> have hidden attributes ,but this should have nothing to do with the keep rules.
If it can help, I have attached a jpg to visualise the problem andhere's the FOSI portion of those tags:
<e-i-c gi="imperial" context="spec">
<charlist inherit="1">
<wordsp inherit="0" minimum=".3em" nominal=".3em" maximum=".3em">
<highlt inherit="1">
<keeps scope="line" keep="7"><charlist>
<att>
<specval attname="units_of_measure" attloc="bulletin" attval="both">
<charsubset>
<usetext source="\(\" placemnt="before"><usetext>
<usetext source="imperial.txt,\)\" placemnt="after"><usetext>
<charsubset>
<att>
<att>
<specval attname="units_of_measure" attloc="bulletin" attval="imperial">
<charsubset>
<usetext source="imperial.txt" placemnt="after"><usetext>
<charsubset>
<att>
<att>
<specval attname="units_of_measure" attloc="bulletin" attval="metric">
<charsubset>
<suppress sup="1">
<reset resetlist="imperial.txt">
<reset resetlist="imperial_abbr.txt"><charsubset>
<att>&brp_uom_attribdecl_imperial;
&brp_uom_range_operator_imperial_print;
<e-i-c>
<e-i-c gi="metric" context="spec">
<charlist>
<wordsp inherit="0" minimum=".3em" nominal=".3em" maximum=".3em">
<highlt inherit="1">
<keeps scope="line" keep="7"><charlist>
<att>
<specval attname="units_of_measure" attloc="bulletin" attval="both">
<charsubset>
<usetext source="metric.txt,\ \" placemnt="after"><usetext>
<charsubset>
<att>
<att>
<specval attname="units_of_measure" attloc="bulletin" attval="metric">
<charsubset>
<usetext source="metric.txt" placemnt="after"><usetext>
<charsubset>
<att>
<att>
<specval attname="units_of_measure" attloc="bulletin" attval="imperial">
<charsubset>
<suppress sup="1">
<reset resetlist="metric.txt">
<reset resetlist="metric_abbr.txt"><charsubset>
<att>&brp_uom_attribdecl_metric;
&brp_uom_range_operator_metric_print;
<e-i-c>
<e-i-c gi="spec">
<charlist>
<highlt inherit="1">
<keeps scope="line" keep="0"><charlist>
<e-i-c>
Thanks again
Thanks Brandon and Steve for your input.Getting close but I have new findings to share with you all.
I have 2 separate FOSIs, 1 for screen and 1 for print.
I have made the following changes: <rsrcdesc softkeepspage="1"> and <rsrcdesc dfltlayoutconfig="rigid"> and that did not correct the problem.
The <spec> in the DTD is constructed like this:
To enable a space between<metric> and <imperial> for testing purposes,I modified the DTD like this:and that did the job. The <metric> stayed on the current line. So to better understand, I set the keep rule to 7 for the <spec> tag. By doing this I was assuming that whatever is in<spec> will not break to the next line, but IT DID. Now I am very confused.
and that did the job. The <metric> stayed on the current line. So to better understand, I set the keep rule to 7 for the <spec> tag. By doing this I was assuming that whatever is in<spec> will not break to the next line, but . Now I am very confused.I have 2 questions:
Is there a way to add a space between <metric> and <imperial> without changing the DTD.
Why the <spec> tag does not apply the keep = 7 rule? Here's the FOSI portion:
<e-i-c gi="spec"><charlist inherit="1"><keeps scope="line" keep="7"></charlist></e-i-c>
Thanks again
Hi
The flexibility of usingpseudo-elements... Ialready use pseudo-elements with other tags in my FOSI. Butfor what I wanted to do with the tag <spec>, I was blindly convinced without a doubt that I could use the DTD tags toavoid using pseudo-elements. This is a lesson for me!
I have adjusted the FOSI code below for my needs: there is an attributeat the root tag to displayonly metric or only imperial or both in the document, and everything works well: only the content of the tag <imperial> in a pseudo-element breaks to the next line.
Thank you all for your help for this one, really appreciated.
In Reply to Suzanne Napoleon:
It seems to me that what you want to do should work, so I tried it, with no success.
I encourage you to report the problem to PTC/Arbortext and let us know
the outcome, please 🙂
I tried the same workaround Brandon came up with. Code is below. Note the sizewhatever.fmt formatting pseudo-element which makes the word space between metric and imperial as narrow or wide as you need. Be sure to use a word space and not a fixed amount such as 4pt because a fixed space does not break as a word space does.
Good luck!
Suzanne Napoleon
www.FOSIexpert.com
<para>Xxxxx xx xxx xxx xx xxxxx xxxxxxx. Xxx xxxxx xxxx xxx xxxx.
Xxxxx xx xxxxx. For these parts torque to <spec><metric>111 111 255</metric>
<imperial>1,884</imperial></spec>.</para><para>Xxxxx xx xxx xxx xx
xxxxx xxxxxxx. Xxx xxxxx xxxx xxx xxxx. Xxxxx xx xxxx xxxx xxx xxxx.
For these parts torque to <spec><metric>111 111 255</metric><imperial>1,884
</imperial></spec>.</para>
FOSI
<rsrcdesc softkeepsline="1" dfltlayoutconfig="rigid">
<e-i-c gi="spec">
<charlist inherit="1" charsubsetref="inline"></charlist>
<att>
<specval attname="print-only" attloc="system-var" attval="yes">
<charsubset>
<usetext<br/>source="<keep-together-line.fmt>,metric.txt,</keep-together-line.fmt>,<size-whatever.fmt>,\ \,</size-whatever.fmt>,<keep-together-line.fmt>,\(\,imperial.txt,\)\,</keep-together-line.fmt>"
placemnt="after"></usetext>
</charsubset>
</att>
</e-i-c>
<e-i-c gi="metric" context="spec">
<charlist inherit="1" charsubsetref="inline"></charlist>
<att>
<specval attname="print-only" attloc="system-var" attval="yes">
<charsubset charsubsetref="SUPPRESS">
<savetext textid="metric.txt" conrule="#CONTENT,\m\"></charsubset>
</att>
</e-i-c>
<e-i-c gi="imperial" context="spec">
<charlist inherit="1" charsubsetref="inline"></charlist>
<att>
<specval attname="print-only" attloc="system-var" attval="yes">
<charsubset charsubsetref="SUPPRESS">
<savetext textid="imperial.txt" conrule="#CONTENT,\ft\"></charsubset>
</att>
</e-i-c>
<e-i-c gi="size-whatever.fmt">
<charlist inherit="1" charsubsetref="inline">
</charlist>
</e-i-c>
<e-i-c gi="keep-together-line.fmt">
<charlist inherit="1" charsubsetref="inline">
<keeps scope="line" keep="7"></charlist>
</e-i-c>