<?xml version="1.0" encoding="UTF-8"?>
<structure version="15" 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>
		<parameter name="StyleScheme" default="green"/>
	</parameters>
	<schemasources>
		<namespaces>
			<nspair prefix="altova1" uri="http://www.altova.com/xml-schema-extensions"/>
		</namespaces>
		<schemasources>
			<xsdschemasource name="XML" main="1" schemafile="Music Archive.xsd" workingxmlfile="Music Archive.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 import-usage="single-dynamic" css-switch="concat($StyleScheme, '.css')">
		<rule url="green.css">
			<media>
				<media value="all"/>
			</media>
		</rule>
		<rule url="blue.css">
			<media>
				<media value="all"/>
			</media>
		</rule>
		<rule url="red.css">
			<media>
				<media value="all"/>
			</media>
		</rule>
		<rules selector=".info">
			<media>
				<media value="all"/>
			</media>
			<rule background-color="#f6f6ff" border="1px solid navy" color="navy" font-style="normal" font-weight="bold"/>
		</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="1.27cm" headerfooterheight="fixed" pagemultiplepages="0" pagenumberingformat="1" pagenumberingstartat="auto" pagestart="next" paperheight="27.94cm" papermarginbottom="2.01cm" papermarginfooter="0.76cm" papermarginheader="0.76cm" papermarginleft="1.52cm" papermarginright="1.52cm" papermargintop="2.01cm" paperwidth="21.59cm"/>
					</documentsection>
					<paragraph paragraphtag="h2">
						<styles border-bottom="2px solid navy" color="navy"/>
						<children>
							<text fixtext="Example: Composite Styles and CSS Switching"/>
						</children>
					</paragraph>
					<paragraph paragraphtag="p">
						<properties class="info"/>
						<children>
							<text fixtext="This example shows how to apply CSS formatting that is stored in an XML file, and how to select a CSS file at transformation time."/>
						</children>
					</paragraph>
					<paragraph paragraphtag="p">
						<properties class="explanation"/>
						<children>
							<text fixtext="The Working XML file represents a music archive. In addition to holding individual values for elements like title and artist, each recording can hold individual CSS formatting for those elements. This information is used to display an approximate rendering of the recording&apos;s cover design."/>
						</children>
					</paragraph>
					<paragraph paragraphtag="p">
						<properties class="explanation"/>
						<children>
							<text fixtext="The design achieves this with the &quot;composite style&quot; property of the contents elements that display the title and the artist."/>
						</children>
					</paragraph>
					<paragraph paragraphtag="p">
						<properties class="explanation"/>
						<children>
							<text fixtext="Furthermore, this design uses CSS switching to select a CSS file at transformation time. Notice that the color and other style information of the green paragraphs below is applied via the &quot;class&quot; property of the paragraph design elements. The design imports several CSS files that each define these classes, and the CSS switch determines which CSS file is used. To see the CSS switch, click the button next to one of the CSS files in the Design Overview window. The CSS switch uses the design parameter named StyleScheme, so changing the parameter&apos;s value from green to blue or red will alter the appearance of the output documents."/>
						</children>
					</paragraph>
					<paragraph paragraphtag="p">
						<properties class="explanation"/>
						<children>
							<text fixtext="Notes on using a CSS switch:"/>
							<newline/>
							<newline/>
							<text fixtext="- The CSS switch only affects rules applied via the &quot;class&quot; property"/>
							<newline/>
							<text fixtext="- When a CSS switch is active, Design View uses the first included CSS file"/>
						</children>
					</paragraph>
					<template subtype="source" match="XML">
						<children>
							<template subtype="element" match="MusicArchive">
								<children>
									<template subtype="element" match="Recording">
										<children>
											<paragraph paragraphtag="p">
												<properties class="header1"/>
												<children>
													<autocalc xpath="concat(Artist/Name, &apos;: &apos;, Title/Name)"/>
												</children>
											</paragraph>
											<paragraph paragraphtag="p">
												<properties class="header2"/>
												<children>
													<text fixtext="Recording Info"/>
												</children>
											</paragraph>
											<tgrid>
												<properties width="100%"/>
												<children>
													<tgridbody-cols>
														<children>
															<tgridcol>
																<styles width="20%"/>
															</tgridcol>
															<tgridcol>
																<styles width="40%"/>
															</tgridcol>
															<tgridcol>
																<styles width="40%"/>
															</tgridcol>
														</children>
													</tgridbody-cols>
													<tgridbody-rows>
														<children>
															<tgridrow>
																<children>
																	<tgridcell>
																		<children>
																			<text fixtext="Title:"/>
																		</children>
																	</tgridcell>
																	<tgridcell>
																		<children>
																			<template subtype="element" match="Title">
																				<children>
																					<content/>
																				</children>
																				<variables/>
																			</template>
																			<text fixtext=" ("/>
																			<template subtype="attribute" match="Label">
																				<children>
																					<content/>
																				</children>
																				<variables/>
																			</template>
																			<text fixtext=", "/>
																			<template subtype="attribute" match="YearRecorded">
																				<children>
																					<content>
																						<format basic-type="xsd" datatype="gYear"/>
																					</content>
																				</children>
																				<variables/>
																			</template>
																			<text fixtext=")"/>
																		</children>
																	</tgridcell>
																	<tgridcell/>
																</children>
															</tgridrow>
															<tgridrow>
																<children>
																	<tgridcell>
																		<children>
																			<text fixtext="Artist:"/>
																		</children>
																	</tgridcell>
																	<tgridcell>
																		<children>
																			<template subtype="element" match="Artist">
																				<children>
																					<content/>
																				</children>
																				<variables/>
																			</template>
																		</children>
																	</tgridcell>
																	<tgridcell joinabove="1"/>
																</children>
															</tgridrow>
															<tgridrow>
																<children>
																	<tgridcell>
																		<children>
																			<text fixtext="Genre:"/>
																		</children>
																	</tgridcell>
																	<tgridcell>
																		<children>
																			<template subtype="attribute" match="Genre">
																				<children>
																					<combobox enumeration="1">
																						<children>
																							<content/>
																						</children>
																						<selectoption description="Classic" value="Classic"/>
																						<selectoption description="Folk" value="Folk"/>
																						<selectoption description="Gospel" value="Gospel"/>
																						<selectoption description="Hard Rock" value="Hard Rock"/>
																						<selectoption description="Jazz" value="Jazz"/>
																						<selectoption description="Pop" value="Pop"/>
																						<selectoption description="R&amp;B" value="R&amp;B"/>
																						<selectoption description="Reggae" value="Reggae"/>
																						<selectoption description="Rock" value="Rock"/>
																					</combobox>
																				</children>
																				<variables/>
																			</template>
																		</children>
																	</tgridcell>
																	<tgridcell joinabove="1"/>
																</children>
															</tgridrow>
															<tgridrow>
																<children>
																	<tgridcell>
																		<children>
																			<text fixtext="Medium:"/>
																		</children>
																	</tgridcell>
																	<tgridcell>
																		<children>
																			<template subtype="attribute" match="StorageMedium">
																				<children>
																					<combobox enumeration="1">
																						<children>
																							<content/>
																						</children>
																						<selectoption description="Cassette" value="Cassette"/>
																						<selectoption description="CD" value="CD"/>
																						<selectoption description="MP3" value="MP3"/>
																						<selectoption description="Shellac" value="Shellac"/>
																						<selectoption description="Vinyl" value="Vinyl"/>
																					</combobox>
																				</children>
																				<variables/>
																			</template>
																		</children>
																	</tgridcell>
																	<tgridcell joinabove="1"/>
																</children>
															</tgridrow>
															<tgridrow>
																<children>
																	<tgridcell>
																		<children>
																			<text fixtext="Acquired:"/>
																		</children>
																	</tgridcell>
																	<tgridcell>
																		<children>
																			<template subtype="attribute" match="DateAcquired">
																				<children>
																					<content>
																						<format basic-type="xsd" datatype="date"/>
																					</content>
																					<text fixtext=" "/>
																					<button>
																						<action>
																							<datepicker/>
																						</action>
																					</button>
																				</children>
																				<variables/>
																			</template>
																		</children>
																	</tgridcell>
																	<tgridcell joinabove="1"/>
																</children>
															</tgridrow>
														</children>
													</tgridbody-rows>
												</children>
											</tgrid>
											<condition>
												<children>
													<conditionbranch xpath="$SV_OutputFormat = &apos;Authentic&apos;">
														<children>
															<paragraph paragraphtag="p">
																<properties class="header2"/>
																<children>
																	<text fixtext="Cover Designer"/>
																</children>
															</paragraph>
															<tgrid>
																<properties width="100%"/>
																<children>
																	<tgridbody-cols>
																		<children>
																			<tgridcol>
																				<styles width="20%"/>
																			</tgridcol>
																			<tgridcol>
																				<styles width="40%"/>
																			</tgridcol>
																			<tgridcol>
																				<styles width="40%"/>
																			</tgridcol>
																		</children>
																	</tgridbody-cols>
																	<tgridbody-rows>
																		<children>
																			<tgridrow>
																				<children>
																					<tgridcell>
																						<styles text-align="center"/>
																					</tgridcell>
																					<tgridcell>
																						<children>
																							<text fixtext="Title">
																								<styles font-weight="bold"/>
																							</text>
																							<text fixtext=" ("/>
																							<autocalc xpath="Title/Name"/>
																							<text fixtext=")"/>
																						</children>
																					</tgridcell>
																					<tgridcell>
																						<children>
																							<text fixtext="Artist">
																								<styles font-weight="bold"/>
																							</text>
																							<text fixtext=" ("/>
																							<autocalc xpath="Artist/Name"/>
																							<text fixtext=")"/>
																						</children>
																					</tgridcell>
																				</children>
																			</tgridrow>
																			<tgridrow>
																				<children>
																					<tgridcell>
																						<children>
																							<text fixtext="Alignment:"/>
																						</children>
																					</tgridcell>
																					<tgridcell>
																						<children>
																							<template subtype="element" match="Title">
																								<children>
																									<template subtype="element" match="ParagraphStyles">
																										<children>
																											<template subtype="element" filter="@Name = &apos;text-align&apos;" match="Style">
																												<children>
																													<template subtype="attribute" match="Value">
																														<children>
																															<combobox>
																																<styles width="3.70cm"/>
																																<children>
																																	<content/>
																																</children>
																																<selectoption description="left" value="left"/>
																																<selectoption description="center" value="center"/>
																																<selectoption description="right" value="right"/>
																															</combobox>
																														</children>
																														<variables/>
																													</template>
																												</children>
																												<variables/>
																											</template>
																										</children>
																										<variables/>
																									</template>
																								</children>
																								<variables/>
																							</template>
																						</children>
																					</tgridcell>
																					<tgridcell>
																						<children>
																							<template subtype="element" match="Artist">
																								<children>
																									<template subtype="element" match="ParagraphStyles">
																										<children>
																											<template subtype="element" filter="@Name = &apos;text-align&apos;" match="Style">
																												<children>
																													<template subtype="attribute" match="Value">
																														<children>
																															<combobox>
																																<styles width="3.70cm"/>
																																<children>
																																	<content/>
																																</children>
																																<selectoption description="left" value="left"/>
																																<selectoption description="center" value="center"/>
																																<selectoption description="right" value="right"/>
																															</combobox>
																														</children>
																														<variables/>
																													</template>
																												</children>
																												<variables/>
																											</template>
																										</children>
																										<variables/>
																									</template>
																								</children>
																								<variables/>
																							</template>
																						</children>
																					</tgridcell>
																				</children>
																			</tgridrow>
																			<tgridrow>
																				<children>
																					<tgridcell>
																						<children>
																							<text fixtext="Color:"/>
																						</children>
																					</tgridcell>
																					<tgridcell>
																						<children>
																							<template subtype="element" match="Title">
																								<children>
																									<template subtype="element" match="CharacterStyles">
																										<children>
																											<template subtype="element" filter="@Name = &apos;color&apos;" match="Style">
																												<children>
																													<template subtype="attribute" match="Value">
																														<children>
																															<editfield>
																																<styles width="3.70cm"/>
																																<children>
																																	<content/>
																																</children>
																															</editfield>
																														</children>
																														<variables/>
																													</template>
																												</children>
																												<variables/>
																											</template>
																										</children>
																										<variables/>
																									</template>
																								</children>
																								<variables/>
																							</template>
																						</children>
																					</tgridcell>
																					<tgridcell>
																						<children>
																							<template subtype="element" match="Artist">
																								<children>
																									<template subtype="element" match="CharacterStyles">
																										<children>
																											<template subtype="element" filter="@Name = &apos;color&apos;" match="Style">
																												<children>
																													<template subtype="attribute" match="Value">
																														<children>
																															<editfield>
																																<styles width="3.70cm"/>
																																<children>
																																	<content/>
																																</children>
																															</editfield>
																														</children>
																														<variables/>
																													</template>
																												</children>
																												<variables/>
																											</template>
																										</children>
																										<variables/>
																									</template>
																								</children>
																								<variables/>
																							</template>
																						</children>
																					</tgridcell>
																				</children>
																			</tgridrow>
																			<tgridrow>
																				<children>
																					<tgridcell>
																						<children>
																							<text fixtext="Font family:"/>
																						</children>
																					</tgridcell>
																					<tgridcell>
																						<children>
																							<template subtype="element" match="Title">
																								<children>
																									<template subtype="element" match="CharacterStyles">
																										<children>
																											<template subtype="element" filter="@Name = &apos;font-family&apos;" match="Style">
																												<children>
																													<template subtype="attribute" match="Value">
																														<children>
																															<editfield>
																																<styles width="3.70cm"/>
																																<children>
																																	<content/>
																																</children>
																															</editfield>
																														</children>
																														<variables/>
																													</template>
																												</children>
																												<variables/>
																											</template>
																										</children>
																										<variables/>
																									</template>
																								</children>
																								<variables/>
																							</template>
																						</children>
																					</tgridcell>
																					<tgridcell>
																						<children>
																							<template subtype="element" match="Artist">
																								<children>
																									<template subtype="element" match="CharacterStyles">
																										<children>
																											<template subtype="element" filter="@Name = &apos;font-family&apos;" match="Style">
																												<children>
																													<template subtype="attribute" match="Value">
																														<children>
																															<editfield>
																																<styles width="3.70cm"/>
																																<children>
																																	<content/>
																																</children>
																															</editfield>
																														</children>
																														<variables/>
																													</template>
																												</children>
																												<variables/>
																											</template>
																										</children>
																										<variables/>
																									</template>
																								</children>
																								<variables/>
																							</template>
																						</children>
																					</tgridcell>
																				</children>
																			</tgridrow>
																			<tgridrow>
																				<children>
																					<tgridcell>
																						<children>
																							<text fixtext="Font size:"/>
																						</children>
																					</tgridcell>
																					<tgridcell>
																						<children>
																							<template subtype="element" match="Title">
																								<children>
																									<template subtype="element" match="CharacterStyles">
																										<children>
																											<template subtype="element" filter="@Name = &apos;font-size&apos;" match="Style">
																												<children>
																													<template subtype="attribute" match="Value">
																														<children>
																															<editfield>
																																<styles width="3.70cm"/>
																																<children>
																																	<content/>
																																</children>
																															</editfield>
																														</children>
																														<variables/>
																													</template>
																												</children>
																												<variables/>
																											</template>
																										</children>
																										<variables/>
																									</template>
																								</children>
																								<variables/>
																							</template>
																						</children>
																					</tgridcell>
																					<tgridcell>
																						<children>
																							<template subtype="element" match="Artist">
																								<children>
																									<template subtype="element" match="CharacterStyles">
																										<children>
																											<template subtype="element" filter="@Name = &apos;font-size&apos;" match="Style">
																												<children>
																													<template subtype="attribute" match="Value">
																														<children>
																															<editfield>
																																<styles width="3.70cm"/>
																																<children>
																																	<content/>
																																</children>
																															</editfield>
																														</children>
																														<variables/>
																													</template>
																												</children>
																												<variables/>
																											</template>
																										</children>
																										<variables/>
																									</template>
																								</children>
																								<variables/>
																							</template>
																						</children>
																					</tgridcell>
																				</children>
																			</tgridrow>
																			<tgridrow>
																				<children>
																					<tgridcell>
																						<children>
																							<text fixtext="Font style:"/>
																						</children>
																					</tgridcell>
																					<tgridcell>
																						<children>
																							<template subtype="element" match="Title">
																								<children>
																									<template subtype="element" match="CharacterStyles">
																										<children>
																											<template subtype="element" filter="@Name = &apos;font-style&apos;" match="Style">
																												<children>
																													<template subtype="attribute" match="Value">
																														<children>
																															<combobox>
																																<children>
																																	<content/>
																																</children>
																																<selectoption description="normal" value="normal"/>
																																<selectoption description="italic" value="italic"/>
																															</combobox>
																														</children>
																														<variables/>
																													</template>
																												</children>
																												<variables/>
																											</template>
																										</children>
																										<variables/>
																									</template>
																								</children>
																								<variables/>
																							</template>
																						</children>
																					</tgridcell>
																					<tgridcell>
																						<children>
																							<template subtype="element" match="Artist">
																								<children>
																									<template subtype="element" match="CharacterStyles">
																										<children>
																											<template subtype="element" filter="@Name = &apos;font-style&apos;" match="Style">
																												<children>
																													<template subtype="attribute" match="Value">
																														<children>
																															<combobox>
																																<children>
																																	<content/>
																																</children>
																																<selectoption description="normal" value="normal"/>
																																<selectoption description="italic" value="italic"/>
																															</combobox>
																														</children>
																														<variables/>
																													</template>
																												</children>
																												<variables/>
																											</template>
																										</children>
																										<variables/>
																									</template>
																								</children>
																								<variables/>
																							</template>
																						</children>
																					</tgridcell>
																				</children>
																			</tgridrow>
																			<tgridrow>
																				<children>
																					<tgridcell>
																						<children>
																							<text fixtext="Font weight:"/>
																						</children>
																					</tgridcell>
																					<tgridcell>
																						<children>
																							<template subtype="element" match="Title">
																								<children>
																									<template subtype="element" match="CharacterStyles">
																										<children>
																											<template subtype="element" filter="@Name = &apos;font-weight&apos;" match="Style">
																												<children>
																													<template subtype="attribute" match="Value">
																														<children>
																															<combobox>
																																<children>
																																	<content/>
																																</children>
																																<selectoption description="normal" value="normal"/>
																																<selectoption description="bold" value="bold"/>
																															</combobox>
																														</children>
																														<variables/>
																													</template>
																												</children>
																												<variables/>
																											</template>
																										</children>
																										<variables/>
																									</template>
																								</children>
																								<variables/>
																							</template>
																						</children>
																					</tgridcell>
																					<tgridcell>
																						<children>
																							<template subtype="element" match="Artist">
																								<children>
																									<template subtype="element" match="CharacterStyles">
																										<children>
																											<template subtype="element" filter="@Name = &apos;font-weight&apos;" match="Style">
																												<children>
																													<template subtype="attribute" match="Value">
																														<children>
																															<combobox>
																																<children>
																																	<content/>
																																</children>
																																<selectoption description="normal" value="normal"/>
																																<selectoption description="bold" value="bold"/>
																															</combobox>
																														</children>
																														<variables/>
																													</template>
																												</children>
																												<variables/>
																											</template>
																										</children>
																										<variables/>
																									</template>
																								</children>
																								<variables/>
																							</template>
																						</children>
																					</tgridcell>
																				</children>
																			</tgridrow>
																		</children>
																	</tgridbody-rows>
																</children>
															</tgrid>
															<text fixtext="  "/>
														</children>
													</conditionbranch>
												</children>
											</condition>
											<layout-container>
												<styles height="5cm" overflow="hidden" position="relative" width="10cm"/>
												<children>
													<textbox additional-width="0cm" additional-height="-0.10cm">
														<styles border="2px solid black" height="4cm" left="3cm" overflow="hidden" position="absolute" top="0.5cm" width="4cm"/>
														<children>
															<image>
																<styles height="4cm" width="4cm"/>
																<target>
																	<fixtext value="Medium"/>
																	<xpath value="@StorageMedium"/>
																	<fixtext value=".jpg"/>
																</target>
															</image>
														</children>
													</textbox>
													<textbox additional-width="-2.64cm" additional-height="1cm">
														<styles height="1.5cm" left="3.2cm" overflow="hidden" padding="2px" position="absolute" top="1cm" width="3.6cm"/>
														<children>
															<paragraph _xrichedit="sps:MakeCssString(Title/ParagraphStyles)">
																<children>
																	<template subtype="element" match="Title">
																		<children>
																			<content _xrichedit="sps:MakeCssString(CharacterStyles)"/>
																		</children>
																		<variables/>
																	</template>
																</children>
															</paragraph>
														</children>
													</textbox>
													<textbox additional-width="-3.01cm" additional-height="0.70cm">
														<styles height="1.2cm" left="3.2cm" overflow="hidden" padding="2px" position="absolute" top="3cm" width="3.6cm"/>
														<children>
															<paragraph _xrichedit="sps:MakeCssString(Artist/ParagraphStyles)">
																<children>
																	<template subtype="element" match="Artist">
																		<children>
																			<content _xrichedit="sps:MakeCssString(CharacterStyles)"/>
																		</children>
																		<variables/>
																	</template>
																</children>
															</paragraph>
														</children>
													</textbox>
												</children>
											</layout-container>
										</children>
										<variables/>
									</template>
								</children>
								<variables/>
							</template>
						</children>
						<variables/>
					</template>
				</children>
			</globaltemplate>
		</children>
	</mainparts>
	<globalparts/>
	<designfragments/>
	<xmltables/>
	<authentic-custom-toolbar-buttons/>
	<xpath-functions>
		<xpath-function name="MakeCssString" value="string-join(for $s in $nodePassed/Style return concat($s/@Name, &apos;: &apos;, $s/@Value), &apos;; &apos;)" valuetype="xs:string"/>
		<xpath-function-name>
			<variable name="nodePassed"/>
		</xpath-function-name>
	</xpath-functions>
</structure>
