Layout

Apparatus, methods, programming for automatically laying out documents

6826727

Abstract

A computerized system lays out document templates represented as a tree of text and shape elements, including variable elements. The user can define a shape element to have a maximize or minimize property in one or more dimensions. The layout makes the minimized dimensions of a shape as small as its contents will allow; and makes the maximized dimensions expand as much as available space allows. Such maximization or minimization can be performed within a horizontal or vertical sequence box. Variable values mapped into variable shape elements can include sub-trees of text and/or shape elements, including shape elements which have the maximize or minimize property, and elements which are themselves variable elements. An anchor point can be fixed at a selected point on a shape, causing the anchor point to remain fixed as the rest of the shape expands or contract. Variable Image elements can maintain the aspect ratios of images mapped into them as those images are scaled. The layout of variable element into which no variable values have been mapped can be suppressed. Both content and attribute values can be mapped into a variable element. Multiple content-mapping rule sets can be used with a given template, and multiple templates can be used with a given content-mapping rule set. The content mapping rules can include data-base queries that vary in response to variable data. Text or shape elements can be defined, respectively, by reference to text models, which defined text attributes, and geometric models, which define shape attributes.


Claims

We claim:

1. A computerized method of laying out a document containing a combination of text and shape elements, said method comprising:

providing a user interface with controls for enabling a user to:

place a sequence box, which has a sequencing axis, in the document;

cause one or more shape elements to be located in the sequence box;

cause a shape element, including one in the sequence box having at least one text or shape element as contents, to have a minimize property in at least one dimension; and

cause a shape element, including one in the sequence box, to have a maximize property in at least one dimension; and

performing an automatic layout process in which elements of the document are laid out onto a 2-dimensional area in which each such element is given a precise position and size, including:

arranging shape elements, if any, placed within the sequence box in a sequence along the sequence box's sequencing axis;

minimizing the size given to any shape element which has the minimize property in a given dimension, including any shape element within the sequence box, by making the element as small as its contents, if any, will allow in the given dimension, over a given length range; and

maximizing the size given to any shape element which has the maximize property in a given dimension by making the element expand to encompass space available in the given dimension, over a given length range, said maximizing including, if the maximized shape element is within the sequence box, expanding it to encompass space available within the sequence box.

2. A method as in claim 1 wherein the shape elements defined within a sequence box are directional sequence boxes each containing a sequence of shape elements arranged along a sequencing axis.

3. A method as in claim 1 wherein the directional sequence box is either a v box, in which the sequencing axis is a vertical axis, or an h box, in which the sequencing axis is a horizontal axis.

4. A method as in claim 1 wherein:

said user interface enables a user to select to cause the directional sequence box to have the maximize or minimize property in a given dimension; and

said layout process maximizes or minimizes the directional sequence box, respectively.

5. A method as in claim 1 wherein:

one or more shape elements within the sequence box are variable elements;

said method includes mapping variable values into said variable values; and

said layout process lays out a given variable element within the sequence box into which a given variable value has been mapped by laying out the given variable value at the position of the variable element within the sequence box.

6. A method as in claim 5 further including:

defining the document as a tree of layout elements, including text and/or shape elements that are variable elements, in which each layout element is a node of said tree;

defining one or more variable values, to be mapped into one or more variables elements located in the document, as sub-trees, each of which includes a plurality of nodes each corresponding to either a text or a shape elements and each of which includes a root node;

said mapping of variable values into variable elements includes grafting the root nodes of sub-tree variable values onto the nodes of the document tree corresponding to the variable elements into which the sub-tree variable values are mapped; and

said layout process includes laying out the elements of the tree formed by the combination of the nodes of the document tree and the nodes of the sub-trees which have been grafted onto the document tree.

7. A method as in claim 6 wherein:

one of said sub-trees contains one or more shape elements which have said maximize or said minimize property; and

said layout process will respond to the grafting of such a sub-tree onto a variable element by causing the lay out of said maximized or minimized shape element within said grafted sub-tree to be maximized or minimized, respectively.

8. A method as in claim 1 wherein:

said interface is a WYSIWYG graphical user interface which allows a user to select the placement of said sequence box and the shape elements within it, including allowing a user to use a pointing device to create, position and size said shape elements; and

said layout process is performed interactively in response to changes made to the document by the user with said graphical user interface, to enable the user to see a screen display of the layout of the document showing any changes the user has just made to the document.

9. A method as in claim 8 wherein the shape elements defined within a sequence box with the WYSIWYG graphical user interface contain directional sequence boxes, so directional sequence boxes are nested within other such sequence boxes.

10. A method as in claim 1 wherein the user interface enables a user to separately select whether or not a shape element within the sequence box has the maximize property in a vertical dimension and whether or not the shape element has said property in a horizontal dimension.

11. A method as in claim 1 wherein the user interface enables a user to separately select whether or not a shape element within the sequence box has the minimize property in a vertical dimension and whether or not the shape element has said property in a horizontal dimension.

12. A method as in claim 1 wherein:

the one or more shape elements placed within the directional sequence box are variable shape elements;

the method maps variable shape values into the document's variable shape elements based on values in a data set using a plurality of content-mapping rules, which rules may not map a shape value into each variable shape element for all possible data sets; and

said layout process will allocate space to lay out a given variable shape element within the sequence box into which a given shape value has been mapped with a lay out of the given shape value at the position of the given variable shape element within the sequence box, but will allocate substantially no space to a variable shape element into which the content-mapping rules have not mapped a shape value.

13. A method as in claim 12 wherein, if one of the shape elements in the sequence box has a maximize property in a dimension parallel to the sequencing axis of the sequence box, and if no space is allocated to a given variable shape element in the sequence box because the content-mapping rules have not mapped a shape value into the given variable shape element, then said layout process will cause the shape element with the maximize property to expand to take up space not occupied by the given variable shape element.

14. A method as in claim 1 wherein if a first shape elements in the sequence box has a maximize property in a dimension parallel to the sequencing axis of the sequence box and second shape element in the sequence box has a minimize property in the same dimension and has contents which can change in size, then said layout process:

causes the size of the minimized shape element to expand and contract in the given dimension as the minimized shape element minimizes around the changing size of its contents; and

causes the size of the maximized shape element to contract and expand, respectively, as the space available in the sequence box changes in response to the changes in size of the minimized shape element.

15. A method as in claim 1 wherein:

the shape elements, including the sequence box, each include boundary lines which define the perimeter of each such shape element;

the user interface includes controls for enabling a user to select to give each such shape element an internal margin of a selected width inside one or more boundary lines of such a shape element; and

the layout process causes elements placed within a sequence box to be placed at a distance from the boundary line of the sequence box having such an internal margin at least equal to the width defined by said internal margin.

16. A method as in claim 1 wherein:

the shape elements, including the sequence box, each include boundary lines which define the perimeter of each such shape element;

the user interface includes controls for enabling a user to select to give each such shape element an external margin of a selected width outside one or more boundary lines of such a shape element; and

the layout process causes shape elements having such an external margin within a sequence box to be placed at a distance from the boundary line of the sequence box or any shape within the sequence box at least equal to the width defined by said external margin.

17. A computerized method of laying out a document containing a combination of text and shape elements, said method comprising:

storing a document template which defines a document as a tree of layout elements, including text and/or shape elements that are variable elements, in which each layout element is a node of said tree;

storing content-mapping rules for mapping variable values into individual variable elements;

enabling a user to define one or more variable values, to be mapped into one or more variables elements located in the document, as sub-trees, each of which includes a plurality of nodes each corresponding to either a text or a shape elements and each of which includes a root node, including enabling a user to select that a shape element on one of said sub-trees have a maximize property in one or more dimensions;

mapping sub-tree values into variable elements, in which a particular sub-tree value is mapped into a particular variable element by grafting the root node of the particular sub-tree onto the tree node of the particular variable element; and

performing a layout process in which elements of the document are laid out onto a 2-dimensional area in which each such element is given a precise position and size, including laying out elements of a tree formed by the combination of the nodes of the template's tree and the nodes of sub-trees which have been grafted onto variable elements of the template's tree, which laying out of elements includes, if a given shape elements in a grafted sub-tree has the maximize attribute in a given dimension, making the given shape element expand to encompass space available in the given dimension, over a given length range, in the location in the document into which the given sub-tree has been mapped.

18. A computerized method of laying out a document containing a combination of text and shape elements, said method comprising:

storing a document template which defines a document as a tree of layout elements, including text and/or shape elements that are variable elements, in which each layout element is a node of said tree;

storing content-mapping rules for mapping variable values into individual variable elements;

enabling a user to define one or more variable values, to be mapped into one or more variables elements located in the document, as sub-trees, each of which includes a plurality of nodes each corresponding to either a text or a shape elements and each of which includes a root node, including enabling a user to select that one or more of said subverts each include a shape element:

into which a variable value can be mapped by said content mapping rules;

which has the minimize property in one or more dimensions; and

mapping sub-tree values into variable elements, in which a particular sub-tree value is mapped into a particular variable element by grafting the root node of the particular sub-tree onto the tree node of the particular variable element; and

performing a layout process in which elements of the document are laid out onto a 2-dimensional area in which each such element is given a precise position and size, including laying out elements of a tree formed by the combination of the nodes of the template's tree and the nodes of sub-trees which have been grafted onto variable elements of the template's tree, which laying out of elements includes, if a given shape element in a grafted sub-tree has the minimize property in a given dimension, making the given shape element as small as the variable value, if any, mapped into the given shape value will allow in the given dimension, over a given length range.

19. A computerized method of laying out a combination of textual and shape elements in a document, said method comprising:

storing a document template which defines a document as a tree of nodes representing layout elements, including text and/or shape elements, at least one of which is a shape elements that contain layout elements within it and at least one of which is a variable text or shape element;

storing content-mapping rules for mapping variable values into individual variable elements;

enabling a user to cause a variable shape element to have either a maximize property or a minimize property;

mapping variable values into variable elements of the template, including mapping shape values into variable shape values; and

performing a layout process in which elements of the document are laid out onto a 2-dimensional area in which each such element is given a precise position and size, including:

minimizing the size given to variable shape elements that have the minimize property in a given dimension, which includes making those shape elements as small as their variable value, if any, will allow in the given dimension, over a given length range;

maximizing the size given to variable shape elements that have the maximize attribute in a given dimension, which includes making those shape elements expand to encompass any space available in the given dimension, over a given length range, within the directional sequence box in which the shape has been placed.

20. A method as in claim 19 wherein:

said method includes enabling a user to define one or more variable values, to be mapped into one or more variables elements located in the document, as sub-trees, each of which includes a plurality of nodes each corresponding to either a text element or a shape element and each of which includes a root node;

said mapping of variable value into variable elements includes grafting the root nodes of sub-tree variable values onto the nodes of the document tree corresponding to the variable elements into which the sub-tree variable values are mapped; and

