XML Report Templates

From PGVWiki
Jump to navigation Jump to search

Tags

PGVReport

The root node that starts a PGV report template.

  • access - The PGV user access level for this report. This corresponds to the options available for privacy settings. Possible values are: PGV_PUBLIC, PGV_USER, and PGV_NONE.
  • icon - The PGV icon to use in the menus for this reports as defined by the theme.php file.

PGVRTitle

The title of this report. The title will appear in the list menu items.

PGVRDescription

A textual description of this report.

PGVRInput

Setup an input variable for the UI which will make the user input available as a variable later in the report. Attribute Description

  • name - The name of the variable.
  • lookup - Tells the UI that the value for this input can be looked up from a list. Possible values are: INDI, FAM, SOUR, PLAC, and DATE.
  • type - Tells the UI generator what type of input this is. This allows you to specify whether you want a textbox input or a checkbox or a select drop-down list.
  • default - The default value that should be filled into the field.
  • options - For an input of type "select" this allows you to set which options are available to select from in the drop-down list. The options should be entering in a comma seperated list (ie. NAME,BIRT).

PGVRStyle

Setup an text style that text elements may reference to set the font style used when they are rendered. This is very similar to class stylesheets in HTML. The fonts that are available to you are the 12 fonts that come standard with Adobe Acrobat and the LucidaSans font included with the project. Note that to avoid including the font in the PDF report, the LucidaSans font will be interchanged with Arial for reports that do not contain any special characters. For reports that do contain special characters, only the LucidaSans font can be used.

  • name The name you will use to reference this style.
  • font The name of the font that should be used.
  • size The size of the font in pt.
  • style Bold or Italicize the font, (not available with the LucidaSans font). Appropriate values are: B, and I

PGVRDoc

This is the main tag that signals the start of the report document.

  • pageSize The size of paper for this report. Possible values are: A3, A4, A5, Letter, Legal
  • orientation Whether this report should print portrait or landscape (P or L)
  • margin The size of the margins in pt.

PGVRvar

Lookup and return the value of the given variable. The variable can be one of the many internal PGV variables, one of the user input variables, or a variable set with PGVRSetVar

  • var The name of the variable to lookup

PGVRvarLetter

This is the same as the PGVRvar tag, except that it only returns the first letter of the variable.

  • var The name of the variable to lookup

PGVRSetVar

Set an internal variable that can be used in this report. Variable can be referenced using the PGVRvar tag, or in an attribute value by prepending a $ in front of the variable name (ie. id="$pid")

  • name The name of the variable to set
  • value The value to set the variable.

PGVRif

Setup a condition where the children of this node will only be processed if the value of the condition attribute evaluates to true.

  • condition The condition that must be met in order to process the children nodes.

The following syntax applies to the condition construct:

  1. The whole condition is delimited by double quotes " "
  2. A literal string value is delimited by single quotes ' '
  3. A variable can be referenced by name preceded by a $
  4. A Gedcom tag element can be referenced preceded by a @
  5. Valid comparisons are == or !=

PGVRHeader

Setup a header that will be placed at the top of every page.

PGVRBody

Start the main body of the document. The body will create new pages as content flows over the current page.

PGVRFooter

Setup a footer that will be placed at the bottom of every page.

PGVRPageHeader

Setup a header that will be printed at the top of the page whenever the body flows onto a new page. The PGVRPageHeader will be printed underneath the PGVRHeader. This is allows you to have a custom header for different people or families as information flows onto succeeding pages.

PGVRFootnote

This sets up a footnote in the document. Each unique footnote is numbered and that number is printed with a link to the footnote text, which is printed whenever the PGVRFootnoteTexts tag appears.

PGVRFootnoteTexts

Print all of the footnotes setup while processing the document.

PGVRCell

The PGVRCell is the most basic text block that can be used in a report. It differs from the PGVRTextBox in that it can only have one style of text. Because of this you will often see PGVRTextBox used more often than PGVRCell. Text in a PGVRCell will wrap to the width of the cell.

  • width The width of this cell. Setting the width to 0 will make it the width from the current location to the right margin.
  • height The starting height of this cell. If the text wraps the height will automatically be adjusted.
  • align The text alignment of the text in this box. Options are "left", "right", "center", and "justify".
  • style The name of the PGVRStyle that should be used to render the text.
  • border Whether or not a border should be printed around this box. 0 = no border, 1 = border. Default is 0.
  • fill The color to fill the background of this cell.

PGVRTextBox

