<?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="Data.xsd" workingxmlfile="Data.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>
		<rules selector=".info">
			<media>
				<media value="all"/>
			</media>
			<rule background-color="#f6f6ff" border="1px solid navy" color="navy" font-weight="bold" margin-bottom="12px" margin-top="12px" padding="2px"/>
		</rules>
		<rules selector=".explanation">
			<media>
				<media value="all"/>
			</media>
			<rule color="blue" font-style="italic" margin-bottom="12px"/>
		</rules>
	</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.0in" papermarginheader="0.0in" papermarginleft="0.6in" papermarginright="0.6in" papermargintop="0.79in" paperwidth="8.27in"/>
					</documentsection>
					<paragraph paragraphtag="h2">
						<styles border-bottom="2px solid navy" color="navy"/>
						<children>
							<text fixtext="Example: Conditions"/>
						</children>
					</paragraph>
					<paragraph paragraphtag="p">
						<properties class="info"/>
						<children>
							<text fixtext="Conditions allow you to selectively display parts of your design, according to whether an XPath expression you define evaluates to &apos;true&apos;. A special version of such conditions, &quot;output-based conditions&quot; allow you to check which target format (Authentic, HTML, RTF, PDF or Word 2007) is being rendered."/>
						</children>
					</paragraph>
					<template subtype="source" match="XML">
						<children>
							<template subtype="element" match="data">
								<children>
									<template subtype="element" match="numbers">
										<children>
											<paragraph paragraphtag="p">
												<properties class="explanation"/>
												<children>
													<text fixtext="The basic condition only has 1 branch. It is shown if the XPath expression evaluates to &apos;true&apos;, and omitted otherwise. In below example we show all values of our XML file, and write &quot;"/>
													<text fixtext="too high!">
														<styles color="#c00000"/>
													</text>
													<text fixtext="&quot; next to it if it is greater than 1000."/>
												</children>
											</paragraph>
											<template subtype="element" match="number">
												<children>
													<template subtype="attribute" match="value">
														<children>
															<content>
																<format basic-type="xsd" datatype="decimal"/>
															</content>
															<condition>
																<children>
																	<conditionbranch xpath=". &gt; 1000">
																		<children>
																			<text fixtext=" "/>
																			<text fixtext="too high!">
																				<styles color="#c00000"/>
																			</text>
																		</children>
																	</conditionbranch>
																</children>
															</condition>
														</children>
														<variables/>
													</template>
													<newline/>
												</children>
												<variables/>
											</template>
											<paragraph paragraphtag="p">
												<properties class="explanation"/>
												<children>
													<text fixtext="You can also chain several such branches next to each other. The XPath expression in each one will be evaluated, and the first successful branch will be rendered. If no branch evaluates to &apos;true&apos;, then nothing will be shown. However, you can also specify the last branch to be an &quot;otherwise&quot; branch, i.e., be used in case no other branch evaluates to true."/>
												</children>
											</paragraph>
											<newline/>
											<paragraph paragraphtag="p">
												<properties class="explanation"/>
												<children>
													<text fixtext="In below example, we use 3 branches: if the number is greater than 1000, then we write &quot;"/>
													<text fixtext="too high!">
														<styles color="#c00000"/>
													</text>
													<text fixtext="&quot; as before. If the number is between 100 and 1000, we write &quot;"/>
													<text fixtext="somewhat high">
														<styles color="#c04b00"/>
													</text>
													<text fixtext="&quot;, and &quot;"/>
													<text fixtext="OK">
														<styles color="green"/>
													</text>
													<text fixtext="&quot; otherwise. Note that you can switch between the branches by clicking on the branch selectors labeled &apos;1&apos;, &apos;2&apos; and &apos;*&apos;, respectively."/>
												</children>
											</paragraph>
											<template subtype="element" match="number">
												<children>
													<template subtype="attribute" match="value">
														<children>
															<content>
																<format basic-type="xsd" datatype="decimal"/>
															</content>
															<condition>
																<children>
																	<conditionbranch xpath=". &gt; 1000">
																		<children>
																			<text fixtext=" "/>
																			<text fixtext="too high!">
																				<styles color="#c00000"/>
																			</text>
																		</children>
																	</conditionbranch>
																	<conditionbranch xpath=". &gt; 100">
																		<children>
																			<text fixtext=" "/>
																			<text fixtext="somewhat high">
																				<styles color="#c04b00"/>
																			</text>
																		</children>
																	</conditionbranch>
																	<conditionbranch>
																		<children>
																			<text fixtext=" "/>
																			<text fixtext="OK">
																				<styles color="green"/>
																			</text>
																		</children>
																	</conditionbranch>
																</children>
															</condition>
														</children>
														<variables/>
													</template>
													<newline/>
												</children>
												<variables/>
											</template>
											<paragraph paragraphtag="p">
												<properties class="explanation"/>
												<children>
													<text fixtext="An output-based condition works in the same way. It checks a predefined variable &quot;$SV_OutputFormat&quot; to check what kind of output is being rendered. Below we format the numbers using the default output-based condition with 5 branches. We will use an edit field for HTML and Authentic, and plain text for all other targets."/>
												</children>
											</paragraph>
											<template subtype="element" match="number">
												<children>
													<template subtype="attribute" match="value">
														<children>
															<condition>
																<children>
																	<conditionbranch xpath="$SV_OutputFormat = &apos;Authentic&apos;">
																		<children>
																			<editfield>
																				<children>
																					<content>
																						<format basic-type="xsd" datatype="decimal"/>
																					</content>
																				</children>
																			</editfield>
																		</children>
																	</conditionbranch>
																	<conditionbranch xpath="$SV_OutputFormat = &apos;HTML&apos;">
																		<children>
																			<editfield>
																				<children>
																					<content>
																						<format basic-type="xsd" datatype="decimal"/>
																					</content>
																				</children>
																			</editfield>
																		</children>
																	</conditionbranch>
																	<conditionbranch xpath="$SV_OutputFormat = &apos;RTF&apos;">
																		<children>
																			<content>
																				<format basic-type="xsd" datatype="decimal"/>
																			</content>
																		</children>
																	</conditionbranch>
																	<conditionbranch xpath="$SV_OutputFormat = &apos;PDF&apos;">
																		<children>
																			<content>
																				<format basic-type="xsd" datatype="decimal"/>
																			</content>
																		</children>
																	</conditionbranch>
																	<conditionbranch xpath="$SV_OutputFormat = &apos;Word2007&apos;">
																		<children>
																			<content>
																				<format basic-type="xsd" datatype="decimal"/>
																			</content>
																		</children>
																	</conditionbranch>
																</children>
															</condition>
														</children>
														<variables/>
													</template>
													<newline/>
												</children>
												<variables/>
											</template>
										</children>
										<variables/>
									</template>
								</children>
								<variables/>
							</template>
						</children>
						<variables/>
					</template>
				</children>
			</globaltemplate>
		</children>
	</mainparts>
	<globalparts/>
	<designfragments/>
	<xmltables/>
	<authentic-custom-toolbar-buttons/>
</structure>