said layout process includes laying out the elements of the tree formed by the combination of the nodes of the document tree and the nodes of the sub-trees which have been grafted onto the document tree.

21. A computerized method of laying out a combination of text and shape elements in a document, said method comprising:

representing a document which contains text elements and shape elements into which the user can insert one or more layout elements as content;

enabling a user to select that a given one of said shape elements is to have its size in one or more dimensions determined by that given shape element's content;

enabling a user to select that a given one of a plurality of locations on said given shape element is to be an anchor point;

enabling a user to vary the content of said given shape element, with different of said variable contents having different sizes; and

performing a layout process in which elements of the document are laid out onto a 2-dimensional area in which each such element is given a precise position and size, including:

causing the size of the given shape element to be as small as the variable content will allow in the given dimension, over a given length range; and

holding the given shape element's anchor point fixed, so that other portions of the given shape element expand or contract in response to the varying content relative to the fixed location of the anchor point.

22. A computerized method of laying out a combination of text and shape elements in a document, said method comprising:

representing a document template which contains one or more variable elements including one or more variable image elements into which two dimensional images can be mapped;

representing content-mapping rules for mapping variable values into individual variable elements, including mapping images, each having an aspect ratio, into variable image element;

enabling a user to set a value for a size attribute which determines the size of a given variable image element in first of the variable element's two dimensions;

using the content-mapping rules to map variable values, including images, into the variables of the document template; and

performing a layout process in which elements of the document defined by the template and values mapped into the variable elements of the template are laid out onto a 2-dimensional area in which each such element is given a precise position and size, including allocating an image mapped into the given variable image element, and the given variable image element, itself, the size in the first dimension specified by the size attribute value and allocating the image and the given variable image element a size in the second of said two dimensions automatically determined so as to maintain the image's aspect ratio.

23. A computerized method as in claim 22 wherein:

the user can set that the value of said size attribute be a maximize value; and

the layout process causes the size in said first dimension of the given variable image element which has said maximize size attribute value, and the corresponding dimension of an image mapped into the given variable element, to expand to encompass space available in the given dimension, over a given length range, in the location in the document into which the image has been mapped.

24. A computerized method as in claim 22 wherein a user can set either a width dimension of a height dimension to be said first dimension for which said size attribute value is set.

25. A computerized method as in claim 22 wherein the performing of a layout process includes varying the location of the layout of other contents of the document as a function of the amount of space taken up by said given variable image element in said second dimension after the image has been mapped into said variable image element.

26. A computerized method as in claim 25:

further including enabling a user to:

place a sequence box, which has a sequencing axis, in the document;

place in the sequence box a variable image element having said second dimension parallel to said sequencing axis; and

place in the sequence box another shape element having a maximize property in a dimension parallel to said sequencing axis; and

wherein the performing of the layout process includes causing the maximizable shape element to take ups space in the sequence box as a function of the amount of space taken up by said variable image element in said second dimension after the image has been mapped into said variable image element.

27. A computerized method of producing different custom versions of a variable document in response to data contained in different data sets, said method comprising:

representing a document template containing a plurality of layout elements, including text and/or shape elements that are variable elements, into which variable values can be mapped, and non-variable elements, the values of which are statically defined within the template itself;

representing a plurality of content-mapping rules for mapping variable values into each of the template's variable elements, including mapping shape values into variable shape elements, as a function of data from a data set, which content-mapping rules do not always map a shape value into each variable shape element for each possible data set;

using the content-mapping rules to map variable values into the variable elements of the template for a given data set; and

performing a layout process in which elements of the template and the variable values mapped into the template are laid out onto a 2-dimensional area in which each such element is given a precise position and size, including:

allocating space to individual non-variable shape elements in the template;

allocating space to individual variable shape elements into which a shape value has been mapped; and

allocating no space to an individual variable shape element into which the content-mapping rules have not mapped a shape value.

28. A computerized method as in claim 27 wherein the shape values which are mapped into variable shape elements include images.

29. A computerized method as in claim 27 wherein the shape values which are mapped into variable shape elements include sub-trees of layout elements, each of which can include text and shape elements and has as a root element a shape element which contains the other elements of such a sub-tree.

30. A computerized method as in claim 27 wherein the performing of a layout process includes varying the location of the layout of other contents of the document as a function of whether or not space is allocated to a given individual variable shape element.

31. A computerized method as in claim 30:

further including enabling a user to:

place a sequence box, which has a sequencing axis, in the document;

place in the sequence box the given variable shape element; and

place in the sequence box another shape element having a maximize property in a dimension parallel to said sequencing axis; and

wherein the performing of the layout process includes causing the maximizable shape element to take ups space in the sequence box as a function whether or not space is allocated to the given variable shape element.

32. A computerized method of producing different custom versions of a variable document in response to data contained in different data sets, said method comprising:

representing a document template containing a plurality of layout elements, including variable elements, each of which has an associated content type, which defines the type of variable value mapped into the variable element, and one or more associated attributes, the values of which are used to define the properties of the variable element;

representing a plurality of content-mapping rules for mapping variable values of a given type into individual variable elements of the same type;

representing variable values each of which can be mapped into a variable element of a given content type, in which a variable value of a given content type can include:

content of the given content type, which can include text, an image, or shape elements, which can be mapped into a variable element of the given content type; and

values for individual attributes of a variable element the given content type;

using the content-mapping rules to map variable values into variable elements of the template, including:

associating the content of a given variable value mapped into a given variable element with that given variable element; and

assigning any attribute values included in the given variable value to the corresponding attribute of the given variable element; and

performing a layout process in which elements of the template and variable values mapped into the template are laid out onto a 2-dimensional area in which each such element is given an appearance, including position and size, in which the appearance of a variable elements is defined as a function of both the content and attribute values, if any, of the variable value mapped into the variable element.

33. A computerized method as in claim 32 wherein:

the representation of the document template includes definitions of variable elements contained in the template, which definitions assigns static values to individual attributes of such variable elements; and

the layout process causes the appearance, position, and size of a given variable element to vary as a function of both:

any attribute values contained in a given variable value mapped into the given variable element; and

any static attribute values assigned to the given variable element in said template for which no corresponding attribute value has been included in the given variable value.

34. A computerized method as in claim 32 wherein:

variable elements of one or more of said content types:

have variable values including text mapped into such variable elements; and

have an associated language attribute, the value of which indicates the language of text mapped into such a variable elements;

individual variable values include text and a value for said language attribute which indicates the language of the text; and

the layout process includes responding to the mapping into a given variable element of a variable value which includes given text and a given language attribute value by selecting from a plurality of hyphenation rule sets, each representing hyphenation rules applicable to different languages, a hyphenation rule set corresponding to the language indicated by the given language attribute value, and using the selected hyphenation rule set to hyphenate the given text in said layout process.

35. A computerized method of generating a different version of a variable document for different data sets, each of which includes one or more corresponding fields, the method comprising:

storing a document template containing a plurality of text and shape elements, including one or more variable elements into which variable values are mapped;

storing a plurality of variable values in a data base;

storing a set of user-defined content-mapping rules, each for mapping a variable value into one or more corresponding variable elements in the template as a function of the value of one or more data set fields, including one or more variable-query content-mapping rules, each of which defines a data-base query which varies as a function of the value of one or more data set fields;

generating a given version of the variable document for a give data set by using the content-mapping rules to map variable values into the variable elements of the template, including:

generating an instance of the variable query defined by each variable-query content-mapping rules as a function of the value of one or more fields in the given data set;

sending each such variable query to the data base; and

mapping the variable value fetched by the data base in response to each variable query into the one or more variable elements corresponding to the individual variable-query content-mapping rule which defined that query; and

performing a layout process in which elements of the template and variable values mapped into the template are laid out onto a 2-dimensional area in which each such element is given a precise position and size.

36. A computerized method as in claim 35 wherein:

said variable queries are each represented in the form of an SQL query template with one or more variable symbols, each of which is defined as a function of one or more of said data set fields; and

the generation of a given instance of the variable query includes using the values of one or more fields in the given data set to define a value corresponding to each variable symbol in the query template, and replacing each such variable symbol with its corresponding value.

37. A computerized method as in claim 35 wherein:

said data base is a media asset management data base in which:

digital content files are stored;

one or more metadata fields are associated with each such content file; and

the data base can fetch a content file based on a query containing one or more metadata fields and values for those fields;

said said generated instances of the variable queries contains metadata fields and values for those fields contained in the data base; and

the variable value selected by said variable query are derived from content files fetched from the media asset management data base.

38. A computer-readable medium, having computer executable-instructions for performing a method of laying out a document containing a combination of text and shape elements, said method comprising:

providing a user interface with controls for enabling a user to:

place a sequence box, which has a sequencing axis, in the document;

cause one or more shape elements to be located in the sequence box;

cause a shape element, including one i the sequence box having at least one text or shape element as contents, to have a minimize property in at least one dimension; and

cause a shape element, including one in the sequence box, to have a maximize property in at least one dimension; and

performing an automatic layout process in which elements of the document are laid out onto a 2-dimensional area in which each such element is given a precise position and size, including:

arranging shape elements, if any, placed within the sequence box in a sequence along the sequence box's sequencing axis;

minimizing the size given to any shape element which has the minimize perperty in a given dimension, including any shape element as small as its contents, if any, will allow in the given dimension, over a given length range; and

maximizing the size given to any shape element which has the maximize property in a given dimension by making the element expand to emcompass space available in the given dimension, over a given length range, said maximizing including, inf the maximized shape element is within the sequence box, expanding it to encompass space available withing the sequence box.

39. A computer readable medium as in claim 38 wherein the shape elements defined within a sequence box are directional sequence boxes each containing a sequence of shape elements arranged along a sequencing axis.

40. A computer readable medium as in claim 38 wherein the directional sequence box is either a v box, in which the sequencing axis is a vertical axis, or an h box, in which the sequencing axis is a horizontal axis.

41. A computer readable medium as in claim 38 wherein:

said user interface enables a user to select to cause the directional sequence box to have the maximize or minimize property in a given dimension; and

said layout process maximizes or minimizes the directional sequence box, respectively.

42. A computer readable medium as in claim 38 wherein:

one or more shape elements within the sequence box are variable elements;

said method includes mapping variable values into said variable values; and

said layout process lays out a given variable element within the sequence box into which a given variable value has been mapped by laying out the given variable value at the position of the variable element within the sequence box.

43. A computer readable medium as in claim 42 further including:

defining the document as a tree of layout elements, including text and/or shape elements that are variable elements, in which each layout element is a node of said tree;

defining one or more variable values, to be mapped into one or more variables elements located in the document, as sub-trees, each of which includes a plurality of nodes each corresponding to either a text or a shape elements and each of which includes a root node;

said mapping of variable values into variable elements includes grafting the root nodes of sub-tree variable values onto the nodes of the document tree corresponding to the variable elements into which the sub-tree variable values are mapped; and

