<?xml version="1.0" encoding="UTF-8"?>
<structure version="16" html-doctype="HTML4 Transitional" compatibility-view="IE9" relativeto="*SPS" encodinghtml="UTF-8" encodingrtf="ISO-8859-1" encodingpdf="UTF-8" useimportschema="1" embed-images="1" enable-authentic-scripts="1" authentic-scripts-in-debug-mode-external="0" generated-file-location="DEFAULT">
	<parameters/>
	<schemasources>
		<namespaces>
			<nspair prefix="ipo" uri="http://www.altova.com/IPO"/>
		</namespaces>
		<schemasources>
			<xsdschemasource name="XML" main="1" schemafile="ipo.xsd" workingxmlfile="ipo.xml"/>
		</schemasources>
	</schemasources>
	<modules/>
	<flags>
		<scripts/>
		<mainparts/>
		<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="fixed" pagemultiplepages="0" pagenumberingformat="1" pagenumberingstartat="auto" pagestart="next" paperheight="11in" papermarginbottom="0.79in" papermarginfooter="0.30in" papermarginheader="0.30in" papermarginleft="0.60in" papermarginright="0.60in" papermargintop="0.79in" paperwidth="8.50in"/>
						<watermark>
							<image transparency="50" fill-page="1" center-if-not-fill="1"/>
							<text transparency="50"/>
						</watermark>
					</documentsection>
					<template subtype="source" match="XML">
						<children>
							<paragraph paragraphtag="p">
								<properties class="info"/>
								<children>
									<text fixtext="Authentic validates document structure and content based on XML Schema associated with this document. This is an example demonstrating how to use the Additional Validation feature in order to provide further validation criteria specific to this entry form."/>
								</children>
							</paragraph>
							<paragraph paragraphtag="p">
								<properties class="explanation"/>
								<children>
									<text fixtext="This is an advanced example of providing additional validation to your entry form. Instead of extending validation of single values, we validate a combination of them (using XPath you have a huge freedom of what different things can be validated). In this particular example we want to limit a purchase order to 5 entries and the overall price to $5000. This is achieved by using variables $CountOfItems and $OverallPrice defined in Items template - they are used for both display purposes and additional validation at the same time."/>
								</children>
							</paragraph>
							<template subtype="element" match="ipo:purchaseOrder">
								<children>
									<template subtype="element" match="Items">
										<children>
											<tgrid>
												<properties border="1"/>
												<children>
													<tgridbody-cols>
														<children>
															<tgridcol/>
															<tgridcol/>
															<tgridcol/>
															<tgridcol/>
															<tgridcol/>
															<tgridcol/>
														</children>
													</tgridbody-cols>
													<tgridheader-rows>
														<children>
															<tgridrow>
																<children>
																	<tgridcell>
																		<children>
																			<text fixtext="Part number"/>
																		</children>
																	</tgridcell>
																	<tgridcell>
																		<children>
																			<text fixtext="Product name"/>
																		</children>
																	</tgridcell>
																	<tgridcell>
																		<children>
																			<text fixtext="Quantity"/>
																		</children>
																	</tgridcell>
																	<tgridcell>
																		<children>
																			<text fixtext="Price"/>
																		</children>
																	</tgridcell>
																	<tgridcell>
																		<children>
																			<text fixtext="Shipping date"/>
																		</children>
																	</tgridcell>
																	<tgridcell>
																		<children>
																			<text fixtext="Comment"/>
																		</children>
																	</tgridcell>
																</children>
															</tgridrow>
														</children>
													</tgridheader-rows>
													<tgridbody-rows>
														<children>
															<template subtype="element" match="item">
																<children>
																	<tgridrow>
																		<children>
																			<tgridcell>
																				<children>
																					<template subtype="attribute" match="partNum">
																						<children>
																							<content subtype="regular"/>
																						</children>
																						<variables/>
																					</template>
																				</children>
																			</tgridcell>
																			<tgridcell>
																				<children>
																					<template subtype="element" match="productName">
																						<children>
																							<content subtype="regular"/>
																						</children>
																						<variables/>
																					</template>
																				</children>
																			</tgridcell>
																			<tgridcell>
																				<styles text-align="right"/>
																				<children>
																					<template subtype="element" match="quantity">
																						<children>
																							<content subtype="regular">
																								<format basic-type="xsd" datatype="positiveInteger"/>
																							</content>
																						</children>
																						<variables/>
																					</template>
																				</children>
																			</tgridcell>
																			<tgridcell>
																				<styles text-align="right"/>
																				<children>
																					<template subtype="element" match="price">
																						<children>
																							<content subtype="regular">
																								<format basic-type="xsd" datatype="decimal"/>
																							</content>
																						</children>
																						<variables/>
																					</template>
																				</children>
																			</tgridcell>
																			<tgridcell>
																				<children>
																					<template subtype="element" match="shipDate">
																						<children>
																							<content subtype="regular">
																								<format basic-type="xsd" datatype="date"/>
																							</content>
																						</children>
																						<variables/>
																					</template>
																				</children>
																			</tgridcell>
																			<tgridcell>
																				<children>
																					<template subtype="element" match="ipo:comment">
																						<children>
																							<content subtype="regular"/>
																						</children>
																						<variables/>
																					</template>
																				</children>
																			</tgridcell>
																		</children>
																	</tgridrow>
																</children>
																<variables/>
															</template>
														</children>
													</tgridbody-rows>
													<tgridfooter-rows>
														<children>
															<tgridrow>
																<children>
																	<tgridcell>
																		<children>
																			<text fixtext="Overall count of articles: "/>
																			<template subtype="uservariable" match="$CountOfItems">
																				<children>
																					<content subtype="regular">
																						<addvalidations>
																							<addvalidation usermsg="A single purchase order cannot have more than 5 articles!" xpath="$CountOfItems &lt;= 5"/>
																						</addvalidations>
																					</content>
																				</children>
																				<variables/>
																			</template>
																		</children>
																	</tgridcell>
																	<tgridcell joinleft="1"/>
																	<tgridcell>
																		<styles text-align="right"/>
																		<children>
																			<text fixtext="Overall price: "/>
																			<template subtype="uservariable" match="$OverallPrice">
																				<children>
																					<content subtype="regular">
																						<addvalidations>
																							<addvalidation usermsg="Overall price of a single purchase order cannot exceed 5000 dollars!" xpath="$OverallPrice &lt;= 5000"/>
																						</addvalidations>
																					</content>
																				</children>
																				<variables/>
																			</template>
																			<text fixtext=" "/>
																		</children>
																	</tgridcell>
																	<tgridcell joinleft="1"/>
																	<tgridcell/>
																	<tgridcell joinleft="1"/>
																</children>
															</tgridrow>
														</children>
													</tgridfooter-rows>
												</children>
											</tgrid>
										</children>
										<variables>
											<variable name="CountOfItems" value="count(item)" valuetype="&lt;auto&gt;"/>
											<variable name="OverallPrice" value="sum(item/price)" valuetype="&lt;auto&gt;"/>
										</variables>
									</template>
								</children>
								<variables/>
							</template>
						</children>
						<variables/>
					</template>
				</children>
			</globaltemplate>
		</children>
	</mainparts>
	<globalparts/>
	<designfragments/>
	<xmltables/>
	<authentic-custom-toolbar-buttons/>
</structure>
