-
1. Re: expression - help!
Reviewer1066 Sep 28, 2010 10:30 AM (in response to argus08)From your description, I think it is as simple as:
A or cake or apple
Since cake/pie and apple/orange are each mutually exclusive, you do not need to specify something like cake andnot pie to show cake. When using expressions, it is not necessary to specifically hide something, especially if the conditions are mutually exclusive. Showing cake will not show pie UNLESS a para is tagged with both. I am assuming because they are mutually exclusive, you are not tagging a para with both. If you ARE then, you still want to show cake even though it is also tagged pie.
You state:
A, B, C, D (a para can be any or all of these, but only one can be chosen for output)
Again, if a para is tagged A and C and you want to show A, then simply state show A. If a para is tagged A and C, then A andnot C hides the paragraph. Again, do not state andnot to hide something unless you really do not want it to show, no matter what the other tags may be.
Also, if you want A to show but only if it is not tagged with B, C, or D, then you should try:
A andnot B andnot C andnot D or cake or orange
One issue that has always been unknown to me is how much of the expression does FrameMaker evaluate when determining what to show. In standard logic, the statement A or B is true if A is true, B is true, or both are true. Most computer programs stop the evaluation if A is determined to be true, because the whole statement is true no matter the value of B.
On the other hand, A and B is true only if both A and B are true. In this case, if A is true, then the computer must also evaluate B. If this is really what FrameMaker is doing, then putting the andnot's right after the A forces FrameMaker to evaluate the expression all the way to the first or. Putting them at the end means they may not be evaluated if A is true (that is, shown). But this may just be my way of understanding how expressions work. At least, it works for me.
By the way, I have used expressions to handle multi-conditioned text, and I had lots of problems with it, namely, FrameMaker crashed a lot. After the last project, I switched to using the AXCM plugin from West Street Consulting. It is free, but work only in structured FrameMaker.
Hope this helps,
Van
-
2. Re: expression - help!
argus08 Sep 28, 2010 11:35 AM (in response to Reviewer1066)Thanks for your response, Van.
<to clarify (or maybe further mudify), one of the mutually-exclusive tags is for help vs print; so I've got provincial output (A/B/C/D etc.), one of two versions (cake/pie) and help/print output -- so I want province A, cake flavour, print output>
I did try the simple way first ("A" or "cake" or "apple"), but that still showed the following paragraphs tagged as:
"A and C and orange"
"B and apple"
The first should be excluded because it contains "orange", the second because it does not contain "A".
So I guess to re-state my need, ANYTHING with "pie" or "orange" should be excluded. After that, paras with "A" should be included even if other letters that are also tagged, and paras that are tagged other letters and not A should be excluded.
I could stick with what works currently:
- everything is single tagged with sometimes cumbersome tags (from FM7) such as cake_A_orange, cake_A, A_orange, etc.
- I create an expression to exclude everything I don't want (that's a whole lot of ANDNOTs)
However this is a drag and will get worse as the product supports more provinces (for each prov, PDF & help output for each of two flavours).
Any suggestions? I wish I'd paid more attention in math class now...
-
3. Re: expression - help!
Jeff_Coatsworth Sep 28, 2010 11:57 AM (in response to argus08)This sounds amazingly complicated - I'm assuming you're using the unstructured version of FM because I think going to structured would have allowed you to manage your content better.
Barring that, how about simplifying things by duplicating paragraphs and setting each with only 1 condition? Or using variables or text insets? Or creating separate books with fewer conditions? Just tossing ideas here ;
-
4. Re: expression - help!
Reviewer1066 Sep 28, 2010 1:53 PM (in response to argus08)- I create an expression to exclude everything I don't want (that's a whole lot of ANDNOTs)
The FIRST point is that with expressions (unlike the show/hide way) you are specifying what you want to SHOW. Therefore, in most cases, you do not need to specify what you want to hide. Thus, in a very simple case (NOT your case) where each para is tagged with only one condition, either a, b, or c, you can set your expression to b, to show b and hide a and c. You do not need to andnot a and c.
But in your case, I think I understand what you are trying to do:
You want to show A but ONLY IF it is NOT tagged with either pie or orange.
You want to show cake but ONLY if it is tagged with A.
You want to show orange but ONLY if it is tagged with A.
My assumption is that any para can be tagged with (either cake OR pie) AND (apple OR orange) AND (A, B, C, and/or D, but at least one of the conditions);. So, using parentheses to make it clearer, your expression should be:
(A ANDNOT pie ANDNOT orange) OR (cake AND A) OR (apple AND A)
Now that I think about it, it simplifies to:
A ANDNOT pie ANDNOT orange
Every para has to be tagged with AT LEAST ONE province (A, B, C, and/or D), EITHER pie or cake, AND EITHER apple or orange. The fact that pie/cake and apple/orange are each mutually exclusive means that stating ANDNOT pie means that it must be cake. Stating ANDNOT orange means that it must be apple. Thus, you do not need to state to show cake and to show apple; by stating NOT pie and NOT orange, cake and apple are implied. The above expression DOES exclude B, C, and D BUT ONLY if it is not A. As stated above, you do not need to specify that B, C,and D are to be hidden; they will be hidden because they are not stated in the expression. SOME may show but only when also tagged with A.
Does this work? OR have I got it wrong again?
Van
-
5. Re: expression - help!
Michael Müller-Hillebrand Sep 28, 2010 1:56 PM (in response to argus08)Argus,
What FrameMaker supports is not really boolean in the sense you would have learned in Maths.
Since certain documents are hard to find on this adobe.com pages I attach an article I saved to PDF some time ago explaining the new condition expressions. After a glance at it seems to explain why "A" AND "B" does not do what you think it should.
https://acrobat.com/#d=Roh9MVcIM6CGMNB-0LFZVw
HTH,
- Michael
Put the file on acrobat.com
-
6. Re: expression - help!
Russ Ward Sep 28, 2010 6:38 PM (in response to Michael Müller-Hillebrand)Argus,
Far and away, the best suggestion I can think of is to ditch all of this and structure your documents. Then you can use structural metadata to manage conditions, which is considerably more manageable and flexible. All of these explanations so far are so bewildering in their complexity... I'm not sure how anyone can deal with it.
I'm also not sure exactly when conditional text was introduced to FrameMaker, but I'd be willing to bet that we are getting close to 20 years ago. That means you are attempting to use 20-year-old technology to manage the intricacies of modern-day manufacturing and documentation. It has to be taking a big hit on the efficiency of your operations.
Russ
-
7. Re: expression - help!
argus08 Sep 29, 2010 9:16 AM (in response to Russ Ward)Thanks all for your time and help.
Yes, these files have become unbelievably complicated. No one else at my company will touch them! In the beginning there was no talk of additional provinces, but over the years new provinces have been added, and there are likely more to come. I have the time now (and the client is T&M, so no budget worries) to tackle cleaning up/reorganizing the files to make them less fearsome to my coworkers! Sigh - it was so much easier with FM7/WW and I could use FM settings files to import condition settings...
@Jeff - the files are already tagged with single conditions, that's the problem. I was hoping to reduce the number of conditions (from 35 to 11), apply multiple conditions as required, and use expressions, but that's looking like it won't work.
@Van - thanks, but it's still not quite right. A paragraph could be unconditional or have any combination of conditions (with the aformentioned exception that cake/pie and apple/orange are mutually exclusive). So a para could be A+cake, A+B+D+cake+orange, B+apple, apple, C, A+B+D, etc.
But I now understand that I should be including, rather than excluding, contrary to what a former coworker deduced from his experimentation a year or so ago. So for now it's easier to include eight with OR statements than to exclude 27 with ANDNOT statements.
I will definitely look into structured FM, it sounds like the perfect solution (thank you, Michael, for the helpful document that showed how).
Can anyone point me to a resource that will help reduce the learning curve?
-
8. Re: expression - help!
Michael Müller-Hillebrand Sep 29, 2010 10:13 AM (in response to argus08)Sigh - it was so much easier with FM7/WW and I could use FM settings files to import condition settings...
As much as I favor a structured, attribute-based solution: You can still work the old way! If »never change a running system« is an argument. But if additional requirements may surface, I would rather clean up the mess and look for a structured solution.
- Michael
-
9. Re: expression - help!
argus08 Sep 29, 2010 10:21 AM (in response to Michael Müller-Hillebrand)I kept the files in FM7.2/Webworks long after we had started using TCS1 for other client projects for just that reason - too scary to change!
I didn't go off on that tangent here, but since you brought it up, the reason I was finally "forced" to migrate was because my old computer kept crashing, I got a new one, installed FM7.2, but the last install version of Webworks we had wasn't compatible and Quadralay didn't support it any longer so I couldn't get the patches that I had on my old computer.
Gotta love progress...
-
10. Re: expression - help!
Reviewer1066 Sep 29, 2010 10:50 AM (in response to argus08)Argus,
As I learned from my experience with multiple conditions and expression, we tend to think of our conditions as divided into name-value pairs. As in:
province (name) can be A, B, C, D (values)
dessert (name) can be cake or pie (values)
fruit (name) can be apple or orange (values)
When I saw that FrameMaker had expressions, I thought they could easily handle multiple conditions. And they could IF FrameMaker allowed the addition of parentheses, as in:
(A or nothing) and (cake or nothing) and (apple or nothing)
But FrameMaker does not allow one to group the conditions like this. To FrameMaker, all conditions are equal; hence, it becomes necessary to add the ANDNOTs.
In a structured document, one can use attributes to assign conditions. In this case, there would be a separate attribute for province, another for dessert, and still another for fruit. This mirrors the way we (or at least I) actually think. In your case, you would filter for:
province = A
dessert = cake
fruit = apple
The element would show only if it had (A or nothing) and (cake or nothing) and (apple or nothing), which I believe is what you want to do.
Van
-
11. Re: expression - help!
argus08 Sep 29, 2010 10:57 AM (in response to Reviewer1066)I've been surfing around for info about migrating to structured FM etc, and now I'm wondering about the connection to RH via TCS1.
Currently I''ve linked to the FM book, and it is set to read the FM condition expression.
Does switching to structured FM change how the RH conversion would work? Does setting attributes negate the need to set a conditional expression in FM? What is the relationship, if any, between conditions and attributes in structured FM?
Sorry for the basic questions, I'm just (obviously) starting my reading, but maybe you kind folks have some quick answers so I know the destination before I head down that path.
-
12. Re: expression - help!
argus08 Sep 29, 2010 10:59 AM (in response to Reviewer1066)PS, thanks Van for further clarifying the problem (in how I expected conditional expressions to work) and the solution (how they really work and how attributes do what I expected the expression to do).
-
13. Re: expression - help!
Russ Ward Oct 1, 2010 5:16 AM (in response to argus08)argus,
I can't address the question about RoboHelp. I can talk a bit about attributes, though. If you choose to use structural attributes, they completely replace native condition tags. Once you have your metadata (ie, conditions) set up, you can either use:
- FrameMaker's built-in "filter by attribute" expressions to produce the output you want
- My AXCM plugin (free) to manage conditions, which allows coloring and filtering based on attribute values.
In short, anything to do with native condition tags would generally not be used any more.
For help learning structured FM, you can take a class, but I really think that the best way is to sit down with the book and start messing around. Structured content and related technologies are best learned from the grassroots, because it is an extensible concept that has no absolute definition. The more you know about how the small pieces fit together, the better off you will be to design a process that works properly for you.Russ
-
14. Re: expression - help!
argus08 Oct 1, 2010 6:15 AM (in response to Russ Ward)Thanks Russ, that helps.
So, to those who use TCS1 with structured FM, how do you handle the conditions? Does the "filter by attribute" expression still count for the RH project settings' "use FM conditional expression"?