said layout process includes laying out the elements of the tree formed by the combination of the nodes of the document tree and the nodes of the sub-trees which have been grafted onto the document tree.

44. A computer readable medium as in claim 43 wherein:

one of said sub-trees contains one or more shape element which have said maximize or said minimize property; and

said sayout process will respond to the grafting of such sub-tree onto a variable element by causing the lay out of said maximized or minimized shape element within said grafted sub-tree to be maximized or minimized, respectively.

45. A computer readable medium as in claim 38 wherein:

said interface is a WYSIWYG graphical user interface which allows a user to select the placement of said sequence box and the shape elements within it, including allowing a user to use a pointing device to create, position and size said shape elements; and

said layout process is performed interactively in response to changes made to the document by the user with said graphical user interface, to enable the user to see a screen display of the layout of the document showing any changes the user has just made to the document.

46. A computer readable medium as in claim 45 wherein the shape elements defined within a sequence box with the WYSIWYG graphical user interface contain directional sequence boxes, so directional sequence boxes are nested within other such sequence boxes.

47. A computer readable medium as in claim 38 wherein the user interface enables a user to separately select whether or not a shape element within the sequence box has a maximize property in a vertical dimension and whether or not the shape element has said property in a horizontal dimension.

48. A computer readable medium as in claim 38 wherein the user interface enables a user to separately select whether or not a shape element within the sequence box has the minimize property in a vertical dimension and whether or not the shape element has said property in a horizontal dimension.

49. a computer readable medium as in claim 38 wherein:

the one or more shape elements placed within the directional sequence box are variable shape elements;

the method maps variable shape value into the document's variable shape elements based on values in a data set using a plurality of content-mapping rules, which rules may not map a shape value into each variable shape element for all possible data sets; and

said layout process will allocate space to layout a given variable shape element within the sequence box into which a given shape value has been mapped with a lay out of the given shape value at the position of the given variable shape element within the sequence box, but will allocate substantially no space to a variable shape element into which the content-mapping rules have not mapped a shape value.

50. A computer readable medium as in claim 49 wherein, if one of the shape elements in the sequence box has a maximize property in a dimension parallel to the sequencing axis of the sequence box, and if no space is allocated to a given variable shape element in the sequence box because the content-mapping rules have not mapped a shape value into the given variable shape element, then said layout process will cause the shape element with the maximize property to expand to take up space not occupied by the given variable shape element.

51. A computer readable medium as in claim 38 wherein if a first shape elements in a sequence box has a maximize property in a dimension parallel to the sequencing axis of the sequence box and second shape element in the sequence box has a minimize property in the same dimension and has contents which can change in size, then said layout process:

causes the size of the minimized shape element to expand and contract in the given dimension as the minimized shape element minimizes around the charging size of its contents; and

causes the size of the maximized shape element to contract and expand, respectively, as the space available in the sequence box changes in response to the changes in size of the minimized shape element.

52. A computer readable medium as in claim 38 wherein:

the shape elements, including the sequence box, each include boundary lines which define the perimeter of each such shape element;

the user interface includes controls for enabling a user to select to give each such shape element and internal margin of a selected width inside one or more boundary lines of such a shape element; and

the layout process causes elements placed within a sequence box to be placed at a distance from the boundary line of the sequence box having such an internal margin at least equal to the width defined by said internal margin.

53. A computer readable medium as in claim 38 wherein:

the shape elements, including the sequence box, each include boundary lines which define the perimeter of each such shape element;

the user interface includes controls for enabling a user to select to give each such shape element an external margin of a selected width outside one or more boundary lines of such a shape element; and

the layout process causes shape elements having such an external margin within a sequence box to be placed at a distance from the boundary line of the sequence box or any shape within the sequence box at least equal to the width defined by said external margin.

54. A computer-readable medium, having computer executable-instructions for performing a method of laying out a document containing a combination of text and shape elements, said method comprising:

storing a document template which defines a document as a tree of layout elements, including text and/or shape elements that are variable elements, in which each layout element is a node of said tree;

storing content-mapping rules for mapping variable values into individual variable elements;

enabling a user to define one or more variable values, to be mapped into one or more variables elements located in the document, as sub-trees, each of which includes a plurality of nodes each corresponding to either a text or a shape elements and each of which includes a root node, including enabling user to select that a shape element on one of said sub-trees have a maximize property in one or more dimensions;

mapping sub-tree values into variable elements, in which a particular sub-tree value is mapped into a particular variable element by grafting the root node of the particular sub-tree onto the tree node of the particular variable element; and

performing a layout process in which elements of the document are laid out onto a 2-dimensional area in which each such element is given a precise position and size, including laying out elements of a tree formed by the combination of the nodes of the template's tree and the nodes of sub-trees which have been grafted onto variable elements of the template's tree, which laying out of elements includes, if a given shape elements in a grafted subtree has the maximize attribute in a given dimension, making the given shape element expand to encompass space available in the given dimension, over a given length range, in the location in the document into which the given sub-tree has been mapped.

55. A computer-readable medium, having computer executable-instructions for performing a method of laying out a document containing a combination of text and shape elements, said method comprising:

storing a document template which defines a document as a tree of layout elements, including text and/or shape elements that are variable elements, in which each layout element is a node of said tree;

storing content-mapping rules for mapping variable values into individual variable elements;

enableing a user to define one or more variable values, to be mapped into one or more variables elements located in the document, as sub-trees, each of which includes a plurality of nodes each corresponding to either a text or a shape elements and each of which includes a root node, including enabling a user to select that one or more of said subtrees each include a shape element:

into which a variable value can be mapped by said content mapping rules;

which has the minimize property in one or more dimensions; and

mapping sub-tree values into variable elements, in which a particular sub-tree value is mapped into a particular variable element by grafting the root node of the particular sub-tree onto the tree node of the particular variable element; and

performing a layout process in which elements of the document are laid out onto a 2-dimensional area in which each such element is given a precise position and size, including laying out elements of a tree formed by the combination of the nodes of the template's tree and the nodes of sub-trees which have been grafted onto variable elements of the template's tree, which laying out of elements includes, if a given shape element in a grafted subtree has the minimize property in a given dimension, making the given shape element as small as the variable value, if any, mapped into the given shape value will allow in the given dimension, over a given length range.

56. A computer-readable medium, having computer executable-instructions for performing a method of laying out a combination of textual and shape elements in a document, said method comprising:

storing a document template which defines a docuemtn as a tree of nodes representing layout elements, including text and/or shape elements, at least one of which is ashape elements that contain layout elements within it and at least one of which is a variable text or shape element;

storing content-mapping rules for mapping variable values into individual variable elements;

enabling a user to cause a variable shape element to have either a maximum property or a minimize property;

mapping variable values into variable elements of the template, including mapping shape values into variable shape values; and

performing a layout process in which elements of the document are laid out onto a 2-dimensional area in which each such element is given a precise position and size, including:

minimizing the size given to variable shape elementsthat have the minimize property in a given dimension, which includes making those shape elements as small as their variable value, if any, will allow in the given dimension, over a given length range;

maximizing the size given to variable shape elementsthat have the maximize attribute in a given dimension, which includes making those shape elements expand to encompass any space available in the given dimension, over a given leigth range, within the directional sequence box in which the shape has been placed.

57. A computer readable medium as in claim 56 wherein:

said method includes enabling a user to define one or more variable values, to be mapped into one or more variables elements located in the document, as sub-trees, each of which includes a plurality of nodes each corresponding to either a text element or a shape element and each of which includes a root node;

said mapping of variable value into variable elements includes grafting the root nodes of sub-tree variable value onto the nodes of the document tree corresponding to the variable elements into which the sub-tree variable values are mapped; and

said layout process includes laying out the elements of the tree formed by the combination of the nodes of the document tree and the nodes of the sub-trees which have been grafted onto the document tree.

58. A computer-readable medium, having computer executable-instructions for forming a method of laying out a combination of text and shape elements in a document, said method comprising:

representing a document which contains text elements and shape elements into which the user can insert one or more layout elements as content;

enabling a user to select that a given one of said shape elements is to have its size in one or more dimensions determined by that given shape element's content;

enabling a user to select that a given one of a plurality of locations on said given shape element is to be an anchor point;

enabling user to vary the content of said given shape element, with different of said variable contents having different sizes; and

performing a layout process in which elements of the document are laid out onto a 2-dimensional area in which each such element is given a precise position and size, including:

causing the size of the given shape element to be as small as the variable content will allow in the given dimension, over a given length range; and

holding the given shape element's anchor point fixed, so that other portions of the given shape element expand or contract in response to the varying content relative to the fixed location of the anchor point.

59. A computer-readable medium, having computer executable-instructions for performing a method of laying out a combination of text and shape elements in a document, said method comprising:

representing a document template which contains one or more variable elements including one or more variable image elements into which two dimensional images can be mapped;

representing content-mapping rules for mapping variable values into individual variable elements, including mapping imates, each having an aspect ratio, into variable image element;

enabling a user to set a value for a size attribute which determines the size of a given variable image element in first of the variable element's two dimensions;

using the content-mapping rules to map variable values, including images, into the variables of the document template; and

performing a layout process in which elements of the document defined by the template and values mapped into the variable elements of the template are laid out onto a 2-dimensional area in which each such element is given a precise position and size, including allocating an image mapped into the given variable image element, and given variable image element, itself, the size in the first dimension specified by the size attribute value and allocating the image and the given variable image element a size in the second of said two dimensions automatically determined so as to maintain the image's aspect ratio.

60. A computer readable medium as claim 59 wherein:

the user can set that the value of said size attribute be a maximize value; and

the layout process causes the size in said first dimension of the given variable image element which has said maximize size attribute value, and the corresponding dimension of an image mapped into the given variable element, to expand to encompass space available in the given dimension, over a given length range, in the location in the document into which the image has been mapped.

61. A computer readable medium as in claim 59 wherein a user can set either a width dimension of a height dimension to be said first dimension for which said size attribute value is set.

62. A computer readable medium as in claim 59 wherein the performing of a layout process includes varying the location of the layout of other contents of the document as a function of the amount of space taken up by said given variable image element in said second dimension after the image has been mapped into said variable image element.

63. A computer medium as in claim 62:

further including enabling a user to:

place a sequence box, which has a sequencing axis, in the document;

place in the sequence box a variable image element having said second dimension parallel to said sequencing axis; and

place in the sequence box another shape element having a maximize property in a dimension parallel to said sequencing axis; and

wherein the performing of the layout process includes causing the maximizable shape element to take ups space in the sequence box as a function of the amount of space taken up by said variable image element in said second dimension after the image has been mapped into said variable image element.

64. A computer-readable medium, having computer executable-instructions for performing a method of producing different custom versions of a variable document in response to data contained in different data sets, said method comprising:

representing a document template containing a plurality of layout elements, including text and/or shape elements that are variable elements, into which variable values can be mapped, and non-variable elements, the values of which are statically defined within the template itself;

