<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="#" type="text/xsl"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:con="http://www.carneades.hu/xml/carneadescontract/contract.xsd"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:o-ex="http://odrl.net/1.1/ODRL-EX"
                xmlns:mp="http://www.carneades.hu/xml/carneadescontract/metaparts"
                xmlns:o-dd="http://odrl.net/1.1/ODRL-DD"
                version="1.0">
   <xsl:output method="xml" indent="yes"/>
   <xsl:strip-space elements="* xsl:* "/>
   <con:contract xmlns:saxon="http://saxon.sf.net/"
                 xmlns:ct="http://www.carneades.hu/xml/carneadestemplate/template.xsd">
      <con:conditions>
         <con:extension xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        type="ubl"
                        end="generate-id(.)">
            <cac:Contract>
               <cbc:ID/>
               <cbc:IssueDate/>
               <cbc:IssueTime/>
               <cbc:ContractTypeCode/>
               <cbc:ContractType/>
               <cac:ValidityPeriod>
                  <cac:Period>
                     <cbc:StartDate/>
                     <cbc:StartTime/>
                     <cbc:EndDate/>
                     <cbc:EndTime/>
                     <cbc:DurationMeasure/>
                     <cbc:DescriptionCode/>
                     <cbc:Description/>
                  </cac:Period>
               </cac:ValidityPeriod>
               <cac:ContractDocumentReference/>
            </cac:Contract>
         </con:extension>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="h1">
				Adásvételi szerződés
				</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">amely létrejött</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">egyrészről</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
            <con:extension id="generate-id()" type="ubl" end="generate-id(.)">
               <cac:Party/>
            </con:extension>
            <con:extension id="generate-id()" type="ubl" end="generate-id(.)">
               <cac:PartyName>
                  <cbc:Name>Leszek Kotsch</cbc:Name>
               </cac:PartyName>
            </con:extension>Leszek Kotsch<con:mark id="generate-id(../con:condition/con:extension[2])"/> (született:  1963.11.01. napján; 
					<con:extension id="generate-id()" type="ubl" end="generate-id(.)">
               <cac:PostalAddress>
                  <cac:AddressLine>
                     <cbc:Line>1053 Vienna, Egyetem tér 1-3.</cbc:Line>
                  </cac:AddressLine>
               </cac:PostalAddress>
            </con:extension>
				lakcím: 1053 Vienna, Egyetem tér 1-3.<con:mark id="generate-id(../con:condition/con:extension[3])"/>; anyja neve: Gál Anna; személyi igazolvány szám: AA012344) mint eladó (továbbiakban: Eladó),
					<con:mark id="generate-id(../con:condition/con:extension[1])"/>
         </con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">másrészről</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
            <con:extension id="generate-id()" type="ubl" end="generate-id(.)">
               <cac:Party/>
            </con:extension>
            <con:extension id="generate-id()" type="ubl" end="generate-id(m5)">
               <cac:PartyName>
                  <cbc:Name>Kovács Piroska</cbc:Name>
               </cac:PartyName>
            </con:extension>Kovács Piroska<con:mark id="generate-id(../con:condition/con:extension[2])"/> (született:  1978.01.22. napján; 
					<con:extension id="generate-id()" type="ubl" end="generate-id(.)">
               <cac:PostalAddress>
                  <cac:AddressLine>
                     <cbc:Line>7622 Pécs, 48-as tér 1.</cbc:Line>
                  </cac:AddressLine>
               </cac:PostalAddress>
            </con:extension>	
				lakcím: 7622 Pécs, 48-as tér 1.<con:mark id="generate-id(../con:condition/con:extension[3])"/>; anyja neve: Kiss Ágnes; személyi igazolvány szám: CF412356) mint vevő (továbbiakban: Vevő),
				<con:mark id="generate-id(../con:condition/con:extension[1])"/>
         </con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">együttesen felek (továbbiakban: Felek) között az alábbi feltételekkel.</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">Az Eladó kizárólagos tulajdonában van a AAA-002 forgalmi rendszámú LADA 1300 típusú személygépkocsi (továbbiakban: SZGK), amelynek alvázszáma: XDS2341414535, hengerűrtartalma  1296 cm3, motorszáma/motorkódja AAABBBCCC48392434412354. A SZGK futásteljesítménye a kilométeróra szerint: 467796 km.
				</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
				Eladó eladja Vevő pedig megveszi az SZGK-t a megtekintett állapotban a jelenszerződésben meghatározott vételáron.
				</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
				Felek a gépjármű vételárát 230,000,- Ft azaz kétszázharmincezer forint összegben határozzák meg.
				</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
			Felek rögzítik, hogy a SZGK az alábbi ismert vagy felfedett hibákkal rendelkezik és azok ismeretében kötik meg a jelen szerződés: hátsó lökhárító horpadt</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
				Jelen szerződés aláírásával Vevő kifizeti a teljes vételárat egy összegben. Eladó a vételár átvételét jelen szerződés aláírásával elismeri.
				</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
				A SZGK birtokbaadásával egy időben Eladó átadja a gépjármű 3 db kulcsát, a SZGK műszaki eredetiségére vonatkozó vizsgálati szakvéleményt, a törzskönyvet és a Felek által kitöltött Forgalmi Engedély műszaki és üzembentartói lapját. Felek rögzítik, hogy a birtokbaadással száll át a kárveszély. Eladó az SZGK birtokbaadásával egy időben átadja az alábbi tartozékokat: izzókészlet.
				</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
				Az Eladó a gépkocsi per-, teher- és igénymentességéért szavatol.
				</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
				Eladó a gépkocsi rejtett hibáiért szavatosságot vállal a Polgári Törvénykönyv szabályai szerint.
				</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
				Eladó a kilométerórán feltüntetett futásteljesítmény valódiságáért szavatol. 
				</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
				Eladó köteles a jármű tulajdonában bekövetkezett változást 15 napon belül az illetékes önkormányzati okmányirodának bejelenteni. Vevő köteles tulajdonszerzését az e célra rendszeresített nyomtatványon 15 napon belül az illetékes önkormányzati okmányirodának bejelenteni, és az ezzel kapcsolatos eljárási költségeket viselni.  
				</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
				ELADÓ            VEVŐ 
				</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
				Kelt: Budapest, 2009. január 20.</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
				Előttünk, mint tanúk előtt:   
				</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
				1. Név és lakcím: ....................................................    
				</con:condition>
         <con:condition xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                        xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                        xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                        id="generate-id()"
                        presentation="p">
				2. Név és lakcím: .................................................... 
				</con:condition>
         <con:mark xmlns="http://www.carneades.hu/xml/carneadestemplate/template.xsd"
                   xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
                   xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
                   id="generate-id(/con:contract/con:conditions/con:extension[1])"/>
      </con:conditions>
   </con:contract>
   <xsl:template match="xsl:stylesheet">
      <xsl:apply-templates select="con:contract"/>
   </xsl:template>
   <xsl:template match="*"/>
   <xsl:template match="con:contract">
      <html>
         <head>
            <script type="text/javascript">
               <xsl:text disable-output-escaping="yes">
					var annotation_types = new Array();

							</xsl:text>
               <xsl:for-each select="//con:extension[not(@type = following::con:extension/@type)]/@type">
                  <xsl:text>
