

The text-enabled rectangle contains the following command in its Web tab:Īt runtime the value of the REGION element is displayed in the rectangle.Īll of these shapes were then grouped together and in the Web tab for the grouped object, the following syntax is added: The shape generates as twice its current height. For example, if the value is 2000, divide that by 1000 to get a factor of 2. The value is divided by 1000 to set the stretch or shrink factor.

The shape-size command is used to stretch or shrink the cylinder based on the values of the elements SOFTWARE, HARDWARE, and SERVICES. The following commands are entered into the Web tab: The combined object also contains a rectangle that is enabled to receive text from the incoming data. These represent the data elements software, hardware, and services. The shape consists of three cylinders: red, yellow, and blue. A template to achieve this is shown in the following visual representation of ratings figure:ĭescription of the illustration GUID-51B1E7E2-A597-48C4-9463-1E7F1E9622FE-default.gif Using this data element and the shape manipulation commands, you can create a visual representation of the ratings so that the reader can compare them at a glance. Notice there is a USER_RATING element for each CD.
#Microsoft publisher picture shapes how to#
This example demonstrates how to set up a template that generates a star-rating based on data from an incoming XML file. And for each subsequent occurrence the offset would be another 100 pixels down the page. The offset for the second occurrence would be 100 pixels: (2-1) *100. Therefore for the first occurrence the offset would be 0: (1-1) * 100. The XSL position command returns the record counter in the group (that is 1,2,3,4) one is subtracted from that number and the result is multiplied by 100. (position()-1)*100) sets the offset in pixels per occurrence. Shape-offset-y: is the command to offset the shape along the y-axis. For each occurrence of the element SHAPE_GROUP a new shape is created. SHAPE_GROUP is the name of the repeating element from the XML file. For example, to replicate a shape down the page, use the following opens the for-each loop for the shape context To replicate a shape, use a command in conjunction with a shape-offset declaration. You can replicate a shape based on incoming XML data in the same way you replicate data elements in a for-each loop.