representing a plurality of content-mapping rules for mapping variable values into each of the template's variable elements, including mapping shape values into variable shape elements, as a function of data from a data set, which content-mapping rules do not always map a shape value into each variable shape element for each possible data set;

using the content-mapping rules to map variable values into the variable elements of the templates for a given data set; and

performing a layout process in which elements of the template and the variable values mapped into the template are laid out onto a 2-dimensional area in which each such element is given a precise position and size, including:

allocating space to individual non-variable shape elements in the template;

allocating space to individual variable shape elements into which a shape value has been mapped; and

allocating no space to an individual variable shape element into which the content-mapping rules have not mapped a shape value.

65. A computer readable medium as in claim 64 wherein the shape values which are mapped into variable shape elements include images.

66. A computer readable medium as in claim 64 wherein the shape values which are mapped into variable shape elements include sub-trees of layout elements, each of which can include text and shape elements and has a root element a shape element which contains the other elements of such a sub-tree.

67. A computer readable medium as in claim 64 wherein the performing of a layout process includes varying the location of the layout of other contents of the document as a function of whether or not space is allocated to a given individual variable shape element.

68. A computer readable medium as in claim 67:

further including enabling a user to:

place a sequence box, which has a sequencing axis, in the document;

place in the sequence box the given variable shape element; and

place in the sequence box another shape element having a maximize property in a dimension parallel to said sequencing axis; and

wherein the performing of the layout process includes causing the maximizable shape element to take ups space in the sequence box as a function whether or not space is allocated to the given variable shape element.

69. A computer-readable medium, having computer executable-instructions for performing a method of producing different custom versions of a variable document in response to data contained in different data sets, said method comprising:

representing a document template containing a plurality of layout elements, including variable elements, each of which has an associated content type, which defines the type of variable value mapped into the variable element, and one or more associated attributes, the values of which are used to define the properties of the variable element;

representing a plurality of content-mapping rules for mapping variable values of a given type into individual variable elements of the same type;

representing variable values each of which can be mapped into a variable element of a given content type, in which a variable value of a given content type can include:

content of the given content type, which can include text, an image, or shape elements, which can be mapped into a variable element of the given content type; and

values for individual attributes of a variable element the given content type;

using the content-mapping rules to map variable values into variable elements of the template, including:

associating the content of a given variable value mapped into a given variable element with that given variable element; and

assigning any attribute values included in the given variable value to the corresponding attribute of the given variable element; and

performing a layout process in which elements of the template and variable values mapped into the template are laid out onto a 2-dimensional area in which each such element is given an appearance, including position and size, in which the appearance of a variable elements is defined as a function of both the content and attribute values, if any, of the variable value mapped into the variable element.

70. A computer readable medium as in claim 69 wherein:

the representation of the document template includes definitions of variable elements contained in the template, which definitions assigns static values to individual attributes of such variable elements; and

the layout process causes the appearance, position, and size of a given variable element to vary as a function of both:

any attribute values contained in a given variable value mapped into the given variable element; and

any static attribute values assigned to the given variable element in said template for which no corresponding attribute value has been included in the given variable value.

71. A computer readable medium as in claim 69 wherein:

variable elements of one or more of said content types:

have variable values including text mapped into such variable elements; and

have an associated language attribute, the value of which indicates the language of text mapped into such a variable elements;

individual variable values include text and a value for said language attribute which indicates the language of the text; and

the layout process includes responding to the mapping into a given variable element of a variable value which includes given text and a given language attribute value by selecting from a plurality of hyphenation rule sets, each representing hyphenation rules applicable to different languages, a hyphenation rule set corresponding to the language indicated by the given language attribute value, and using the selected hyphenation rule set to hyphenate the given text in said layout process.

72. A computer-readable medium, having computer executable-instructions for performing a method of generating a different version of a variable document for different data sets, each of which includes one or more corresponding fields, the method comprising:

storing a document template containing a plurality of text and shape elements, including one or more variable elements into which variable values are mapped;

storing a plurality of variable values in a data base;

storing a set of user-defined content-mapping rules, each for mapping a variable value into one or more corresponding variable elements in the template as a function of the value of one or more data set fields, including one or more variable-query content-mapping rules, each of which defines a data-base query which varies as a function of the value of one or more data set fields;

generating a given version of the variable document for a give data set by using the content-mapping rules to map variable values into the variable elements of the template, including:

generating an instance of the variable query defined by each variable-query content-mapping rules as a function of the value of one or more fields in the given data set;

sending each such variable query to the data base; and

mapping the variable value fetched by the data base in response to each variable query into the one or more variable elements corresponding to the individual variable-query content-mapping rule which defined that query; and

performing a layout process in which elements of the template and variable values mapped into the template are laid out onto a 2-dimensional area in which each such element is given a precise position and size.

73. A computer readable medium as in claim 72 wherein:

said variable queries are each represented in the form of an SQL query template with one or more variable symbols, each of which is defined as a function of one or more of said data set fields; and

the generation of a given instance of the variable query includes using the values of one or more fields in the given data set to define a value corresponding to each variable symbol in the query template, and replacing each such variable symbol with its corresponding value.

74. A computer readable medium as in claim 72 wherein:

said data base is a media asset management data base in which:

digital content files are stored;

one or more metadata fields are associated with each such content file; and

the data base can fetch a content file based on a query containing one or more metadata fields and values for those fields;

said said generated instances of the variable queries contains metadata fields and values for those fields contained in the data base; and

the variable value selected by said variable query are derived from content files fetched from the media asset management data base.


Description

FIELD OF THE INVENTION

The present invention relates to apparatuses, methods, and programming for automatically laying out documents. Many of the invention's aspects relate to such automatic document layout in the context of variable data publishing.

BACKGROUND OF THE INVENTION

Programs have been created in the prior art for laying out documents, such as the pages of books, magazines, brochures, or even individual pages created in a word processor document. Most such programs are also capable of laying out an image of a page, interactively, on a computer screen. Some such programs define a document as a collection of text and shape elements. Such text elements each have text attributes, such as font, size, indentation, etc. Such shape elements include image elements, graphic shapes, and text containers, and can have shape attributes, such as position, size, color, border characteristics, fill color, etc. In many such systems, a user can define a template which includes various text and shape elements, such as the template of a newsletter, a set of related brochures, or a given type of letter, and then users can insert individual content into all, or some of, the template's elements as desired. When the system lays out the document, each element will be displayed with its associated attributes.

In such systems, as the content placed into various elements of a template changes, those elements often change in size. Such size changes can make the template look inappropriate. In systems where the user is entering the variable content manually with a mouse or keyboard, or in which a user has time to review each document for proper layout, it is often acceptable to have a user change the layout to account for such size changes. Nevertheless, even in such applications it would be desirable to have a layout system which can more appropriately automatically adjust to changes in the size of content placed into template elements.

Furthermore, there are many automatic layout applications in which it is quite impractical to have a user individually change the layout of each document. This is particularly true in variable data publishing, in which many different versions of a document are created automatically in response to different data records. FIG. 1 provides graphic representation of variable data publishing. In its highly simplified example, a document 2 is created from a document template 3. The template has variable elements 4, 5, 6, and 7 into which variable values 8, 9, 10, and 11 can be automatically mapped, depending upon the individual record 12 in the Profile Data Source 14 for which the document 2 is being produced. In the example of FIG. 1, the variable values 8, 9, and 10 are simple text (i.e., character string) values taken directly from the values of fields 15, 16, and 17 of a record 12A in the profile data source 14. The variable value 11 is an image contained in an image file 18 selected as a function of the "Sport" field 17 in the profile data source.

Because variable data publishing often maps values which differ in size into variable elements, the appearance of a variable document can vary greatly. Furthermore, for some records, data may be missing for certain variable elements. But since variable data publishing often creates hundreds, or thousands, of different versions of a given document, it would be very costly to have each version's layout individually reviewed and adjusted by a person to compensate for changes in the size of its variable values.

Also, although the relatively simple form of variable data illustrated in FIG. 1 can be very useful, it would be desirable to create a variable data publishing system which provides much greater flexibility in terms of possible content, and yet still tends to do a good job of automatically laying out the resulting documents in a way which is attractive to the eye. For example, it would be desirable to allow a given template to be used to communicate about a greater number of topics, using a greater range of possible variable content, and still have a high likelihood that the automatic layout of the document will look appropriate.

A few prior art systems have allowed the variable values which can be mapped into a template to be comprised of a sub-tree of text and/or shape elements. This greatly increases the flexibility of individual templates, but, if such sub-templates are allowed to vary in size, their use can increase the difficulty of achieving desirable layout. Similarly, it would be desirable to have a system which allows content data, including variable sub-templates, to be used in different templates and still look appropriate given the different size and shape available for it in such different locations.

Another issue in variable data publishing is that it often takes a lot of effort to define the rules used for mapping variable content into the variable elements of a template. In many prior art systems, defining rules to map variable values into a template often requires knowledge of data bases, programming scripts, and data base query languages. These are often different skill sets than those had by many of the graphic artists who are best at designing document templates.

Also it would be desirable in layout systems, including variable data publishing ones, to be able to have a system which makes it easier to create shape elements Which have a matching or coordinated appearance.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide a system for laying out documents that can automatically adjust the layout process in a flexible and often appropriate manner to changes in the size of the contents placed inside document shape elements.

It is another object of the invention to provide such a system for laying out documents which makes it easy to create flexible document templates for use with such a system.

It is yet another object of the present invention to provide a variable data publishing system which provides flexible automatic adjustment in response to changes in the availability, nature, and/or size of variable data which is placed into variable elements of a document template.

It is still another object of the present invention to provide a variable data publishing system which allows more than just the contents of a variable element in a document template to change in response to the mapping of different variable values into those variable elements.

It is yet another object of the present invention to provide greater flexibility in the way in which a variable data publishing system allows document templates and content-mapping rules to be used together.

It is still another object of the present invention to provide greater flexibility in the way in which variable data can be selected for use in variable data publishing.

It is yet another object of the present invention to provide a layout system which allows greater ease and uniformity in the way in which the attributes of both text and shape elements can be defined.

The invention is most accurately described in the claims at the end of this specification, and those claims should be considered part of this Summary Of The Invention. However, to prevent lengthy repetition, the wording of the claims has not been repeated nor closely paraphrased in this section. Instead the following brief summary has been provided here to give a quick overview of the major different aspects of the invention and some of their uses. Since it is impossible to make such a brief overview as accurate as the detailed description contained in the claims, the following summary should not be used to limit the claims in any way. Furthermore, in the interest of brevity, many significant aspects of the invention recited in the claims are not mentioned in this summary, and the failure to mention such aspects here should not in any way be construed as an indication of their lack of importance. Finally, the brief description of the use of each aspect of the invention provided in this section is not, in any way, meant to provide a complete description of that aspect's use, but instead is intended to give the reader a quick indication that each such aspect of the invention has a useful purpose.