The PGVRTextBox is very similar to PGVRCell except that it may have PGVRText children which may each have their own style.

  • width The width of this box. Setting the width to 0 will make it the width from the current location to the right margin.
  • height The starting height of this box. If the text wraps the height will automatically be adjusted.
  • newline After this box is finished rendering, should the next section of text start immediately after the this box or should it start on a new line under this box. 0 = no new line, 1 = force new line. Default is 0.
  • left Position the left corner of this box on the page. The default is the current position.
  • top Position the top corner of this box on the page. the default is the current position.
  • border Whether or not a border should be printed around this box. 0 = no border, 1 = border. Default is 0.
  • fill The color to fill the background of this cell.

PGVRText

The PGVRText element must come inside a PGVRTextBox element and will render the text at the current document position according to the given style.

  • style The name of the PGVRStyle that should be used to render the text.

PGVRList

Iterate through a list of level 0 records. The child elements contained in the PGVRList tag will be repeated for ever record in the list. The list can be filtered through the filter attributes. Any number of filters can be applied. With each iteration, the gedcom context is changes to the next record in the list.

  • filter1 Filter the list by the given expression. Filters are given in the form GEDCOMTAG EXPR VALUE, where GEDCOMTAG may be any valid tag, for example BIRT:PLAC. EXPR must be one of the following CONTAINS, GTE, LTE, or EQUALS. CONTAINS filters are usually faster than the other filters. VALUE may be any variable or literal string.
  • filter2 Filter the list again by the given expression
  • filter3 Filter the list yet again by the given expression
  • sortby The Gedcom tag to sort on (ie. NAME, BIRT, or DEAT)

PGVRRelatives

Find all persons who are related to a given individual. With each iteration, the gedcom context is changed to the next record in the list. Attributes:

  • id The gedcom XREF id of the record to use as the context for children tags. A variable (ie $pid) or a reference tag (ie @FAMS, @SOUR) may be used for the id.
  • group The group of relative to find. Acceptable values are:spouse-family, direct-ancestors, ancestors, descendants, all
  • sortby Possible values are none, NAME, ID, generation,
  • maxgen The Maximum number of generations to return. A value of * will return all.
  • showempty If true, empty records will be returned for all ancestors not in the gedcom file. This is used for Ahnentafel charts.

PGVRGedcom

Set the current gedcom record context. All children tags will be referenced around the gedcom record selected using the "id" attribute"

  • id The gedcom XREF id of the record to use as the context for children tags. A variable (ie $pid) or a reference tag (ie @FAMS, @SOUR) may be used for the id.

PGVRRepeatTag

Iterate across all of the Gedcom tags in the given in the "tag" attribute that are found in the current Gedcom context. With each iteration the current gedcom context is changes to the next matching tag's subrecord.

  • tag The gedcom subordinate tag to

PGVRFacts

Iterate across all of the level +1 subrecords in the current gedcom context. This is useful for iterating through all of the facts in an individual or family record. The tags that will be iterated across can be filtered using the "ignore" attribute. It is often desirable to print the family with spouse facts along with the person facts. The "families" attribute allows you to turn this behavior on or off.

  • ignore A comma seperated list of tags that should be ignored when iterating through this record.
  • families Whether or not to look up family with spouse (FAMS) events when iterating through a person context. Options are 0 = don't include events from family records, 1 = include events from family records. Default = 0.

PGVRGetPersonName

Get the name of the person whose XREF id is given in the "id" attribute.

  • id The Gedcom XREF id for the person to lookup. Leave this attribute empty if you want to use the name from the current gedcom record context.
  • truncate Some reports may need to truncate long names so that they fit better in the reports. Use this attribute to specify the maximum character width that a name be printed. This will cause the processor to abbreviate multiple given names.

PGVRGedcomValue

Get the value of a Gedcom tag.

  • tag The GEDCOM tag you wish to capture the data from. You can specify descendant tags by seperating them with colons (:). For example, a person's birthdate would be "BIRT:DATE". The birth place would be "BIRT:PLAC".
  • level The level in the GEDCOM hierarchy this tag will be found. Entering DATE in the tag and level=2 will pull up the date that the event in the current contect occured.
  • truncate Limits the number of characters printed to the screen.

PGVRLine

Draw a line on the page.

  • x1 The horizontal starting position.
  • y1 The vertical starting position.
  • x2 The horizontal ending position.
  • y2 The vertical ending position.

PGVRImage

Place an image on the page.

  • file Currently the only supported value is @FILE
  • left The vertical starting position.
  • top The horizontal ending position.
  • width The width to set the image.
  • height The height to set the image.

PGVRHighlightedImage

Place the primary object image on the page. This would be the same image that is shown on the PGV charts.

  • left The vertical starting position.
  • top The horizontal ending position.
  • width The width to set the image.
  • height The height to set the image.

PGVRNow

Print the current date according to the selected language rules.

PGVRPageNum

Print the current page number.

PGVRTotalPages

Print the total number of pages in the resulting document.

PGVRListTotal

Print the totals found in the filtered PGVRList.

br

Print a new line break.