Lynne,
I've sent you an email with the files attached.
Much appreciated :-).
Quintin,
I am also surprised that FrameMaker does not match the pattern
StepItem[SI1], ((NumList[NL2] | Notes | Screenshot | FieldList | IndentedText)* , StepItem[SI1]*)
when it encounters a single StepItem. My comments below include:
- An analysis of the problem.
- A simple fix.
- Suggestions for changing the model
1. Analysis
To summarize the situation, your conversion table correctly recognizes numbered list items and wraps them in StepItem elements, using qualifiers to distinguish top-level lists from sublists. You would like to wrap a sequence of StepItem elements, each possibly followed by sublists or other specific elements in a NumList. Your current expression succeeds in wrapping a NumList when it contains at least two elements, but fails to wrap a single StepItem.
To make the parts of the expression more visible, here is a paraphrase with OtherElts indicating the elements other than other StepItems that you would like to recognize in a list:
StepItem[SI1], ((OtherElts)* , StepItem[SI1]*)
The parenthesized subexpression is a sequence of two parts: the first StepItem in the list and the elements that can follow the first StepItem. Any following elements is a sequence beginning with zero or more OtherElts and then zero or more additional StepItems. Since neither part of the subexpression is required to contain anything, the entire subexpression seems to be satisfied even if there are no matching elements following the first StepItem, but that is not the case.
2. Simple Fix (well, two actually)
Note that the outer set of parentheses is not needed. The original expression seems equivalent to:
StepItem[SI1], (OtherElts)* , StepItem[SI1]*
This version also expresses a sequence beginning with a StepItem, optionally followed by some of the listed other elements, and then optionally by more StepItems. However, the two expressions are not processed the same way. FrameMaker expects something to match the parenthesized subexpression in the original expression and so fails to wrap a single StepItem in a NumList. Removing the unneeded parentheses solves the problem and produces the desired results.
The unneeded parentheses may make the expression somewhat more readable to a person since it groups things that may follow the first StepItem. You can keep them if you add ? at the end to clarify that no additional content is needed in the list:
StepItem[SI1], ((OtherElts)* , StepItem[SI1]*)?
3. Changing the Model
I suggest two changes to the model:
1. Notice that the current versions allows OtherElts after the first StepItem in the list, but not after successive StepItems. To treat all StepItems the same way, consider changing the expression to:
(StepItem[SI1], (OtherElts)*)+
2. Do you view the OtherElts as serving the same purpose in a NumList as a StepItem? Or do you think of them as part of the preceding or following StepItem? My own preference is to put them in the preceding StepItem, so that a NumList is defined to be simply StepItem+ and a StepItem is defined to be either:
(<TEXT>, (OtherElts)*)
or
(Paragraph, (OtherElts)*)
I have seen many models for structured documents that do define sublists as children of the containing list rather than of items in the containing list. Some models allow some of the other elements you've included, particularly notes, to appear between rather than within items. And there are environments in which some of the OtherElts are treated one way and some the other.
--Lynne