According to one aspect of the present invention, a computerized system can lay out a document containing a combination of text and/or shape elements located within a sequence box, such as a vertical group box or a horizontal group box. A user interface enables a user to define such a sequence box, and one or more shape elements in it, including shapes having a minimize and/or maximize property in at least one dimension. The system automatically lays out elements of the document. This includes: a) arranging shape elements placed within the sequence box along the sequence box's sequencing axis; b) minimizing the size given to any shape element which has the minimize property in a given dimension by tending to make the element as small as its contents, if any, will allow in the given dimension; and c) maximizing the size given to any shape element which has the maximize property in a given dimension by tending to make the element expand to encompass space available within the sequence box in the given dimension. This ability to automatically arrange shape elements which can both expand and contract within in a sequence box provides a useful tool for automatically arranging and sizing document elements in response to changes in variable data, particularly which such sequence boxes are nested.

According to another aspect of the invention, a computerized system can lay out a document template represented as a tree-shaped data structure having nodes corresponding to text and/or shape elements, some of which are variable elements. Content-mapping rules map user defined variable values into individual variable elements. The variable values can be sub-trees of text and/or shape element nodes. The user can give a shape element in such a sub-tree a maximize property in one or more dimensions. When a sub-tree value is mapped into a variable element, the root node of the sub-tree is grafted onto the variable element's node in the template's tree structure. The system lays out elements of the tree formed by the combination of the template's tree and sub-trees which have been grafted onto it. If a shape element in such a sub-tree has the maximize attribute in a given dimension, the layout tends to make the given shape element expand to encompass space available in the given dimension, in the location in the document into which the given sub-tree has been mapped. This allows sub-template variable values mapped into locations with differing available space to automatically adjust all, or part of their size, so as to more appropriately fit into such space.

According to a similar aspect of the invention, the user can define a sub-tree variable value to include a given shape into which a variable value can be mapped by content mapping rules, and can select that this given shape have a minimize property in at least one dimension. This will cause the layout of the document to tend to make the given shape element as small as the variable value, if any, mapped into the given shape value will allow in the given dimension. This allows the size of all, or a part of, a sub-template to automatically adjust to the size of its variable content.

According to another aspect of the invention, a computerized system can lay out a document template represented as a tree-shaped data structure comprised of text and/or shape nodes, in which the user can define a node of the tree to be a variable shape element having the maximize or minimize property in one or more dimensions. The layout of such document templates minimizes the size given to variable shape elements that have the minimize property and maximizes the size given to variable shape elements that have the maximize property. This ability to cause a variable shape element's size to be defined either by the space around it or by the size of its own contents increases the ability of a template to make appropriate use of space as the size of its variable contents change.

According to still another aspect of the invention, a computerized system enables a user to select, as an anchor point, one of a plurality of locations on a given shape element within a document, and to vary the size of the contents of the given shape element. When the system lays out the document it can cause the size of the given shape element to be as small as the variable content will allow in one or more dimensions, while holding the given shape element's anchor point fixed, so that other portions of the given shape element expand or contract in response to the varying size of the shape's content relative to the fixed anchor point. This ability to control the direction in which shapes with variable contents expand and contract increases the ability of a template to maintain desired spatial relationships despite such size changes.

According to yet another aspect of the invention, a computerized system can lay out a document including variable image elements into which two dimensional images can be mapped. The system lets a user select a size attribute for a given variable image element in a first dimensions. When the system lays out the document, it gives the variable image element a size in the first dimension specified by the selected size attribute value and can automatically give the image a size in a second dimension which maintain the image's aspect ratio. This allows images mapped into a variable document to be automatically scaled to a desired size without being distorted.

According to still another aspect of the invention, a computerized system, which lays out different custom versions of a variable document in response to data contained in different data sets, can automatically suppress the layout of variable shape elements into which content-mapping rules have failed to map variable shape values for a given data set. This can prevent unwanted space gaps from appearing in the layout of variable documents.

According to another aspect of the invention, the variable elements used in a variable data publishing system each have an associated content type and an associated set of attribute-value pairs. A variable element's content type defines the type of variable value which can be mapped into the variable element. Such content types can include text, image, or template sub-tree. The variable element's attribute-value pairs are used to define the properties of the variable element. In the case of text elements such attributes can include font, size, and color. In the case of shape elements, they can include size, position, and color. The variable values which can be mapped into a variable element of a given content type may include both content of the given content type and values for individual attributes of the variable element. The layout causes the appearance given to a variable element to vary as a function of both the content and attribute values, if any, of the variable value that has been mapped into the variable element. This increases the flexibility of a variable data publishing system by enabling variable values to not only change the content of variable elements, but also their attributes.

According to still another aspect of the invention, a computerized system lays out a variable document, represented as a template of layout elements, some of which are variable elements. The system allows a user to select, from among a plurality of stored content-mapping rule sets, a selected set of such rules which are used to map variable values into the variable elements of the template for a given layout. This provides much greater flexibility in the use of a given template, since it allows a template to be used with different rule sets, such as, for example, rule sets which obtain data from different data bases or rule sets which use different selection criteria.

According to yet another aspect of the invention, a computerized system lays out different custom versions of different variable documents in response to data contained in different data sets. The system stores a plurality of document templates, each including a corresponding set of one or more variable elements, and it stores a set of content-mapping rules for mapping variable values into the corresponding set of variable elements. The system enables a user to select a template from the plurality of stored templates, then uses the content-mapping rule set to map variable values into the variable elements in the selected template, and then lays out the selected template with the variable values that have been mapped into it. This allows the effort which has gone into creating a rule set to be used with multiple templates, such as, for example, templates for different forms of a given document or templates for different documents in a given transaction.

The ability to store templates and rule sets separately indicated in these last two aspects of the invention makes it easier for people will skills in graphic arts to design templates and those with skills in data base technology to create rule sets.

According to still another aspect of the invention, a computerized system lays out different versions of a variable document template for different data sets that include corresponding fields. The content-mapping rules stored by the system include variable-query content-mapping rules, each of which defines a data-base query that varies as a function of the value of one or more data set fields. When the system generates a given version of the variable document for a give data set, it generates an instance of the variable query defined by each variable-query content-mapping rule as a function of the value of one or more fields in the given data set. It then sends each such variable query to a corresponding data base. It maps the variable value fetched by the data base in response to each variable query into the one or more variable elements corresponding to the individual variable-query content-mapping rule which defined that query. Then it lays out the variable document with such variable values. Such variable-query content-mapping rules increase the flexibility with which variable values can be mapped into a variable document, since such queries allow variable values to be selected as a more complex function of the data set, or record, for which each variable document is being produced.

According to yet another aspect of the invention, a computerized system produces a visual representation of a document having text and shape elements. The system stores user-defined models which can include both text and geometric models. Each text model defines attributes values for any text element defined by reference to it. Such text attributes can include, for example, font, size, and color. Each geometric model defines attribute values for any shape element defined by reference to it. Such shape attributes can include, for example, size, position, border-type, and color. The system represents the document as a tree of text and shape elements in which each text or shape element can have attributes values associated with it by referencing one of the user-defined text or geometric models, respectively. The system lays out each element of the document with an appearance, position, and size determined as a function of attribute values associated with the element, including attribute values, if any, associated with an element by reference to one of the user-defined models. This allows users to define shape styles in a manner similar to that which other layout programs have allowed users to define text styles, and, thus, increases the ease with which a template designer can create shape elements which share a common look.

The computer systems described in the summary above can be claimed in the form of computer apparatus, in the form of computer programming stored in a computer readable memory, and in the form of computerized methods. It should also be understood, that other aspects of the invention include combining individual aspects of the invention described above.

DESCRIPTION OF THE DRAWINGS

These and other aspects of the present invention will become more evident upon reading the following description of the preferred embodiment in conjunction with the accompanying drawings, in which:

FIG. 1 is a schematic representation of variable data publishing, a technique that has been known in the prior art;

FIG. 2 is a schematic block diagram of a system for performing variable data publishing that embodies many aspects of the present invention;

FIG. 3 is a graphical user interface window produced by the designer program shown in FIG. 2;

FIG. 4 is the partial representation of the XML contained within one template file of the type shown in FIG. 2;

FIG. 5 is a partial representation of one TSL file of the type shown in FIG. 2;

FIG. 6 is a graphical user interface window produced by the producer program shown in FIG. 2;

FIG. 7 is a partial representation of the XML contained in one area template file of the type shown in FIG. 2;

FIG. 8 shows a graphical user interface window of the designer program, similar to that shown in FIG. 3, after an area template corresponding to that partially shown in FIG. 7 is mapped into the template displayed by such designer window;

FIGS. 9 and 10 display the form and flex tabs, respectively, of the Properties Editor dialog box of the designer program's graphical user interface window;

FIGS. 11 and 12 display how a user can set the value of the flex-height-behavior attribute value by using a drop-down list box;

FIGS. 13 and 14 are graphical user interface windows of the designer program that show how changing the flex-height-behavior attribute of a vertical box from a minimized to a maximized value can change the layout of a template;

FIG. 15 illustrates how various flex height and flex-width-behavior attribute values affect the appearance of image elements;

FIGS. 16 and 17 are screen shots of the designer program's graphical user interface window that show how the ingestion of differently sized image values into a variable image element within a vertical box having a minimized height and width affects the appearance of a page's layout;

FIG. 18 shows the Anchor Point selection dialog box of the designer program;

FIGS. 19 through 30 illustrate the effect of selecting different anchor points upon the layout of flexible shape elements.

FIG. 31 shows the designer program's Character Properties dialog box;

FIGS. 32 through 34 show three tabs of the designer program's Paragraph Properties dialog box;

FIG. 35 shows the Define Styles dialog box of the designer program;

FIG. 36 shows the Variable List window of the designer program, which is virtually identical to the Variable List window of the producer program;

FIGS. 37 through 41 illustrate the producer program's Variable Editor dialog box, showing the different "Definition" areas of that dialog box which result from the selection of different types of content-mapping rules for variables defined in the Variable Editor dialog box;

FIGS. 42 and 43 illustrate the SQL query generated in response to the Variable Editor dialog box shown in FIG. 41, with FIG. 42 showing the SQL query in a variable form, and with FIG. 43 showing the same variable query once it has been instantiated with data from a profile record;

FIG. 44 illustrates the Job Setup dialog box of the producer program, which is used to define a job that will map variable values into a given template and cause the resulting layout to be output in a desired output format;

FIG. 45 shows a job set-up dialog box of the type shown in FIG. 45, illustrating how the dialog box enables the user to select with which of a plurality of possible templates a given job is used;

FIG. 46 is a partial version of a pf_data file, which represents all of the variable values that are mapped into a given template for a given document when a given job is run;

FIGS. 47 and 48 illustrate how a variable text value can have its contents and attribute values grafted into a variable text element, and how the language_id attribute value can be used to select which hyphenation dictionaries are used in the layout of text elements;

