<t:stylesheet id="t:stylesheet" version="1.0" xmlns:t="http://www.w3.org/1999/XSL/Transform">

    <t:output method="html" doctype-public="-//W3C//DTD XHTML 2.0//EN"/>

	<t:variable name="size.padding" select=" $size.border * 2 " />
	<t:variable name="size.font.header" select=" $size.font * 2 " />

	<t:variable name="mixin.header">
		margin: 0;
		text-align: center;
		text-overflow: ellipsis;
		overflow: hidden;
		line-height: 1em;
	</t:variable>

	<t:template match=" head " mode="content">
		<t:apply-templates select=" * " />
		<style>/*<link type="text/css" rel="stylesheet" href="data:text/css,*/{{}}

html {{
	background: {$color.main};
	margin: 0;
	padding: {$size.padding}pt;
}}

h1 {{
	{$mixin.header}
	border: {$size.border}pt solid {$color.add};
	padding: {$size.padding}pt;
	font-size: {$size.font.header}pt;
	color: {$color.add};
}}

h2 {{
	{$mixin.header}
	font-size: {$size.font}pt;
	font-style: italic;
	color: {$color.main};
	background: {$color.add};
	padding: 0 {$size.border}pt {$size.border+$size.decor}pt;
}}

p {{
	border-top: {$size.decor}pt dashed {$color.main};
	font-size: {$size.font}pt;
	color: {$color.main};
	background: {$color.add};
	margin: -{$size.decor}pt 0 0;
	padding: {$size.padding}pt;
	text-overflow: ellipsis;
	overflow: hidden;
}}

		/*"/>*/</style>
		<script>
			if( /webkit/i.test( navigator.userAgent ) ) new function(){
				var styles= document.getElementsByTagName( 'style' )
				var style= styles[ styles.length - 1 ]
				style.innerText= decodeURIComponent( style.innerText )
			}
		</script>
	</t:template>

    <t:template match=" @* | node() ">
    	<t:copy>
			<t:apply-templates select=" @* " />
			<t:apply-templates select=" . " mode="content" />
    	</t:copy>
    </t:template>
    <t:template match=" processing-instruction() " />

    <t:template match=" node() " mode="content">
		<t:apply-templates select=' node() ' />
    </t:template>
    <t:template match=" *[ @src and contains( @srctype, 'xml' ) ] " mode="content">
        <t:apply-templates select=' document( @src )//body/node() ' />
    </t:template>

</t:stylesheet>

