<?xml version="1.0" encoding="UTF-8"?>
<PGVReport access="PRIV_PUBLIC" icon="ancestry" language="english">
<!-- $Id: ahnentafel.xml 6595 2009-12-21 21:47:10Z canajun2eh $ -->
	<PGVRTitle><PGVRvar var="pgv_lang[ahnentafel_report]" /></PGVRTitle>
	<PGVRDescription>Prints an Ahnentafel report for the selected individual</PGVRDescription>
	<PGVRInput name="pid" lookup="INDI" type="text"><PGVRvar var="pgv_lang[enter_pid]" /></PGVRInput>
	<PGVRInput name="maxgen" type="select" options="3,4,5,6,7,8,9,*"><PGVRvar var="pgv_lang[generations]" /></PGVRInput>
	<PGVRInput name="sources" type="checkbox" default="1"><PGVRvar var="pgv_lang[show_sources]" /></PGVRInput>
	<PGVRInput name="notes" type="checkbox" default="1"><PGVRvar var="pgv_lang[show_notes]" /></PGVRInput>
	<PGVRInput name="pageSize" type="select" default="A4" options="letter,A3,A4,legal"><PGVRvar var="pgv_lang[page_size]" /></PGVRInput>
	<PGVRInput name="fonts" type="select" default="dejavusans" options="arialunicid0,dejavusans,helvetica"><PGVRvar var="pgv_lang[font]"/></PGVRInput>
	
	<!-- Header -->
	<PGVRStyle name="header" font="$fonts" size="14" style="b" />
	<!-- Page numbers text -->
	<PGVRStyle name="pagenum" font="$fonts" size="8"/>
	<!-- Standard text -->
	<PGVRStyle name="text" font="$fonts" size="10"/>
	<!-- Links to sources - required style name by the generator -->
	<PGVRStyle name="footnotenum" font="$fonts" size="7"/>
	<!-- Source text - PGVRFootnoteTexts - required style name by the generator -->
	<PGVRStyle name="footnote" font="$fonts" size="8"/>
	<!-- Generated by style - required style name by the generator -->
	<PGVRStyle name="genby" font="$fonts" size="8" />
	<!-- Date Text-->
	<PGVRStyle name="date" font="$fonts" size="8"/>
	<!-- Note Text -->
	<PGVRStyle name="note" font="$fonts" size="9"/>
	<!-- Individual name -->
	<PGVRStyle name="name" font="$fonts" size="10" style="b" />
	<PGVRStyle name="subheader" font="$fonts" size="12" style="b" />

	<PGVRSetVar name="num" value="1" />
	<PGVRSetVar name="generation" value="0" />
	<PGVRSetVar name="empty_name" value="f" />
	<PGVRSetVar name="empty_start_value" value="0" />
	<!-- New Page for Sources controller if SOUR exist -->
	<PGVRSetVar name="source_exist" value="0" />

	<PGVRDoc pageSize="$pageSize">
		<PGVRHeader>
			<PGVRCell align="center" height="30" newline="1" style="header"><PGVRvar var="pgv_lang[ahnentafel_header]" /><PGVRGetPersonName id="$pid" /></PGVRCell>
			<PGVRCell align="rightrtl" newline="1" style="pagenum"><PGVRvar var="pgv_lang[page]" /> <PGVRPageNum /> <PGVRvar var="pgv_lang[of]" /> <PGVRTotalPages /></PGVRCell>
		</PGVRHeader>

		<PGVRBody>
			<PGVRRelatives id="$pid" group="direct-ancestors" sortby="none" maxgen="$maxgen" showempty="true">
				<PGVRSetVar name="gender" value="m" />
				<PGVRSetVar name="pronoun" value="$pgv_lang[ahnentafel_pronoun_m]" />
				<PGVRif condition="@SEX=='F'">
					<PGVRSetVar name="pronoun" value="$pgv_lang[ahnentafel_pronoun_f]" />
					<PGVRSetVar name="gender" value="f" />
				</PGVRif>
				<PGVRSetVar name="printPronoun" value=" " />
				<PGVRif condition="$generation!=@generation">
					<PGVRif condition="$empty_name=='t'" >
						<PGVRTextBox width="50" height="20">
							<PGVRSetVar name="empty_end_value" value="$num-1" />
							<PGVRText style="text"><PGVRvar var="empty_start_value" />-<PGVRvar var="empty_end_value" />.</PGVRText>
						</PGVRTextBox>
						<PGVRTextBox width="475" height="12" newline="1" >
							<PGVRText style="text"><br /></PGVRText>
						</PGVRTextBox>
						<PGVRTextBox width="25" height="20" newline="1">
							<PGVRText style="text"><br /></PGVRText>
						</PGVRTextBox>
						<PGVRSetVar name="empty_start_value" value="$num" />
					</PGVRif>
					<PGVRCell align="center" height="30" newline="1" style="subheader"><PGVRvar var="pgv_lang[ahnentafel_generation]" /><PGVRGeneration /></PGVRCell>
					<PGVRSetVar name="generation" value="@generation" />
				</PGVRif>
				<PGVRSetVar name="indiname" value="@NAME" />
				<PGVRif condition="$indiname==''">
					<PGVRif condition="$empty_name=='f'">
						<PGVRSetVar name="empty_name" value="t" />
						<PGVRSetVar name="empty_start_value" value="$num" />
					</PGVRif>
				</PGVRif>
				<PGVRif condition="$indiname!=''">
					<PGVRif condition="$empty_name=='t'" >
						<PGVRTextBox width="50" height="20">
							<PGVRSetVar name="empty_end_value" value="$num-1" />
							<PGVRText style="text"><PGVRvar var="empty_start_value" />-<PGVRvar var="empty_end_value" />.</PGVRText>
						</PGVRTextBox>
						<PGVRTextBox width="475" height="12" newline="1">
							<PGVRText style="text"><br /></PGVRText>
						</PGVRTextBox>
						<PGVRTextBox width="25" height="20" newline="1">
							<PGVRText style="text"><br /></PGVRText>
						</PGVRTextBox>
						<PGVRSetVar name="empty_name" value="f" />
					</PGVRif>
					
					<!-- Generation counter -->
					<PGVRTextBox width="25" height="30">
						<PGVRText style="text"><PGVRvar var="num" />.</PGVRText>
					</PGVRTextBox>
					
					<!-- 	Sentence 1
							Individual, name... -->
					<PGVRTextBox height="12" newline="1">
						<PGVRText style="name"><PGVRGetPersonName id="" /> </PGVRText>
						<PGVRif condition="$sources==1">
							<!-- Level 1 Sourcees -->
							<PGVRRepeatTag tag="SOUR">
								<PGVRFootnote>
									<PGVRGedcom id="@SOUR">
										<PGVRGedcomValue tag="TITL" />
									</PGVRGedcom>
									<PGVRif condition="@PAGE!=''">: </PGVRif>
									<PGVRGedcomValue tag="SOUR:PAGE"/> <PGVRGedcomValue tag="SOUR:DATA:TEXT"/>
								</PGVRFootnote>
								<PGVRSetVar name="source_exist" value="1"/>
							</PGVRRepeatTag>
						</PGVRif>
						<!-- Individual, birth... -->
						<PGVRGedcom id="BIRT">
							<PGVRText style="text"><PGVRvar var="printPronoun" />
								<PGVRif condition="$gender=='m'">
									<PGVRvar var="pgv_lang[ahnentafel_born_m]" /> 
								</PGVRif>
								<PGVRif condition="$gender=='f'">
									<PGVRvar var="pgv_lang[ahnentafel_born_f]" /> 
								</PGVRif>
							</PGVRText>
							<PGVRif condition="$sources==1">
								<PGVRRepeatTag tag="BIRT:SOUR">
									<PGVRFootnote>
										<PGVRGedcom id="@SOUR">
											<PGVRGedcomValue tag="TITL" />
										</PGVRGedcom>
										<PGVRif condition="@PAGE!=''">: </PGVRif>
										<PGVRGedcomValue tag="PAGE" level="3"/> <PGVRGedcomValue tag="DATA:TEXT" level="3"/>
									</PGVRFootnote>
									<PGVRSetVar name="source_exist" value="1"/>
								</PGVRRepeatTag>
							</PGVRif>
							<PGVRif condition="@DATE!=''">
								<PGVRText style="text"><PGVRvar var="pgv_lang[ahnentafel_on]" /> <PGVRGedcomValue tag="DATE" level="2" /></PGVRText>
							</PGVRif>
							<PGVRif condition="@PLAC!=''">
								<PGVRText style="text"><PGVRvar var="pgv_lang[ahnentafel_place]" /> <PGVRGedcomValue tag="PLAC" level="2" /></PGVRText>
							</PGVRif>
							<PGVRif condition="(@desc=='Y') or (@DATE=='' and @PLAC=='')">
								<PGVRText style="text"><PGVRvar var="pgv_lang[ahnentafel_no_details]" /></PGVRText>
							</PGVRif>
							<PGVRText style="text">.</PGVRText>
							<PGVRSetVar name="printPronoun" value="$pronoun" />
						</PGVRGedcom>

						<!-- 	Sentence 2
								Individual, christened... -->
						<PGVRGedcom id="CHR">
							<PGVRText style="text">  <PGVRvar var="printPronoun" />
								<PGVRif condition="$gender=='m'">
									<PGVRvar var="pgv_lang[ahnentafel_christened_m]" /> 
								</PGVRif>
								<PGVRif condition="$gender=='f'">
									<PGVRvar var="pgv_lang[ahnentafel_christened_f]" /> 
								</PGVRif>
							</PGVRText>
							<PGVRif condition="$sources==1">
								<PGVRRepeatTag tag="CHR:SOUR">
									<PGVRFootnote>
										<PGVRGedcom id="@SOUR">
											<PGVRGedcomValue tag="TITL" />
										</PGVRGedcom>
										<PGVRif condition="@PAGE!=''">: </PGVRif>
										<PGVRGedcomValue tag="PAGE" level="3"/> <PGVRGedcomValue tag="DATA:TEXT" level="3"/>
									</PGVRFootnote>
									<PGVRSetVar name="source_exist" value="1"/>
								</PGVRRepeatTag>
							</PGVRif>
							<PGVRif condition="@DATE!=''">
								<PGVRText style="text"><PGVRvar var="pgv_lang[ahnentafel_on]" /> <PGVRGedcomValue tag="DATE" level="2" /></PGVRText>
							</PGVRif>
							<PGVRif condition="@PLAC!=''">
								<PGVRText style="text"><PGVRvar var="pgv_lang[ahnentafel_place]" /> <PGVRGedcomValue tag="PLAC" level="2" /></PGVRText>
							</PGVRif>
							<PGVRif condition="(@desc=='Y') or (@DATE=='' and @PLAC=='')">
								<PGVRText style="text"><PGVRvar var="pgv_lang[ahnentafel_no_details]" /></PGVRText>
							</PGVRif>
							<PGVRText style="text">.</PGVRText>
							<PGVRSetVar name="printPronoun" value="$pronoun" />
						</PGVRGedcom>
						<PGVRSetVar name="cpid" value="@ID" />
						<PGVRif condition="$cpid!=$spid">
							<PGVRGedcom id="@FAMS">
								<PGVRif condition="$cpid==@HUSB">
									<PGVRSetVar name="spid" value="@WIFE" />
								</PGVRif>
								<PGVRif condition="$cpid==@WIFE">
									<PGVRSetVar name="spid" value="@HUSB" />
								</PGVRif>
								<PGVRGedcom id="MARR">
									<PGVRif condition="$spid!='' and @DATE!='' and @PLAC!=''">
										<PGVRText style="text"><br /><PGVRvar var="printPronoun" />
											<PGVRif condition="$gender=='m'">
												<PGVRvar var="pgv_lang[ahnentafel_married_m]" /> 
											</PGVRif>
											<PGVRif condition="$gender=='f'">
												<PGVRvar var="pgv_lang[ahnentafel_married_f]" /> 
											</PGVRif>
										</PGVRText>
										<PGVRif condition="$sources==1">
											<PGVRRepeatTag tag="MARR:SOUR">
												<PGVRFootnote>
													<PGVRGedcom id="@SOUR">
														<PGVRGedcomValue tag="TITL" />
													</PGVRGedcom>
														<PGVRif condition="@PAGE!=''">: </PGVRif>
													<PGVRGedcomValue tag="PAGE" level="3"/> <PGVRGedcomValue tag="DATA:TEXT" level="3"/>
												</PGVRFootnote>
												<PGVRSetVar name="source_exist" value="1"/>
											</PGVRRepeatTag>
										</PGVRif>
										<PGVRif condition="$spid!=''">
											<PGVRText style="text"> <PGVRGetPersonName id="$spid" /></PGVRText>
										</PGVRif>
										<PGVRText style="text"> <PGVRvar var="pgv_lang[ahnentafel_married_post]" /></PGVRText>								
										<PGVRif condition="@DATE!=''">
											<PGVRText style="text"><PGVRvar var="pgv_lang[ahnentafel_on]" /> <PGVRGedcomValue tag="DATE" level="2" /><PGVRif condition="@PLAC==''"> </PGVRif></PGVRText>
										</PGVRif>
										<PGVRif condition="@PLAC!=''">
											<PGVRText style="text"><PGVRvar var="pgv_lang[ahnentafel_place]" /> <PGVRGedcomValue tag="PLAC" level="2" /></PGVRText>
										</PGVRif>
										<PGVRif condition="((@desc=='Y') or (@DATE=='' and @PLAC=='')) and ($spid=='')">
											<PGVRText style="text"><PGVRvar var="pgv_lang[ahnentafel_no_details]" /></PGVRText>
										</PGVRif>
										<PGVRText style="text">.</PGVRText>
										<PGVRSetVar name="printPronoun" value="$pronoun" />
									</PGVRif>
								</PGVRGedcom>
							</PGVRGedcom>
						</PGVRif>
						<PGVRGedcom id="DEAT">
							<PGVRText style="text"><br /><PGVRvar var="printPronoun" />
								<PGVRif condition="$gender=='m'">
									<PGVRvar var="pgv_lang[ahnentafel_died_m]" /> 
								</PGVRif>
								<PGVRif condition="$gender=='f'">
									<PGVRvar var="pgv_lang[ahnentafel_died_f]" /> 
								</PGVRif>
							</PGVRText>
							<PGVRif condition="$sources==1">
								<PGVRRepeatTag tag="DEAT:SOUR">
									<PGVRFootnote>
										<PGVRGedcom id="@SOUR">
											<PGVRGedcomValue tag="TITL" />
										</PGVRGedcom>
										<PGVRif condition="@PAGE!=''">: </PGVRif>
										<PGVRGedcomValue tag="PAGE" level="3"/> <PGVRGedcomValue tag="DATA:TEXT" level="3"/>
									</PGVRFootnote>
									<PGVRSetVar name="source_exist" value="1"/>
								</PGVRRepeatTag>
							</PGVRif>
							<PGVRif condition="@DATE!=''">
								<PGVRText style="text"><PGVRvar var="pgv_lang[ahnentafel_on]" /> <PGVRGedcomValue tag="DATE" level="2" /></PGVRText>
							</PGVRif>
							<PGVRif condition="@PLAC!=''">
								<PGVRText style="text"><PGVRvar var="pgv_lang[ahnentafel_place]" /> <PGVRGedcomValue tag="PLAC" level="2" /></PGVRText>
							</PGVRif>
							<PGVRif condition="(@desc=='Y') or (@DATE=='' and @PLAC=='')">
								<PGVRText style="text"> <PGVRvar var="pgv_lang[ahnentafel_no_details]" /></PGVRText>
							</PGVRif>
							<PGVRText style="text">.  </PGVRText>
							<PGVRSetVar name="printPronoun" value="$pronoun" />
						</PGVRGedcom>
						<PGVRGedcom id="BURI">
							<PGVRText style="text"><PGVRvar var="printPronoun" />
								<PGVRif condition="$gender=='m'">
									<PGVRvar var="pgv_lang[ahnentafel_buried_m]" /> 
								</PGVRif>
								<PGVRif condition="$gender=='f'">
									<PGVRvar var="pgv_lang[ahnentafel_buried_f]" /> 
								</PGVRif>
							</PGVRText>
							<PGVRif condition="$sources==1">
								<PGVRRepeatTag tag="BURI:SOUR">
									<PGVRFootnote>
										<PGVRGedcom id="@SOUR">
											<PGVRGedcomValue tag="TITL" />
										</PGVRGedcom>
										<PGVRif condition="@PAGE!=''">: </PGVRif>
										<PGVRGedcomValue tag="PAGE" level="3"/> <PGVRGedcomValue tag="DATA:TEXT" level="3"/>
									</PGVRFootnote>
									<PGVRSetVar name="source_exist" value="1"/>
								</PGVRRepeatTag>
							</PGVRif>
							<PGVRif condition="@DATE!=''">
								<PGVRText style="text"><PGVRvar var="pgv_lang[ahnentafel_on]" /> <PGVRGedcomValue tag="DATE" level="2" /></PGVRText>
							</PGVRif>
							<PGVRif condition="@PLAC!=''">
								<PGVRText style="text"><PGVRvar var="pgv_lang[ahnentafel_place]" /> <PGVRGedcomValue tag="PLAC" level="2" /></PGVRText>
							</PGVRif>
							<PGVRif condition="(@desc=='Y') or (@DATE=='' and @PLAC=='')">
								<PGVRText style="text"><PGVRvar var="pgv_lang[ahnentafel_no_details]" /></PGVRText>
							</PGVRif>
							<PGVRText style="text">.</PGVRText>
							<PGVRSetVar name="printPronoun" value="$pronoun" />
						</PGVRGedcom>
					</PGVRTextBox>
					<PGVRif condition="$notes==1">
						<PGVRRepeatTag tag="NOTE">
							<PGVRTextBox height="3" newline="1" padding="0"/>
							<PGVRCell height="12" left="30" newline="1" style="note"><PGVRGedcomValue tag="NOTE"/></PGVRCell>
						</PGVRRepeatTag>
					</PGVRif>
					<PGVRTextBox height="10" newline="1" padding="0"/>
				</PGVRif>
				<PGVRSetVar name="num" value="$num+1" />
			</PGVRRelatives>
			<!-- if the sources were on, print the source citations as footnotes -->
			<PGVRif condition="($sources==1) and ($source_exist==1)">
				<PGVRNewPage/>
				<PGVRTextBox width="$width" height="20" newline="1">
					<PGVRText style="subheader"><PGVRvar var="pgv_lang[sources]" /><br /><br /></PGVRText>
					<PGVRFootnoteTexts />
				</PGVRTextBox>
			</PGVRif>
		</PGVRBody>
		<PGVRFooter>
			<PGVRCell align="rightrtl" style="date"><PGVRNow /></PGVRCell>
		</PGVRFooter>
	</PGVRDoc>
</PGVReport>