FIG. 49 illustrates how the system shown in FIG. 2 allows different sets of content-mapping rules to be used with a given template, and how it allows a different template to be used with a given set of content-mapping rules;

FIG. 50 illustrates how aspects of the present invention can be used to enable a given set of content-mapping rules to be used with different templates, some of which can be used to create HTML pages for distribution over the world wide web and some of which can be used to create TDF files that can be downloaded over the web for viewing or printing;

FIG. 51 illustrates a portion of a template tree as it has been instantiated by the ingestion of an area template variable value;

FIG. 52 provides a graphical representation of the layout elements shown in FIG. 51, illustrating the margins, bumpers, and flex attribute values that affect the layout of those elements;

FIGS. 53 through 56 show how the portion of the template tree shown in FIGS. 51 and 52 look when different data values are ingested into them;

FIGS. 57 and 58 illustrate how a given area template variable value can be ingested into different templates and, because of flex attribute values, can have considerably different appearance when being ingested into those different templates;

FIG. 59 provides a highly simplified pseudo-code description of some of the main control functions of the designer program shown in FIG. 2;

FIG. 60 shows a highly simplified pseudo-code description of the fileNew sub-routine called in FIG. 59;

FIG. 61 shows a highly simplified pseudo-code description of the fileSave sub-routine called in FIG. 59;

FIG. 62 shows a highly simplified pseudo-code description of the fileOpen sub-routine called in FIG. 59;

FIG. 63 shows a highly simplified pseudo-code description of the createShape-Element sub-routine called in FIG. 59;

FIG. 64 shows a highly simplified pseudo-code description of the selectShape sub-routine called in FIGS. 59 and 63;

FIG. 65 shows a highly simplified pseudo-code description of the resizeShape sub-routine called in FIG. 59;

FIG. 66 shows a highly simplified pseudo-code description of the properties-Editor sub-routine called in FIG. 59;

FIG. 67 shows a highly simplified pseudo-code description of the insertimageFile sub-routine called in FIG. 59;

FIG. 68 shows a highly simplified pseudo-code description of the addElement-ToAreaTemplate sub-routine called in FIG. 59;

FIG. 69 shows a highly simplified pseudo-code description of the remove-ElementFromAreaTemplate sub-routine called in FIG. 59;

FIG. 70 shows a highly simplified pseudo-code description of the createGroup-Box sub-routine called in FIG. 59;

FIG. 71 shows a highly simplified pseudo-code description of the createVBox sub-routine called in FIG. 59;

FIG. 72 shows a highly simplified description of the createHbox sub-routine called in FIG. 59;

FIG. 73 shows a highly simplified pseudo-code description of the insertShape-InText sub-routine called in FIG. 59;

FIG. 74 shows a highly simplified pseudo-code description of the selectText sub-routine called in FIG. 59;

FIG. 75 shows a highly simplified pseudo-code description of the character-Properties sub-routine called in FIG. 59;

FIG. 76 is a highly simplified pseudo-code description of the paragraphProperties sub-routine called in FIG. 59;

FIG. 77 shows a highly simplified pseudo-code description of the textstyle sub-routine called in FIG. 59;

FIG. 78 shows a highly simplified pseudo-code description of the shapeStyle sub-routine called in FIG. 59;

FIG. 79 shows a highly simplified pseudo-code description of the variableList sub-routine called in FIG. 59;

FIG. 80 shows a highly simplified pseudo-code description of the export sub-routine called in FIG. 59;

FIG. 81 shows a highly simplified pseudo-code description of the import sub-routine called in FIG. 59;

FIG. 82 shows a highly simplified pseudo-code description of the selectProject sub-routine called FIG. 59;

FIG. 83 provides a highly simplified pseudo-code description of some of the main control functions of the producer program shown in FIG. 2;

FIG. 84 shows a highly simplified description of the variableEditor sub-routine called in FIG. 83;

FIG. 85 shows a highly simplified pseudo-code description of the jobSetup sub-routine called in FIG. 83;

FIG. 86 is a highly simplified pseudo-code description of the jobPreview sub-routine called in FIG. 85;

FIG. 87 shows a highly simplified pseudo-code description of the createVariable-ValueTree sub-routine called from FIGS. 86 and 90;

FIG. 88 shows the map sub-routine called by the createVariableValueTree sub-routine shown in FIG. 87;

FIG. 89 shows the mapVariableValuesIntoVariableElements sub-routine called from FIGS. 87 and 90;

FIG. 90 shows the runJob sub-routine called from FIG. 85;

FIG. 91 shows the generateHTMLPage sub-routine, which is called by the runJob sub-routine of FIG. 90 to produce an HTML layout for a page;

FIG. 92 shows the printPage sub-routine, which is called by the runJob sub-routine of FIG. 90 to create a layout for a printed page;

FIG. 93 shows the updateScreen sub-routine, which is called by both the designer and producer program shown in FIG. 2 to interactively update screen images of the layout of a given template or job in response to changes or selections made by a user;

FIG. 94 is a highly simplified pseudo-code description of the main layout sub-routine, which is called for individual page elements within a template and for all shape elements contained within a page;

FIG. 95 is a highly simplified pseudo-code description of the layoutEmptyShape sub-routine, which is called by the layout routine of FIG. 94 to lay out empty shapes;

FIG. 96 is a highly simplified pseudo-code description of the layoutlmageElement sub-routine, which is called by the sub-routine in FIG. 94 to lay out image shapes;

FIG. 97 is a highly simplified pseudo-code description of the layoutShapeIncludingFloatingElements sub-routine, which is called by the layout routine of FIG. 94 to lay out shapes that have floating text or shape elements within them;

FIGS. 98A and 98B are a highly simplified pseudo-code description of the layoutShapeIncludingFixedElements sub-routine, which is called by the layout routine of FIG. 94 to lay out shape elements that have fixed child shape elements;

FIG. 99 is a highly simplified pseudo-code description of the layoutHBox sub-routine, which is called by the layout routine of FIG. 94 to lay out h-box shapes;

FIG. 100 is a highly simplified pseudo-code description of the layoutVBox sub-routine, which is called by the layout routine of FIG. 94 to lay out v-box shapes;

FIG. 101 is a highly simplified pseudo-code description of the findMinDerived-Width sub-routine, which is called by the routines of FIGS. 98A and 98B, 99, and 100 to estimate the minimum width a shape requires to be laid out properly;

FIG. 102 is a highly simplified pseudo-code description of a findMinDerived-Height sub-routine, which is called by the routines FIGS. 98A through 100 to estimate the minimum height a shape requires in order to be laid out properly; and

FIG. 103 is a highly simplified pseudo-code description of the allowChildsMaximizedHeight sub-routine, which is called by the sub-routines of FIGS. 98A, 98B, 99, and 100 to maximize the height of elements having maximized height after they have been laid out with a minimized height.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

FIG. 2 illustrates a computer system 100, which forms one possible embodiment of the invention. The system 100 includes a computer 102, which in a preferred embodiment of the invention is a computer running the Microsoft NT operating system, but which in other embodiments of the invention can be any computer having enough power to run a document layout program. The computer 102 includes a CPU 104 for executing instructions; a random access memory (RAM) 106 for storing instructions and data to be used or written by the CPU; a video output device for enabling the computer to create screen images on a computer screen 110; and an I/O device 112 for receiving input from a keyboard 114 and a mouse 116 and for supplying output to a printer 118. The computer 102 also includes a hard disk 120 on which the computer can store programs and data.

The disk 120 includes an operating system program 112, which is the Microsoft NT operating system in the preferred embodiment of the invention, but which in other embodiments in the invention could be Microsoft Windows, the Macintosh operating system, the Sun operating system, the Lenix operating system, UNIX, or any other operating system capable of providing a graphical user interface to a computer. The hard disk also stores three programs that are used in the preferred embodiment of the present invention, a designer program 124, a producer program 126, and a server program 128.

FIG. 3 is a screen shot of the graphical user interface (GUI) window of the designer program 124 shown in FIG. 2. This program provides a user interface for creating, opening, editing, and saving the template files 130 shown symbolically in FIG. 2. The designer window 152, shown in FIG. 3, can be selected to contain a structure view 154 which provides a graphical representation of the shape and text layout elements in the tree-shaped data structure of the template currently being edited by the designer program.

FIG. 4 is a portion of the XML text of the template file 130 corresponding to the template shown in the designer window of FIG. 3. As is well known in the art, XML is the Extensible Mark-up Language. XML is an extensible mark-up language, in the sense that in it a programmer or user is allowed to define new tag types. As will be explained below, in the preferred embodiment, users are allowed to define new tag types for text and shape layout elements. XML is capable of representing hierarchical, or tree-shaped, data structures in the form of tag text. As can be seen by looking at FIG. 4, it normally marks texts, or other elements, by enclosing them between a start and a corresponding end tag. The start tag includes a tag name and zero or more attribute-value pairs in the general form

<tagName attribute 1="value1" attribute2="value2" . . . >

The corresponding end tag will have the form

"</tagName>"

The tree-shaped data structure of the template is represented by a nesting of elements between the start and end tags of their parent elements. For example, the entire document starts with a tag "<_DOCUMENT>" labeled with numeral 174 and ends with an end tag that is "<.backslash._DOCUMENT>" labeled with the numeral 174A. Similarly, the tag that starts the representation of page two in the document shown in the structure view of FIG. 3 starts with a tag 176 that contains the tag name "PF_Page_Base" and ends with the tag 176A shown near the bottom of FIG. 3, which has the corresponding tag name preceded by a slash. As stated above, by looking at the nested elements of the XML file shown in FIG. 4, one can see the correspondence of those elements to the elements shown in the structure view of FIG. 3 in which corresponding elements have corresponding numerals, with the exception that the end tags of elements have the same numeral with the letter A added.

Once an XML template file is loaded into the designer program, it is translated into a corresponding tree data structure in which the elements of the tree are linked by pointers to increase the speed at which the designer program can process its elements. The elements of a template's tree structure include both shape layout elements and text layout elements.

Shape layout elements include the following: document pages 155; text containers 156, which are rectangular or oval shapes into which text elements can be placed; image elements 158, which are rectangular shapes into which images can be placed; plain group boxes 160, in which included elements have fixed positions relative to a corner of the group box; vertical group boxes 162, in which elements are sequenced along a vertical axis; horizontal group boxes 164, in which included elements are arranged along a horizontal sequencing axis; and area template boxes 166, which are containers into which a sub-tree of the template, having as its root element a shape element, can be placed. Shape elements can also include rectangular or oval graphic shapes that can be created and sized by the user to form graphic designs, such as bars between the sections of a document.

