<?xml version="1.0" encoding="UTF-8"?>
<structure version="14" html-doctype="HTML4 Transitional" compatibility-view="IE9" relativeto="*SPS" encodinghtml="UTF-8" encodingrtf="ISO-8859-1" encodingpdf="UTF-8" useimportschema="1" embed-images="1" pastemode="xml" enable-authentic-scripts="1" authentic-scripts-in-debug-mode-external="0" generated-file-location="DEFAULT">
	<parameters/>
	<schemasources>
		<namespaces/>
		<schemasources>
			<xsdschemasource name="XML" main="1" schemafile="Directory.xsd" workingxmlfile="Directory.xml"/>
		</schemasources>
	</schemasources>
	<modules/>
	<flags>
		<scripts/>
		<globalparts/>
		<designfragments/>
		<pagelayouts/>
		<xpath-functions/>
	</flags>
	<scripts>
		<script language="javascript"/>
	</scripts>
	<script-project>
		<Project version="2" app="AuthenticView"/>
	</script-project>
	<importedxslt/>
	<globalstyles>
		<rule url="Samples.css">
			<media>
				<media value="all"/>
			</media>
		</rule>
	</globalstyles>
	<mainparts>
		<children>
			<globaltemplate subtype="main" match="/">
				<document-properties/>
				<children>
					<documentsection>
						<properties columncount="1" columngap="0.50in" headerfooterheight="variable" pagemultiplepages="0" pagenumberingformat="1" pagenumberingstartat="auto" pagestart="next" paperheight="11.69in" papermarginbottom="0.79in" papermarginfooter="0.5in" papermarginheader="0.5in" papermarginleft="0.6in" papermarginright="0.6in" papermargintop="0.79in" paperwidth="8.27in"/>
					</documentsection>
					<template subtype="source" match="XML">
						<children>
							<paragraph paragraphtag="p">
								<properties class="info"/>
								<children>
									<text fixtext="This example shows how to use Variables in your design."/>
								</children>
							</paragraph>
							<paragraph paragraphtag="p">
								<properties class="explanation"/>
								<children>
									<text fixtext="For every template, including $XML, you can define variables and assign them values by using context menu &quot;Define Variables&quot;. The variables can be then used in different XPath statements for conditions, auto-calcs and so on. Note: they are only visible inside of a subtree from the point where they were defined."/>
								</children>
							</paragraph>
							<paragraph paragraphtag="p">
								<properties class="explanation"/>
								<children>
									<text fixtext="In this particular example $XML node got two variables - SmallestFileOfAll and BiggestFileOfAll. These variables have been used in the condition below in order to display which file is the biggest and which is the smallest in red color. In addition to them, the first table template //directory got its own variables - SmallestFileInDir and BiggestFileInDir, which have a similar meaning but inside of one folder and are indicated by text in green color."/>
								</children>
							</paragraph>
							<tgrid>
								<properties border="1"/>
								<children>
									<tgridbody-cols>
										<children>
											<tgridcol/>
											<tgridcol/>
											<tgridcol/>
											<tgridcol/>
										</children>
									</tgridbody-cols>
									<tgridheader-rows>
										<children>
											<tgridrow>
												<children>
													<tgridcell>
														<children>
															<text fixtext="Folder"/>
														</children>
													</tgridcell>
													<tgridcell>
														<children>
															<text fixtext="Filename"/>
														</children>
													</tgridcell>
													<tgridcell>
														<children>
															<text fixtext="Size"/>
														</children>
													</tgridcell>
													<tgridcell>
														<children>
															<text fixtext="Comments"/>
														</children>
													</tgridcell>
												</children>
											</tgridrow>
										</children>
									</tgridheader-rows>
									<tgridbody-rows>
										<children>
											<template subtype="userdefined" match="//directory">
												<children>
													<template subtype="element" match="file">
														<children>
															<tgridrow>
																<children>
																	<tgridcell>
																		<children>
																			<autocalc xpath="string-join( ( ancestor::* )[ position() &gt; 1 ]/@name, &apos;\&apos; )"/>
																		</children>
																	</tgridcell>
																	<tgridcell>
																		<children>
																			<template subtype="attribute" match="name">
																				<children>
																					<content/>
																				</children>
																				<variables/>
																			</template>
																		</children>
																	</tgridcell>
																	<tgridcell>
																		<children>
																			<template subtype="attribute" match="size">
																				<children>
																					<content>
																						<format basic-type="xsd" datatype="unsignedLong"/>
																					</content>
																				</children>
																				<variables/>
																			</template>
																		</children>
																	</tgridcell>
																	<tgridcell>
																		<children>
																			<condition>
																				<children>
																					<conditionbranch xpath="@size = $SmallestFileOfAll">
																						<children>
																							<text fixtext="this file is the SMALLEST of all!">
																								<styles color="red"/>
																							</text>
																						</children>
																					</conditionbranch>
																					<conditionbranch xpath="@size = $BiggestFileOfAll">
																						<children>
																							<text fixtext="this file is the BIGGEST of all!">
																								<styles color="red"/>
																							</text>
																						</children>
																					</conditionbranch>
																					<conditionbranch xpath="@size = $SmallestFileInDir">
																						<children>
																							<text fixtext="this file is the SMALLEST in its directory!">
																								<styles color="green"/>
																							</text>
																						</children>
																					</conditionbranch>
																					<conditionbranch xpath="@size = $BiggestFileInDir">
																						<children>
																							<text fixtext="this file is the BIGGEST in its directory!">
																								<styles color="green"/>
																							</text>
																						</children>
																					</conditionbranch>
																				</children>
																			</condition>
																		</children>
																	</tgridcell>
																</children>
															</tgridrow>
														</children>
														<variables/>
													</template>
												</children>
												<variables>
													<variable name="SmallestFileInDir" value="min( file/@size )" valuetype="&lt;auto&gt;"/>
													<variable name="BiggestFileInDir" value="max( file/@size )" valuetype="&lt;auto&gt;"/>
												</variables>
											</template>
										</children>
									</tgridbody-rows>
								</children>
							</tgrid>
						</children>
						<variables>
							<variable name="SmallestFileOfAll" value="min( //file/@size )" valuetype="&lt;auto&gt;"/>
							<variable name="BiggestFileOfAll" value="max( //file/@size )" valuetype="&lt;auto&gt;"/>
						</variables>
					</template>
				</children>
			</globaltemplate>
		</children>
	</mainparts>
	<globalparts/>
	<designfragments/>
	<xmltables/>
	<authentic-custom-toolbar-buttons/>
</structure>
