<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:strip-space elements="*"/>

	<xsl:template match="/">
		<OIT>
			<xsl:apply-templates/>
		</OIT>
	</xsl:template>
	<xsl:template match="Petplan">
		<xsl:apply-templates select="Clients"/>
		<xsl:apply-templates select="Policies"/>
		<xsl:apply-templates select="Claims"/>
	</xsl:template>

	<xsl:template match="Clients">
		<xsl:for-each select="Client">

			<data>
				<application>
					<xsl:attribute name="id">Petplan</xsl:attribute>
					<xsl:attribute name="Appversion">1.0</xsl:attribute>
					<xsl:attribute name="xslversion">1.0.0</xsl:attribute>
					<xsl:attribute name="database">Default</xsl:attribute>
				</application>
				<entity>
					<xsl:attribute name="type">
						<xsl:value-of select="local-name(.)"/>
					</xsl:attribute>
					<xsl:attribute name="action">CreatedOrModified</xsl:attribute>
				</entity>
				<xsl:for-each select="node()">
					<Attribute>
						<xsl:attribute name="id">
							<xsl:value-of select="local-name(.)"/>
						</xsl:attribute>
						<xsl:attribute name="value">
							<xsl:value-of select="node()"/>
						</xsl:attribute>
					</Attribute>
				</xsl:for-each>
			</data>
		</xsl:for-each>
	</xsl:template>

	<xsl:template match="Policies">
		<xsl:for-each select="Policy">
			
			<data>
				<application>
					<xsl:attribute name="id">Petplan</xsl:attribute>
					<xsl:attribute name="Appversion">1.0</xsl:attribute>
					<xsl:attribute name="xslversion">1.0.0</xsl:attribute>
					<xsl:attribute name="database">Default</xsl:attribute>
				</application>

				<entity>
					<xsl:attribute name="type">
						<xsl:value-of select="local-name(.)"/>
					</xsl:attribute>
					<xsl:attribute name="action">CreatedOrModified</xsl:attribute>
				</entity>

				<xsl:for-each select="node()">
					<Attribute>
						<xsl:attribute name="id">
							<xsl:value-of select="local-name(.)"/>
						</xsl:attribute>
						<xsl:attribute name="value">
							<xsl:value-of select="node()"/>
						</xsl:attribute>
					</Attribute>
				</xsl:for-each>
			</data>
		</xsl:for-each>
	</xsl:template>


	<xsl:template match="Claims">
		<xsl:for-each select="Claim">

			<data>
				<application>
					<xsl:attribute name="id">Petplan</xsl:attribute>
					<xsl:attribute name="Appversion">1.0</xsl:attribute>
					<xsl:attribute name="xslversion">1.0.0</xsl:attribute>
					<xsl:attribute name="database">Default</xsl:attribute>
				</application>

				<entity>
					<xsl:attribute name="type">
						<xsl:value-of select="local-name(.)"/>
					</xsl:attribute>
					<xsl:attribute name="action">CreatedOrModified</xsl:attribute>
				</entity>

				<xsl:for-each select="node()">
					<Attribute>
						<xsl:attribute name="id">
							<xsl:value-of select="local-name(.)"/>
						</xsl:attribute>
						<xsl:attribute name="value">
							<xsl:value-of select="node()"/>
						</xsl:attribute>
					</Attribute>
				</xsl:for-each>
			</data>
		</xsl:for-each>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2009. Progress Software Corporation. All rights reserved.

<metaInformation>
	<scenarios>
		<scenario default="no" name="Scenario144" userelativepaths="yes" externalpreview="no" url="file:///c:/Users/pansa01/petplan_28042014/Xml Schema/OrganiseIt.xml" htmlbaseurl="" outputurl="file:///c:/Users/Bais/Examples/Bais/result22.xml"
		          processortype="saxon8" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline=""
		          postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator="">
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="xsltVersion" value="2.0"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
		<scenario default="no" name="Scenario2" userelativepaths="yes" externalpreview="no" url="file:///c:/Users/Bais/Examples/Bais/BAIS_PolicyNumber_Example.xml" htmlbaseurl="" outputurl="file:///c:/Users/Bais/Examples/Bais/result3.xml"
		          processortype="saxon8" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline=""
		          postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator="">
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="xsltVersion" value="2.0"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
		<scenario default="no" name="Scenario3" userelativepaths="yes" externalpreview="no" url="file:///c:/Users/Bais/Examples/Bais/BAIS_PolicyNumber_Example.xml" htmlbaseurl="" outputurl="file:///c:/Users/Bais/Examples/Bais/result1.xml"
		          processortype="saxon8" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline=""
		          postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator="">
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="xsltVersion" value="2.0"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
		<scenario default="no" name="Scenario4" userelativepaths="yes" externalpreview="no" url="" htmlbaseurl="" outputurl="" processortype="saxon8" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline=""
		          additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator="">
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="xsltVersion" value="2.0"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
		<scenario default="yes" name="Scenario1_policy" userelativepaths="yes" externalpreview="no" url="..\petplan_28042014\Xml Schema\OrganiseIt_policy.xml" htmlbaseurl="" outputurl="" processortype="saxon8" useresolver="yes" profilemode="0"
		          profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no"
		          validator="internal" customvalidator="">
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="xsltVersion" value="2.0"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
	</scenarios>
	<MapperMetaTag>
		<MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no">
			<SourceSchema srcSchemaPath="file:///c:/Users/Bais/Examples/Bais/poli1.xml" srcSchemaRoot="BAIS" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/>
		</MapperInfo>
		<MapperBlockPosition>
			<template match="/"></template>
			<template match="Associates"></template>
			<template match="BAIS"></template>
		</MapperBlockPosition>
		<TemplateContext></TemplateContext>
		<MapperFilter side="source"></MapperFilter>
	</MapperMetaTag>
</metaInformation>
-->