Text layout elements, such as the elements 170 shown in FIG. 3, occur inside text boxes in a floating layout, which means they are laid out along one or more horizontal line occurring within the text box. Text can also be comprised of hierarchical elements. For example, in FIG. 46 the variable text value 398A, which will be mapped, or "ingested", into a variable text element, has three levels of hierarchy: that defined by the "DestinationDescrip" start and end tags, that defined by the "head" and "body" start and end tags, and that defined by the "bold" start and end tags. The text elements can include more complicated sub-trees, including elements comprised of formatting tags that define text attributes for the elements they enclose, elements corresponding to individual paragraphs, one or more possible levels of nested elements comprised of text attributes to be applied to parts of paragraphs or lines of text, and the actual text elements themselves.

In the structure view in FIG. 3 certain template elements have corresponding entries in a variable column 177 shown at the right hand side of the structure view. Each such entry is a variable name that occurs between left and right arrow characters, "<" and ">", respectively.

Each such variable name indicates that its corresponding template element is a variable element, meaning that it is an element into which a variable value can be mapped when the template is used to produce a set of one or more variable data documents. As can be seen from FIG. 4, the XML equivalent of a variable element shown in the structure view includes within its start tag an attribute-value pair 180, which starts with the text "data_tag=" and is followed by a string in quotation marks corresponding to the variable name shown in the variable column 177 of FIG. 3. As will be explained below, when a set of one or more variable documents is produced for a template, each variable element in the template will have a variable value mapped into it with a content-mapping rule having the same variable name as the variable element. The template, which is partially shown in FIG. 4, has statically defined default values, both for its content values, i.e., its portions contained between its start and end tags, and for each of the attributes that has an attribute-value pair in its start tag.

As is explained below in more detail, when a variable value is mapped or ingested, into a variable element, the variable value's content will replace that of the variable element and any attribute-value pairs included within the variable value's start tag, and will replace the value of any corresponding attribute-value pair contained within the variable element.

As shown in FIG. 3, the designer program's GUI window also has a document window 155, which provides an interactive display of the layout of that portion of a selected page of the current template that fits within the layout window. In FIG. 3, elements shown in the document window 155, which correspond to those in the structure view 154 have corresponding numerals. This allows a user to see the laid-out appearance of various elements in the template as the user creates or changes them. The structure view and the document window also allow a user to see a given template with variable data that has been ingested into it according to a given document creation job.

The system shown in FIG. 2 also includes, in addition to the designer program, a producer program that enables a user to produce and define document creation jobs, each of which can create a set of one or more variable data documents based upon a selected template that has been produced by the designer program 124. The producer program enables a user to create one or more project files 132, shown schematically in FIG. 1. Each such project file contains a set 134 of content-mapping rules, each of which has a variable name, for mapping variable values into variable elements of a template that have the corresponding variable names.

The rules in the rule set of a project file are often called variables. This is because each of them has a variable name. When a rule set is used to map variable content into a template, there should be one content-mapping rule, or variable, having a variable name corresponding to each variable element in the template or and each variable element, if any, contained within any variable sub-tree mapped into the template.

A project file can also include a job list 136, which can include one or more jobs, each of which specifies how one or more documents are to be produced by using the content-mapping rule set of the project. Each job specifies the template to be used with the project file's content-mapping rule set to produce the document set, the set of profile records that are to be used to supply data to the content-mapping rule set for the production of each document in the set, and the output format in which the documents are to be produced.

The content-mapping rules each map a value into a variable element having the same variable name based on information of a profile record. These profile records are normally selected from a profile database 147 shown in FIG. 2. In this figure this database is shown as a single table 148 comprised of a plurality of profile records 149, each including a plurality of fields 150. In other embodiments other types of databases, such as relational databases could be used.