annotation_types.push('</xsl:text>
                  <xsl:value-of select="."/>
                  <xsl:text>');</xsl:text>
               </xsl:for-each>
               <xsl:text disable-output-escaping="yes">
					var annotations = new Array();

							</xsl:text>
               <xsl:for-each select="//con:extension[not(@type = following::con:extension/@type)]/@type">
                  <xsl:variable name="extype" select="."/>
                  <xsl:text>annotations['</xsl:text>
                  <xsl:value-of select="$extype"/>
                  <xsl:text>'] = new Array();
</xsl:text>
                  <xsl:for-each select="//con:extension[@type = $extype]">
                     <xsl:text>annotations['</xsl:text>
                     <xsl:value-of select="$extype"/>
                     <xsl:text>'][</xsl:text>
                     <xsl:number value="position()-1"/>
                     <xsl:text>] = new Array('</xsl:text>
                     <xsl:value-of select="@id"/>
                     <xsl:text>','</xsl:text>
                     <xsl:value-of select="@end"/>
                     <xsl:text>');
</xsl:text>
                  </xsl:for-each>
               </xsl:for-each>
               <xsl:text disable-output-escaping="yes">
							
					
											
					var mouse_x;
					var mouse_y;
					var showpopup = 0;
					var pbox;
					
					var showextension = 0;

					document.onmousemove = mouseMove;
					
					function mouseMove(e) {
						if (showpopup) {
							
							//depends on browser version
							//IE
							if (typeof(e) == "undefined") {
								mouse_x = event.x+document.body.scrollLeft;
								mouse_y = event.y+document.body.scrollTop;
							}
							//FF
							else {
								mouse_x = e.pageX;
								mouse_y = e.pageY;
							}
							
							pbox.style.left = (mouse_x + 10)+ "px";
							pbox.style.top  = (mouse_y + 10)+ "px";
						}
					}

					function showextension_array_titled(title,array) {
						showpopup = 1;
						pbox = document.getElementById('popupdiv');
						var i=0;
						pbox.innerHTML="&lt;b&gt;"+title+"&lt;/b&gt;&lt;br/&gt;";
						for (i=0;i&lt;array.length-1;i++)
						{
							pbox.innerHTML += "&lt;b&gt;"+array[i][0]+"&lt;/b&gt;"+array[i][1]+"&lt;br/&gt;" ;
						}
						pbox.innerHTML += "&lt;b&gt;"+array[i][0]+"&lt;/b&gt;"+array[i][1] ;
						pbox.style.visibility = 'visible';
					}

					function showextension_array_titled_imaged(title,array,img_src) {
						showpopup = 1;
						pbox = document.getElementById('popupdiv');
						var i=0;
						pbox.innerHTML="&lt;b&gt;"+title+"&lt;/b&gt;&lt;br/&gt;";
						for (i=0;i&lt;array.length-1;i++)
						{
							pbox.innerHTML += "&lt;b&gt;"+array[i][0]+"&lt;/b&gt;"+array[i][1]+"&lt;br/&gt;" ;
						}
						pbox.innerHTML += "&lt;b&gt;"+array[i][0]+"&lt;/b&gt;"+array[i][1] ;
						pbox.innerHTML += '&lt;br/&gt;&lt;img width="200" style="margin:10px;" src="' + img_src + '"/&gt;';						
						pbox.style.visibility = 'visible';
					}


					function showextension_titled(title,text) {
						showpopup = 1;
						pbox = document.getElementById('popupdiv');
						pbox.innerHTML = "&lt;b&gt;"+title+"&lt;/b&gt;&lt;br/&gt;"+text ;

						pbox.style.visibility = 'visible';
					}

					function hideextension(a) {
						showpopup = 0;
						var pbox = document.getElementById('popupdiv');
						pbox.style.visibility = 'hidden';
						pbox.removeChild(pbox.firstChild);
					}
					
					function show_extensions(type) {
						hide_extensions();
						for (var j=0; j&lt;annotations[type].length; j++) {
							show_extension(annotations[type][j][0],"#fdff63");
							//document.getElementById(annotations[type][j][0]).style.visibility='visible';
						}
						
					}

					function hide_extensions() {
						for (var i=0; i&lt;annotation_types.length;i++) {
							for (var j=0; j&lt;annotations[annotation_types[i]].length; j++) {
								hide_extension(annotations[annotation_types[i]][j][0],"#ffffff");
								document.getElementById(annotations[annotation_types[i]][j][0]).style.visibility='hidden';
							}
						}
					}
				
					function show_extension(id,color) {
						var ex = document.getElementById(id);
						ex.style.visibility='visible';
						var markId = ex.getAttribute('end'); 
						var mark = document.getElementById(markId);
						//mark.style.visibility = 'visible';
						highlight(id,markId,color);
					}

					function hide_extension(id,color) {
						var ex = document.getElementById(id);
						var markId = ex.getAttribute('end'); 
						var mark = document.getElementById(markId);
						mark.style.visibility = 'hidden';
						highlight(id,markId,color);
					}
					
					function highlight(from,to,color) {
						var current = document.getElementById(from);
						
						while (current.nextSibling != null) {
							current = current.nextSibling;
							if (highlight_rec(current,to,color) == 1) {
								return;
							}
						}
						
					}
					
					function highlight_rec(node,to,color) {
						if (node.nodeType != 1) {
							return 0;
						}
						//alert ("check a "+node.nodeName);
						if (node.getAttribute('id') == to) {
							return 1;
						}
						if (node.hasChildNodes()) {
							for (var i=0; i&lt;node.childNodes.length; i++) {
								if (node.childNodes[i].nodeType != 1) {
									continue;
								}
								if (highlight_rec(node.childNodes[i],to,color) == 1) {
									return 1;
								}
							}
						}
						node.style.backgroundColor = color;
						//alert ("color a "+node.nodeName);
					}
					
					function getChildByAttributeValue(node,attr,val) {

						var currentChildren = node.childNodes;
						while(currentChildren.length &gt; 0) {
							var newChildren = new Array();
							for (var i=0;i&lt;currentChildren.length;i++) {
								var current = currentChildren[i];
								if (current.nodeType == 1 &amp;&amp; current.hasAttribute(attr) &amp;&amp;  current.getAttribute(attr) == val) {
									return current;
								}
								for (var j=0; j &lt; current.childNodes.length ; j++) {
									newChildren.push(current.childNodes[j]);
								}
							}
							currentChildren = newChildren;	
						}
							
						return null;
					}

					</xsl:text>
            </script>
            <style>
							#popupdiv { background-color:yellow;
							position:absolute; visibility:hidden;
							border-style:solid; border-width:1px;
							z-index:1; }

							.colLeft {
								border-right: 1px dotted #59C0F8;
								width: 160px;
								margin-top: 20px;
								padding-right: 10px;
								padding-left: 10px;
								margin:0px auto;
							}
							
							#colRight {
								float: right;
								width: 600px;
								margin-top: 20px;
								padding-left: 10px;
								padding-right: 10px;
								text-align:left;
							}
							
							hr {
								color:#cccccc;
								border-style:dotted;
								border-width:1px;
							}
							
							body {
								background: #D8DFE6;
								padding: 20px 20px 0 20px;
								margin:0px auto;
							}
							
							#main {
								border-bottom: 4px solid #59C0F8;
								border-top: 4px solid #59C0F8;
								margin:0px auto;
								padding:15px;																
								width:800px;
								background-color:#ffffff;
							}

							.odrl-summary { background-color:yellow;
							border-style:solid; border-width:1px; }

							.extension { display: inline;visibility:hidden;
							font-size:12px; font-style:normal;
							color:#B07B0A; font-weight: normal; }

							.mark { display: none; visibility:hidden;
							font-size:12px; font-style:normal;
							color:#B07B0A; font-weight: normal; }

							.contract { display: block; width: 500px; }

							.title { display: block;
								font: 60px Arial, Helvetica, sans-serif;
							}
							
							.subtitle {
								font: 14px italic Arial, Helvetica, sans-serif;
								text-align:center;		
								align:center;					
							}

							.subtext {
								font: 12px Arial, Helvetica, sans-serif;							
							}
							
							.selector {
								font: 12px Arial, Helvetica, sans-serif;							
							}
			
							a {
								color: #59C0F8;
							}
			
							.heading { display: inline; font-size:20px;
							font-style:normal; font-weight: normal;
							text-align: left; padding: 10px 0px 0px
							10px; }

							.condition { display: block;
							font: 12px Arial, Helvetica, sans-serif;
							font-style:normal; font-weight: normal;
							text-align: justify; padding: 10px 0px 0px
							10px; }

							h1 {
							font-family: Arial, Helvetica, sans-serif;
							color: #444444;
							text-align: left;
							}

							.date { display: block; font-size:12px;
							font-style:normal; font-weight: normal;
							text-align: left; padding: 20px 0px 0px
							10px; }

							.party { display: block; font-size:12px;
							font-style:normal; font-weight: normal;
							text-align: left; padding: 50px 10px 0px
							0px; }

						</style>
            <title>
               <xsl:value-of select="Szerződés"/>
            </title>
         </head>
         <body>
            <div id="main">
               <table>
                  <tr>
                     <td valign="top" class="colLeft">
                        <div>
                           <span class="title">CC-D</span>
                           <hr/>
                           <span class="subtitle">This is a Carneades Contract Document</span>
                           <hr/>
                           <span class="subtext">Please select one of the following annotation layers:</span>
                           <ul>
                              <xsl:for-each select="//con:extension[not(@type = following::con:extension/@type)]/@type">
                                 <li>
                                    <a href="#" class="selector">
                                       <xsl:attribute name="onclick">
                                          <xsl:text>show_extensions('</xsl:text>
                                          <xsl:value-of select="."/>
                                          <xsl:text>')</xsl:text>
                                       </xsl:attribute>
                                       <xsl:value-of select="."/>
                                    </a>
                                 </li>
                              </xsl:for-each>
                              <li>
                                 <a href="#" class="selector" onclick="hide_extensions()">(none)</a>
                              </li>
                           </ul>
                        </div>
                     </td>
                     <td>
                        <div>
                           <xsl:apply-templates select="con:conditions"/>
                        </div>
                     </td>
                  </tr>
               </table>
            </div>
            <div id="popupdiv"/>
         </body>
      </html>
   </xsl:template>
   <xsl:template match="con:conditions">
      <xsl:apply-templates/>
   </xsl:template>
   <xsl:template match="con:condition">
      <xsl:choose>
         <xsl:when test="@presentation != ''">
            <xsl:element name="{@presentation}">
               <xsl:apply-templates/>
            </xsl:element>
         </xsl:when>
         <xsl:otherwise>
            <div class="condition">
               <xsl:apply-templates/>
            </div>
         </xsl:otherwise>
      </xsl:choose>
   </xsl:template>
   <xsl:template match="con:extension">
      <xsl:element name="span">
         <xsl:attribute name="class">extension</xsl:attribute>
         <xsl:attribute name="id">
            <xsl:value-of select="@id"/>
         </xsl:attribute>
         <xsl:attribute name="end">
            <xsl:value-of select="@end"/>
         </xsl:attribute>
         <xsl:attribute name="onmouseover">
            <xsl:text>show_extension('</xsl:text>
            <xsl:value-of select="@id"/>
            <xsl:text>','#63c2ff');showextension_titled('Extension','&lt;i&gt;type:&lt;/i&gt; </xsl:text>
            <xsl:value-of select="@type"/>
            <xsl:text>, element:</xsl:text>
            <xsl:value-of select="name(*[1])"/>
            <xsl:text>')</xsl:text>
         </xsl:attribute>
         <xsl:attribute name="onmouseout">
            <xsl:text>hide_extension('</xsl:text>
            <xsl:value-of select="@id"/>
            <xsl:text>','#fdff63');hideextension()</xsl:text>
         </xsl:attribute>
         <xsl:text>(i)</xsl:text>
         <xsl:apply-templates/>
      </xsl:element>
   </xsl:template>
   <xsl:template match="con:mark">
      <xsl:element name="span">
         <xsl:attribute name="class">mark</xsl:attribute>
         <xsl:attribute name="id">
            <xsl:value-of select="@id"/>
         </xsl:attribute>
         <xsl:text>#</xsl:text>
      </xsl:element>
   </xsl:template>
   <xsl:template match="text()">
      <span>
         <xsl:value-of select="."/>
      </span>
   </xsl:template>
   <xsl:template match="con:reference">
      <xsl:variable name="targetId">
         <xsl:value-of select="./@targetId"/>
      </xsl:variable>
      <a class="reference">
         <xsl:attribute name="onmouseover">
            <xsl:text>show_extension('</xsl:text>
            <xsl:value-of select="$targetId"/>
            <xsl:text>','#63c2ff')</xsl:text>
         </xsl:attribute>
         <xsl:attribute name="onmouseout">
            <xsl:text>hide_extension('</xsl:text>
            <xsl:value-of select="$targetId"/>
            <xsl:text>','#fdff63')</xsl:text>
         </xsl:attribute>
         <xsl:attribute name="href">#<xsl:value-of select="$targetId"/>
         </xsl:attribute>
         <xsl:value-of select="//*[@id = $targetId]/@shortname"/>
      </a>
   </xsl:template>
   <xsl:template match="con:extension" mode="odrl-summary">
      <xsl:apply-templates mode="odrl-summary"/>
   </xsl:template>
   <xsl:template match="con:extension[@type = 'metaparts']">
      <xsl:element name="span">
         <xsl:attribute name="class">extension</xsl:attribute>
         <xsl:attribute name="id">
            <xsl:value-of select="@id"/>
         </xsl:attribute>
         <xsl:attribute name="end">
            <xsl:value-of select="@end"/>
         </xsl:attribute>
         <xsl:attribute name="onmouseover">
            <xsl:text>show_extension('</xsl:text>
            <xsl:value-of select="@id"/>
            <xsl:text>','#63c2ff');showextension_titled('Metapart','&lt;i&gt;This part is about:&lt;/i&gt; </xsl:text>
            <xsl:value-of select="mp:part-name"/>
            <xsl:text>')</xsl:text>
         </xsl:attribute>
         <xsl:attribute name="onmouseout">
            <xsl:text>hide_extension('</xsl:text>
            <xsl:value-of select="@id"/>
            <xsl:text>','#fdff63');hideextension()</xsl:text>
         </xsl:attribute>
         <xsl:text>(i)</xsl:text>
         <xsl:apply-templates/>
      </xsl:element>
   </xsl:template>
   <xsl:template match="con:extension[@type='odrl']">
      <xsl:element name="span">
         <xsl:attribute name="class">extension</xsl:attribute>
         <xsl:attribute name="id">
            <xsl:value-of select="@id"/>
         </xsl:attribute>
         <xsl:attribute name="end">
            <xsl:value-of select="@end"/>
         </xsl:attribute>
         <xsl:apply-templates/>
         <xsl:text>(o)</xsl:text>
      </xsl:element>
   </xsl:template>
   <xsl:template match="o-ex:party">
      <xsl:attribute name="onmouseover">
         <xsl:text>show_extension('</xsl:text>
         <xsl:value-of select="../@id"/>
         <xsl:text>','#63c2ff')</xsl:text>
						showextension_array_titled('ODRL Party',
						new Array(new Array('name:','<xsl:value-of select="normalize-space(o-ex:context/o-dd:name)"/>'),
								  new Array('uid:','<xsl:value-of select="normalize-space(o-ex:context/o-dd:uid)"/>')
								  <xsl:if test="o-ex:rightsholder">
								  ,new Array('rightsholder ','<xsl:value-of select="o-ex:rightsholder/o-dd:percentage"/>%')
								  </xsl:if>
								  )); return true;</xsl:attribute>
      <xsl:attribute name="onmouseout">
         <xsl:text>hide_extension('</xsl:text>
         <xsl:value-of select="../@id"/>
         <xsl:text>','#fdff63');</xsl:text>					
					hideextension(); return true;</xsl:attribute>
      <xsl:apply-templates/>
   </xsl:template>
   <xsl:template match="o-ex:asset">
      <xsl:attribute name="onmouseover">
         <xsl:text>show_extension('</xsl:text>
         <xsl:value-of select="../@id"/>
         <xsl:text>','#63c2ff')</xsl:text>
					showextension_array_titled_imaged('ODRL Asset',
						new Array(new Array('name:','<xsl:value-of select="normalize-space(o-ex:context/o-dd:name)"/>'),
								  new Array('uid:','<xsl:value-of select="normalize-space(o-ex:context/o-dd:uid)"/>')

								  ),'<xsl:value-of select="normalize-space(o-ex:context/o-dd:uid)"/>'); return true;</xsl:attribute>
      <xsl:attribute name="onmouseout">
         <xsl:text>hide_extension('</xsl:text>
         <xsl:value-of select="../@id"/>
         <xsl:text>','#fdff63');</xsl:text>					
					hideextension(); return true;</xsl:attribute>
      <xsl:apply-templates/>
   </xsl:template>
   <xsl:template match="o-ex:permission">
      <xsl:attribute name="onmouseover">
         <xsl:text>show_extension('</xsl:text>
         <xsl:value-of select="../@id"/>
         <xsl:text>','#63c2ff')</xsl:text>
					showextension_array_titled('ODRL Permission',
						new Array(
						<xsl:for-each select="child::*">
						new Array('<xsl:value-of select="local-name()"/> ','constraints -&gt; <xsl:apply-templates select="o-ex:constraint/o-dd:*"/>')
						<xsl:if test="position() != last()">,</xsl:if>
         </xsl:for-each>
								  )); return true;</xsl:attribute>
      <xsl:attribute name="onmouseout">
         <xsl:text>hide_extension('</xsl:text>
         <xsl:value-of select="../@id"/>
         <xsl:text>','#fdff63');</xsl:text>					
					hideextension(); return true;</xsl:attribute>
   </xsl:template>
   <xsl:template match="o-ex:requirement">
      <xsl:attribute name="onmouseover">
         <xsl:text>show_extension('</xsl:text>
         <xsl:value-of select="../@id"/>
         <xsl:text>','#63c2ff')</xsl:text>
					showextension_array_titled('ODRL Requirement',
						new Array(
						<xsl:for-each select="child::*">
						new Array('<xsl:value-of select="local-name()"/> ','<xsl:apply-templates select="o-dd:*"/>')
						<xsl:if test="position() != last()">,</xsl:if>
         </xsl:for-each>
								  )); return true;</xsl:attribute>
      <xsl:attribute name="onmouseout">
         <xsl:text>hide_extension('</xsl:text>
         <xsl:value-of select="../@id"/>
         <xsl:text>','#fdff63');</xsl:text>					
					hideextension(); return true;</xsl:attribute>
   </xsl:template>
   <xsl:template match="o-dd:*">
      <xsl:text/>
      <xsl:value-of select="local-name()"/>
      <xsl:if test="text()">
         <xsl:text>:</xsl:text>
         <xsl:value-of select="normalize-space(text())"/>
      </xsl:if>
      <xsl:text>/</xsl:text>
      <xsl:apply-templates select="o-dd:*"/>
      <xsl:if test="position() != last()">
         <xsl:text> , </xsl:text>
      </xsl:if>
   </xsl:template>
   <xsl:template match="text()" mode="odrl-summary">
      <xsl:text/>
      <xsl:value-of select="normalize-space(.)"/>
      <xsl:text/>
   </xsl:template>
   <xsl:template match="o-ex:*" mode="odrl-summary">
      <xsl:text disable-output-escaping="yes">&lt;b&gt;</xsl:text>
      <xsl:value-of select="local-name()"/>
      <xsl:text disable-output-escaping="yes">&lt;/b&gt;</xsl:text>
      <xsl:text> -&gt; </xsl:text>
      <xsl:apply-templates mode="odrl-summary"/>
   </xsl:template>
   <xsl:template match="o-ex:*|o-dd:*" mode="odrl-summary">
      <xsl:text disable-output-escaping="yes">&lt;b&gt;</xsl:text>
      <xsl:value-of select="local-name()"/>
      <xsl:text disable-output-escaping="yes">&lt;/b&gt;</xsl:text>
      <xsl:choose>
         <xsl:when test="count(child::*) = 0 and (. != '')">
            <xsl:text>:</xsl:text>
         </xsl:when>
         <xsl:otherwise>
            <xsl:text>/</xsl:text>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates mode="odrl-summary"/>
      <xsl:if test="position() != last()">
         <xsl:text> , </xsl:text>
      </xsl:if>
   </xsl:template>
</xsl:stylesheet>