As is explained below in more detail, some content-mapping rules map the value of a single field in a profile database into a corresponding variable element in a template, but other content-mapping rules are more complicated and can use one or more fields in a profile database to select a content file for inclusion into a given variable element of a template. Such content can include text files 138, which are unformatted text; formatted text files 140, which can include formatted texts by no paragraph boundaries; formatted paragraph files 142, which can include formatted text including paragraph boundaries; image files 144, which can be virtually any type of image file, (in the preferred embodiment they can be TIFF, GIF, JPEG, and encapsulated postscript (EPS) images; and area template files 146, which can contain a sub-tree of template elements including text and/or shape elements.

In the embodiment of the invention shown in FIG. 2, content-mapping rules can also use a digital asset management system 151 to select variable values. A digital asset management system is a database designed to manage digital content files. The digital asset management system includes a database 141, which includes a plurality of records 143, each of which includes a pointer 147 to a content file, which could be a files path name or network address, and one or more metadata fields 145 associated with each such file pointer. As is explained in more detail below, a content-mapping rule can associate a variable with a query to a digital asset management system that uses a selection of values for one or more metadata tags 145 to select a content file as the value for such a variable. Such content-mapping rules can cause the metadata tag values used in such a query to be a function of one or more fields in the profile record for which a given document is being produced.

Each template file 130 also has associated with it a TSL. or Template Style Language, file 131 shown in FIG. 2. An example of a part of a TSL file used in the layout of the template illustrated in FIG. 3 is shown in FIG. 5. As shown in FIG. 5, each TSL file is composed of a plurality of model definitions 133, which in FIG. 5 are labeled 133A or 133B. The models 133A are models of shape element types, and the models 133B are models of text element types. Both types of models are written in the same language, have the same format, and can be included in the same file. Shape models define attributes of shape elements and text models define attributes of text elements. Each model is based on the definition of a parent model that is referenced after the colons on the first line of the model's definition. Each model inherits all the attributes of its parent's model, except those which are explicitly overridden by a different value in its own model definition than is contained in the model definition of its parent or other ancestor from which it inherits attribute values. For example, in FIG. 5 the model PF_Area_Template_Base inherits its attributes from the model PF_Box_Base, and PF_Box_Base inherits its attributes from a fundamental, or root level, model called_box. In the preferred embodiment, root level models are not defined in a TSL file, their definition is part of the layout software that is used by the designer and producer programs. Similarly the example of FIG. 5 shows that the model ToyName inherits its attribute values from the model PF_Paragraph_Base, and the model PF_Para_Base inherits its attributes from the predefined root model_para.

FIG. 6 is a screen shot of a GUI window 180 generated by the producer program 126 shown in FIG. 2.

This window normally includes a project window 182, which by operation of the selection box 184 or section of one of the icons 186 can be caused to display a list of a selected type of elements important to a given document production project. In FIG. 4, the project window displays the project's variable list, which corresponds to the project's set of content-mapping rules 134 shown in FIG. 2. This window can also be used to show the list of jobs associated with the projects, which is labeled 136 in FIG. 2.

If a user selects a given variable name 287 in the variable list, such as the variable bigpic 287A shown highlighted in FIG. 6, a Variable Editor dialog box 188 will appear showing the definition of the content-mapping rule associated with that variable name. Within the producer program, a user can also choose to display a job preview window 153, which enables a user to see the values of the records from a profile database 147 shown in FIG. 2, which have been selected for use with a given job, and enables a user to click on a given record within that set and to see a layout of the template associated with the job in a document window 192. The mapping of different variables in to a given template that results from selecting different profile records in a given job can cause substantial changes in the appearance of a template. This is particularly true since entire template sub-trees can be mapped into a template by the use of variable area template elements.

FIG. 7 illustrates a portion of an area template file, of the type labeled 146 in FIG. 2. It shows that such a file is composed of an XML tree-shaped data structure similar in structure to a part, or sub-tree, of a template file. The contents of such files can have their contents dynamically mapped into an area template container that is a variable element. FIG. 8 is a picture of the designer program window shown in FIG. 3 after the contents of the area template file shown partially in FIG. 7 has been mapped into the variable area template box element 166 having the variable name <p1Area> shown in the structure view in FIGS. 3 and 8. As a result of such a mapping, the default value of the <p1Area> variable area template element, that part indented under that area template element in FIG. 3, is replaced by the elements of the area template shown in FIG. 7. This results both in a change in the structure view 154 and the document window 155 for the template.

FIGS. 59 through 103 provide a pseudo code description to explain the operations of the invention shown in FIG. 1. Many aspect of this pseudo code have been highly simplified to make it easier to understand. It's purpose is not to communicate the complex details of the system, but rather to convey the more important essentials of how it works.

FIG. 59 is a highly simplified description of the response that the designer program 124, shown in FIG. 2, makes in response to user inputs. In FIG. 59 the structure for making these responses is represented as a control loop.

As shown in step 1002 of FIG. 59, if a user selects a command to create a new file, that step calls the fileNew sub-routine 1042 shown in FIG. 60.

As is shown in FIG. 60, the fileNew sub-routine displays a File New dialog box in step 1044 that allows a user to pick attributes for, and select to create, a new template. If the user selects to create a new template, step 1046 causes steps 1048 through 1054 to be performed. Step 1048 creates a new tree data structure comprised of a document root node, corresponding to the document element represented by the XML start and end tags 174 and 174A, respectively, at the start and end of FIG. 4. Then it creates one empty page node under the document node, such as the page node represented by the tags 176 and 176A in FIG. 4. Then step 1050 creates a default TSL style sheet similar to the style sheet shown in FIG. 5 containing all of the default styles used by the designer program These default styles include all of the styles that start with the characters "PF" shown in FIG. 5. These are the standard text and shape models that all of the designer program's templates start out with. Once this is done step 1052 displays the layout of this simple template in the designer program's document window 155 in FIG. 3, and then step 1054 displays the templates simple tree-shaped data structure in the designer window's structure view 1054.

Returning to the control loop of the designer program shown in FIG. 59, if the user selects to save a file, by selecting the File>Save command in the menu structure of the user interface window 152 shown in FIG. 3, a step 1004 calls the fileSave sub-routine 1056 shown in FIG. 61.

As shown in FIG. 61, the fileSave routine starts by displaying a File Save dialog box in step 1058, which allows the user to edit the name of, select a file directory for, and select to save the current template displayed in the designer GUI window 152 shown in FIG. 3. If the user actually selects to save the current template in this dialog box, step 1060 causes steps 1062 through 1066 to be performed.

Step 1062 translates the current template's tree-shaped data structure from the form in which it is internally represented in the designer program to a corresponding XML representation, of the type shown in FIG. 4. Once this XML representation has been created, step 1064 saves that representation in a template file 130 of the type shown in FIG. 2 with the given name selected in the Save File dialog box followed by a .xdt file extension, which stands for "XML Document Template." This file is saved in the given directory selected in the File Save dialog box. Next, step 1066 saves the current template's corresponding style sheet in the same directory as a file having the same name followed by a .tsl file extension.

Returning to the designer control loop shown in FIG. 59, if the user selects a File>Open command, using the menus of the designer program, step 1006 calls the fileOpen routine 1068 shown in FIG. 62.

As shown in FIG. 62, step 1070 of this routine displays a File Open dialog box that allows a user to select a directory, and select to see and open any .xdt file (i.e., XML designer template file) stored in the currently selected directory. If the user selects to open a given xdt file, step 1072 causes steps 1074 through 1082 to be performed.

Step 1074 opens the selected template file. Step 1076 creates an internal representation of the tree-shaped data structure represented by the opened XML template file. Next, step 1078 opens the .tsl, or style sheet file, having the same name proceeding the file extension as the template file that was just opened. Then step 1080 creates a display in the document window of the template that has just been opened using the attributes contained in the TSL file to determine how each element defined by reference to such to a model contained in the .tsl file will be displayed. Then step 1082 displays the template's tree-shaped data structure in the structure view 154 of the designer window shown in FIG. 3.

Returning to the designer control loop of FIG. 59, steps 1008 through 1014 of that figure relate to the creation, positioning, and sizing of shape elements in a template.

The designer window 152 shown in FIG. 3 contains a toolbox 200 shown along the window's left hand edge that contains four shape tools, the text container shape tool 202, the image element tool 204, the area template tool element 206, and the graphic shape element tool 208. As shown in step 1008 of FIG. 59, if a user clicks on any of these shape tools 202 through 208, the createShapeElement sub-routine 1084, shown in FIG. 63, is called for the tool's corresponding shape type.

As shown in FIG. 63, when the createShapeElement sub-routine is called, step 1086 changes the mouse cursor to an add-shape-element cursor corresponding to the element type of the respective tool 202 through 208 for which the routine has been called. This cursor has the same appearance as the icon for the selected tool 202 through 208, with the addition of a small plus sign to one side when the cursor is over a location in which such an element can be created in the template.

If the user starts dragging on the mouse when it has an add-shape-element cursor, steps 1088 and 1090 will plant the first corner of a bounding rectangle for a shape element of the current element type on the designer program's document window at the location in the layout of the template at which the drag is first started. Then steps 1092 and 1094 will respond to further motion of the mouse while the drag is continued by interactively moving a diagonally opposite corner of the bounding rectangle for the element type, changing the height and width of the shape during such motion. When the user ends the drag, the bounding rectangle is left having the opposite corner located and their respective positions at the time the drag stopped.

At this point step 1096 changes the mouse cursor to a selection cursor, and step 1098 creates a shape element of the current element type (i.e., a text container, an image element, an area template, or a graphic shape element) having the size and position attributes defined by the first and diagonally opposite corners of the bounding box defined at the end of the mouse drag. Then step 1100 places an element of the appropriate element type in the template's tree data structure. Step 1102 calls the selectShape routine for the element, which causes the newly created shape element to be currently selected, and step 1104 displays the element in the document window at its given location, laid out according to its current attributes. Then step 1106 updates designer windows structure window to show the inclusion of the newly created shape.

As is shown in FIG. 64, the selectShape routine called by FIG. 63's step 1102 of the createShapeElement, has a step 1110, which causes the shape for which the routine has been called to be selected, a step 1112, which highlights the outline of the shape in the document window, a step 1113, Which highlights the shapes element in the structure view, and a step 1114, which makes visible drag boxes on the shapes bounding rectangle that are located at each of the bounding rectangles four corners, and in the middle of each of its four sides. These drag boxes enable the user to resize the selected shape by dragging on them.

Returning to the designer control loop of FIG. 59, if a user clicks on a shape or drags a selection box around it, step 1010 calls the select shape routine 1108, just described, for the shape.

If a user drags on one of the drag boxes of a selected shape, step 1012 of FIG. 59 calls the resizeShape routine 1116 shown in FIG. 65.

As shown in FIG. 65, while such a drag continues, steps 1118 and 1120 will interactively move the one or more sides of the shape's bounding rectangle on which the drag box that is being dragged is located. It will cause each such side to move with that component of the mouse's movement which is perpendicular to the side on which the drag box is located as long as the drag continues. As soon as the drag ceases, step 1122 updates the size attribute of the shape element that had been resized by the drag to correspond to those of its bounding rectangle at the time the drag ended. Then step 1124 updates the shape's display in the document window, which requires that it and its children be re-aid out so as to interactively show the user the effect of the change in size upon the appearance of the document whose template is being edited.

Returning to the control loop of FIG. 59, if a user drags on a selected shape's outline within the document window, a step 1014 moves the shape with the motion of the mouse as long as the drag continues, and once the drag terminates, it updates the shapes position attributes and makes corresponding change to the document view.

If a user selects the Elements>Properties in the designer program's menu while one or more shape elements are selected, or if the user double clicks on a shape, step 1016 calls a propertiesEditor routine 1126, shown in FIG. 66, for the selected one or more elements.

As shown in FIG. 66, this routine has a step 1128, which displays a Properties editor dialog box 210, shown in FIGS. 9 and 10. This dialog box has two tabs; a form tab 212 shown displayed in FIG. 9 and a flex tab 214 shown displayed in FIG. 10. Each such tab has two columns, a left column 213, which lists attributes of the selected one or more items and a second column 215 containing a user editable field listing the current value of the attribute listed on the same row for the current selection.

The flex tab lists the selected shape elements' flex attributes, that is, its attributes that relate to whether or not, and how, it changes size or shape in response to variable content and/or in response to variable amounts of available space when being laid out.

The form tabs displays an element's non-flex attributes. As shown in FIG. 9, an element's non-flex attributes include a width attribute 216 and a height attribute 217, which together define the size of a shape element. The non-flex attributes also include three position attributes, a left attribute 219, a top attribute 220, and an angle attribute 221. The left and top attributes define the xy position of the anchor point for the shape element (often its upper left hand corner) relative to a container shape in which the given shape is located. The angle attribute defines the angle of the shape relative to what would be the vertical axis of the container shape if the container shape itself had an angle attribute of zero degrees. Among other things, this allows horizontal and vertical group boxes, which are described in greater detail below, to be set at a angles which are other than horizontal or vertical, respectively.

The non-flex attributes further include three color and border attributes, including a fill color attribute 223, which defines whether or not the shape has a solid fill color and what that color is; a border color 224, which defines whether or not the shape has a visible border, and if so what its color is; and a border thickness attribute 225, which defines the thickness of the shape's border.

Each shape also has margin attributes including: a left margin attribute 227, a top margin attribute 228, a right margin attribute 229, and a bottom margin attribute 230. These define the minimum distance between the boundary of the shape and the allowed position for any included child shape or text elements whose positions are not fixed relative to their parent shape.

Each shape element has four bumper attributes: a left bumper attribute 232, a top bumper attribute 233, a right bumper attribute 234, and a bottom bumper attribute 235. These define an external margin around the shape element upon which other shape are often not allowed to overlap.

Finally, each shape element includes three special attributes, including the avoid me attribute 238, the runaround attribute 239, a vertical alignment attribute 240, and a horizontal alignment attribute 241.

The runaround attribute will cause text in text containers to run around a shape element that has a yes value for the avoid me attribute. This is illustrated in FIG. 16, in which the text 218 runs around the image shape element 215. A yes value for the runaround attribute for a text element or for a text container shape will cause that text or the text within that shape to run around, or avoid, the space occupied by a shape element having yes for the avoid me property, and that shape's external bumpers.

The vertical alignment properties can have values of top, center, bottom, or justified. The selected value determines the spacing of elements within a container shape that is a sequence box. Similarly the horizontal alignment attribute can have the corresponding values of left, center, right, or justified, and it determines the horizontal alignment of elements within a sequence box containing one or more sub-element shapes.

As shown in FIG. 10 the flex tab of the properties editor dialog box has a behavior attribute 242, a minimum attribute 243, and a maximum attribute 244 for the height of the selected shape.

As shown in FIGS. 11 and 12, the flex-height-behavior attribute can be set to one of five values: "none" 256, "maximize" 258, "minimize" 260, "proportional" 262, and "source size" 263. If the shape is not an image element only the "none," "maximize," and "minimize" values are available. If the image element is an image, only the "none," "maximized," "proportional," and "source size" values are available.

If the flex-height behavior is "none" that means the shape has a fixed height, which will be the height defined by the value of the height attribute 217 on the form tab 212, shown in FIG. 9.

If the user selects that the shape has the "maximize" flex-height behavior, the layout process with try to "maximize" the height of the shape, that is, to have it take up all space available for it during the layout process, up to the height defined by the Flex Height Maximum attribute 244 shown in FIG. 10.

If the user selects the "minimize" value for the flex-height behavior, the shape's height will attempt to be as small as possible as is allowed by either the size of the shapes contents plus the shape's internal top and bottom margin attribute values 220 and 230 shown in FIG. 9, or the value of its Flex Height Minimum attribute 243 shown in FIG. 10, whichever is larger. A variable shape element with such a minimized dimension will tend to shrink around the content of variable values which are mapped into it. A non-variable value with a minimized dimension will tend to shrink around the size of variable sub-elements which are contained within it, or around non-variable sub-elements which a placed within it by a user.

If the user selects a "proportional" value 262, shown in FIG. 11, for the flex-height behavior for an image element, layout of the image element will automatically scale the image's height so as to maintain the aspect ratio of the image file is mapped into the image element given its width, whether that width be fixed, maximized or minimized.

If the user selects a "source size" value 263 for the flex-height behavior or an image element, layout of the image element will automatically cause the image element's height to equal the height of the image file mapped into the image element.

Returning to FIG. 10's illustration of the Flex tab of the Properties Editor, the Flex Height minimum attribute 243 specifies the smallest height allowed for the selected shape during layout, regardless of its contents. If the flex-height behavior 242 is "none," then this minimum value should equal the value of the height attribute 217 shown in FIG. 9 for the shape. Similarly, the Flex Height maximum attribute 244 shown in FIG. 10 represents the largest height the shape can have during layout, and this value should equal the value of the height attribute 217 shown in FIG. 9 if the flex-height-behavior attribute 242 is "none".

Each shape element can also have three flex width attributes, a behavior attribute 246, a minimum attribute 249, and a maximum attribute 248, as shown in FIG. 10. Each of these three Flex Width attributes correspond to the similarly named Flex Height attributes 242 through 244, discussed above, except that they relate to width rather than height.

FIGS. 13 and 14 provide one illustration of the difference between the maximize and minimize value for the flex-height-behavior attribute of the vertical 162B shown in those figures. In FIG. 13 the vertical group box 162B has a minimize height, causing the box to shrink in a vertical direction as far at its contents will allow, so as to push up as far as possible the horizontal group box 64C containing the text box 156B and the group 160B at the bottom of the vertical group box 162B, as can be seen in the document window of FIG. 13. FIG. 14 shows the same vertical box 162B, once it has been given a maximized height, which causes this vertical box to expand down as far as will be allowed by the horizontal group box 164B in which it is contained, allowing the horizontal group box 164C to be located just above the bottom of the horizontal group box 164B, as shown in the document window of FIG. 14.

FIG. 15 illustrates the effects of the flex height and flex width attribute values upon an image element into which one or more image files are mapped.

FIG. 15 illustrates eight different combinations of flex height and flex width attribute values for image elements 234 th