<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns:fo="http://www.w3.org/1999/XSL/Format"
		xmlns:html="http://www.w3.org/1999/xhtml">

	<xsl:import href="xhtml2fo.xsl"/>

	<xsl:output method="xml"
		version="1.0"
		encoding="utf-8"
		indent="no"/>

	<!--======================================================================
		Customized by Yamaguchi
	=======================================================================-->

	<xsl:attribute-set name="p-figure-span-all">
		<!-- Yamaguchi 2007-09-21 -->
		<xsl:attribute name="span">all</xsl:attribute>
		<xsl:attribute name="text-align">center</xsl:attribute>
		<xsl:attribute name="color">black</xsl:attribute>
		<xsl:attribute name="space-before">0em</xsl:attribute>
		<xsl:attribute name="space-after">1.5em</xsl:attribute>
		<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
		<xsl:attribute name="space-after.conditionality">retain</xsl:attribute>
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="p-author">
		<xsl:attribute name="span">all</xsl:attribute>
		<xsl:attribute name="text-align">center</xsl:attribute>
		<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
		<xsl:attribute name="color">black</xsl:attribute>
		<xsl:attribute name="font-size">12pt</xsl:attribute>
		<xsl:attribute name="font-weight">bold</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="p-author-name">
	</xsl:attribute-set>

	<xsl:attribute-set name="p-author-name-english">
	</xsl:attribute-set>

	<xsl:attribute-set name="p-author-english-first">
		<xsl:attribute name="span">all</xsl:attribute>
		<xsl:attribute name="text-align">center</xsl:attribute>
		<xsl:attribute name="color">black</xsl:attribute>
		<xsl:attribute name="font-size">12pt</xsl:attribute>
		<xsl:attribute name="font-weight">bold</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="p-author-english">
		<xsl:attribute name="span">all</xsl:attribute>
		<xsl:attribute name="text-align">center</xsl:attribute>
		<xsl:attribute name="color">black</xsl:attribute>
		<xsl:attribute name="font-size">12pt</xsl:attribute>
		<xsl:attribute name="font-weight">bold</xsl:attribute>
		<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="p-author-affiliation">
	</xsl:attribute-set>

	<xsl:attribute-set name="p-author-affiliation-english">
	</xsl:attribute-set>

	<xsl:attribute-set name="block-abstract" use-attribute-sets="p">
		<xsl:attribute name="span">all</xsl:attribute>
		<xsl:attribute name="space-before">0.67em</xsl:attribute>
		<xsl:attribute name="space-after">0.67em</xsl:attribute>
		<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
		<xsl:attribute name="space-after.conditionality">retain</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="h2-abstract">
		<xsl:attribute name="color">black</xsl:attribute>
		<xsl:attribute name="font-size">11pt</xsl:attribute>
		<xsl:attribute name="font-weight">bold</xsl:attribute>
		<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
		<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="p-abstract-first" use-attribute-sets="p">
		<xsl:attribute name="color">black</xsl:attribute>
		<xsl:attribute name="font-size">11pt</xsl:attribute>
		<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
		<xsl:attribute name="space-before">0.67em</xsl:attribute>
		<xsl:attribute name="space-after">0.67em</xsl:attribute>
		<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
		<xsl:attribute name="space-after.conditionality">retain</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="p-keywords-themselves" use-attribute-sets="p">
		<xsl:attribute name="span">all</xsl:attribute>
		<xsl:attribute name="color">black</xsl:attribute>
		<xsl:attribute name="font-size">11pt</xsl:attribute>
		<xsl:attribute name="space-after">1em</xsl:attribute>
		<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
		<xsl:attribute name="space-after.conditionality">retain</xsl:attribute>
		<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="span-keywords">
		<xsl:attribute name="color">black</xsl:attribute>
		<xsl:attribute name="font-size">11pt</xsl:attribute>
		<xsl:attribute name="font-weight">bold</xsl:attribute>
		<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
	</xsl:attribute-set>

	<xsl:template match="html:ul[ contains( concat( ' ', @class, ' ' ), ' toc ' ) ]" >
	</xsl:template>

	<xsl:template match="html:div[ contains( concat( ' ', @class, ' ' ), ' talk ' ) ]" >
	</xsl:template>

	<xsl:template match="html:div[ contains( concat( ' ', @class, ' ' ), ' slide ' )
		and not( contains( concat( ' ', @class, ' ' ), ' print ' ) ) ]" >
	</xsl:template>

	<xsl:template match="html:p[ contains( concat( ' ', @class, ' ' ), ' create ' ) ]">
	</xsl:template>

	<xsl:template match="html:p[ contains( concat( ' ', @class, ' ' ), ' update ' ) ]">
	</xsl:template>

	<xsl:template match="html:p[ contains( concat( ' ', @class, ' ' ), ' figure-span-all ' ) ]">
		<fo:float float="before">
			<fo:block xsl:use-attribute-sets="p-figure-span-all">
				<xsl:call-template name="process-common-attributes-and-children"/>
			</fo:block>
		</fo:float>
	</xsl:template>
  
	<xsl:template match="html:ul[ contains( concat( ' ', @class, ' ' ), ' reference ' ) ]">
		<xsl:call-template name="process-common-attributes-and-children"/>
	</xsl:template>

	<xsl:attribute-set name="process-ul-reference" use-attribute-sets="p">
		<xsl:attribute name="color">black</xsl:attribute>
		<xsl:attribute name="font-size">10pt</xsl:attribute>
		<xsl:attribute name="space-after">1em</xsl:attribute>
		<xsl:attribute name="text-indent">-1em</xsl:attribute>
		<xsl:attribute name="start-indent">1em</xsl:attribute>
		<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
		<xsl:attribute name="space-after.conditionality">retain</xsl:attribute>
		<!--
		<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
		-->
	</xsl:attribute-set>

	<xsl:template match="html:ul[ contains( concat( ' ', @class, ' ' ), ' reference ' ) ]/html:li">
		<fo:block xsl:use-attribute-sets="process-ul-reference">
			<xsl:call-template name="process-common-attributes-and-children"/>
		</fo:block>
	</xsl:template>

	<xsl:template name="process-ul-reference">
		<xsl:call-template name="process-common-attributes"/>
		<fo:list-item-label end-indent="label-end()"
			text-align="end" wrap-option="no-wrap">
		</fo:list-item-label>
		<fo:list-item-body start-indent="body-start()">
			<fo:block>
				<xsl:apply-templates/>
			</fo:block>
		</fo:list-item-body>
	</xsl:template>

	<xsl:attribute-set name="ul-indivisible" use-attribute-sets="ul">
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
	</xsl:attribute-set>

	<xsl:template match="html:ul[ contains( concat( ' ', @class, ' ' ), ' indivisible ' ) ]">
		<fo:list-block xsl:use-attribute-sets="ul-indivisible">
			<xsl:call-template name="process-common-attributes-and-children"/>
		</fo:list-block>
	</xsl:template>

	<!--====================
		Author
	====================-->

	<xsl:template match="html:p[ contains( concat( ' ', @class, ' ' ), ' author ' ) ]">
		<fo:block xsl:use-attribute-sets="p-author">
			<xsl:apply-templates select="html:span[ contains( concat( ' ', @class, ' ' ), ' author-name ' ) ][1]" 
				mode="author" />
			(<xsl:apply-templates select="html:span[ contains( concat( ' ', @class, ' ' ), ' author-affiliation ' ) ][1]" 
				mode="author" />)
		</fo:block>
	</xsl:template>

	<xsl:template match="html:span[ contains( concat( ' ', @class, ' ' ), ' author-name ' ) ]"
		mode="author" >
		<fo:inline xsl:use-attribute-sets="p-author-name">
			<xsl:call-template name="process-common-attributes-and-children"/>
		</fo:inline>
	</xsl:template>

	<xsl:template match="html:span[ contains( concat( ' ', @class, ' ' ), ' author-affiliation ' ) ]"
		mode="author" >
		<fo:inline xsl:use-attribute-sets="p-author-affiliation">
			<xsl:call-template name="process-common-attributes-and-children"/>
		</fo:inline>
	</xsl:template>

	<xsl:template match="html:span[ contains( concat( ' ', @class, ' ' ), ' author-name ' ) ]">
	</xsl:template>

	<xsl:template match="html:span[ contains( concat( ' ', @class, ' ' ), ' author-affiliation ' ) ]">
	</xsl:template>

	<xsl:template match="html:p[ contains( concat( ' ', @class, ' ' ), ' author-english ' ) ]
		[ not( preceding::html:p[ contains( concat( ' ', @class, ' ' ), ' author-english ' ) ] ) ]">
		<fo:block xsl:use-attribute-sets="p-author-english-first">
			<xsl:apply-templates 
				select="html:span[ contains( concat( ' ', @class, ' ' ), ' author-name-english ' ) ]" 
				mode="author-english" />
			(<xsl:apply-templates 
				select="html:span[ contains( concat( ' ', @class, ' ' ), ' author-affiliation-english ' ) ]" 
				mode="author-english" />)
		</fo:block>
	</xsl:template>

	<xsl:template match="html:p[ contains( concat( ' ', @class, ' ' ), ' author-english ' ) ]
		[ preceding::html:p[ contains( concat( ' ', @class, ' ' ), ' author-english ' ) ] ]">
		<fo:block xsl:use-attribute-sets="p-author-english">
			<xsl:apply-templates 
				select="html:span[ contains( concat( ' ', @class, ' ' ), ' author-name-english ' ) ]" 
				mode="author-english" />
			(<xsl:apply-templates 
				select="html:span[ contains( concat( ' ', @class, ' ' ), ' author-affiliation-english ' ) ]" 
				mode="author-english" />)
		</fo:block>
	</xsl:template>

	<xsl:template match="html:span[ contains( concat( ' ', @class, ' ' ), ' author-name-english ' ) ]"
		mode="author-english" >
		<fo:inline xsl:use-attribute-sets="p-author-name-english">
			<xsl:call-template name="process-common-attributes-and-children"/>
		</fo:inline>
	</xsl:template>

	<xsl:template match="html:span[ contains( concat( ' ', @class, ' ' ), ' author-affiliation-english ' ) ]"
		mode="author-english" >
		<fo:inline xsl:use-attribute-sets="p-author-affiliation-english">
			<xsl:call-template name="process-common-attributes-and-children"/>
		</fo:inline>
	</xsl:template>

	<xsl:template match="html:p[ contains( concat( ' ', @class, ' ' ), ' author-name-english ' ) ]">
	</xsl:template>

	<xsl:template match="html:p[ contains( concat( ' ', @class, ' ' ), ' author-affiliation-english ' ) ]">
	</xsl:template>

	<!--====================
		Abstract and keywords
	====================-->

	<xsl:template match="html:h2[ contains( concat( ' ', @class, ' ' ), ' abstract ' ) ]">
		<fo:block xsl:use-attribute-sets="block-abstract">
			<fo:inline xsl:use-attribute-sets="h2-abstract">Abstract- </fo:inline>
			<xsl:apply-templates select="following::html:p[ contains( concat( ' ', @class, ' ' ), ' abstract-english ' ) ]" 
				  	mode="abstract" />
		</fo:block>
	</xsl:template>

	<xsl:template match="html:p" mode="abstract" >
		<fo:inline xsl:use-attribute-sets="p-abstract-first">
			<xsl:call-template name="process-common-attributes-and-children"/>
		</fo:inline>
	</xsl:template>

	<xsl:template match="html:p[ contains( concat( ' ', @class, ' ' ), ' abstract-english ' ) ]" >
	</xsl:template>

	<xsl:template match="html:p[ contains( concat( ' ', @class, ' ' ), ' abstract ' ) ]" >
	</xsl:template>

	<xsl:template match="html:p[ contains( concat( ' ', @class, ' ' ), ' keywords-themselves ' ) ]">
		<fo:block xsl:use-attribute-sets="p-keywords-themselves">
			<xsl:apply-templates select="html:span[ contains( concat( ' ', @class, ' ' ), ' keywords ' ) ]" 
				mode="keywords" />
			<xsl:call-template name="process-common-attributes-and-children"/>
		</fo:block>
	</xsl:template>

	<xsl:template match="html:span[ contains( concat( ' ', @class, ' ' ), ' keywords ' ) ]"
		mode="keywords" >
		<fo:inline xsl:use-attribute-sets="span-keywords">Key Words: </fo:inline>
	</xsl:template>

	<xsl:template match="html:span[ contains( concat( ' ', @class, ' ' ), ' keywords ' ) ]" >
	</xsl:template>

	<xsl:template match="html:ul[ contains( concat( ' ', @class, ' ' ), ' toc ' ) ]" >
	</xsl:template>

	<xsl:template match="html:div[ contains( concat( ' ', @class, ' ' ), ' history ' ) ]" >
	</xsl:template>

	<xsl:template match="html:div[ contains( concat( ' ', @class, ' ' ), ' under-construction ' ) ]" >
	</xsl:template>

	<!--======================================================================
      Parameters
	=======================================================================-->

	<!-- page size -->
	<xsl:param name="page-margin-top">20mm</xsl:param>
	<xsl:param name="page-margin-bottom">27mm</xsl:param>
	<xsl:param name="page-margin-left">20mm</xsl:param>
	<xsl:param name="page-margin-right">20mm</xsl:param>

	<!-- page header and footer -->
	<xsl:param name="title-print-in-header">false</xsl:param>
	<xsl:param name="page-number-print-in-footer">false</xsl:param>

	<!-- multi column -->
	<xsl:param name="column-count">2</xsl:param>
	<xsl:param name="column-gap">1.0cm</xsl:param>

	<!--======================================================================
      Attribute Sets
	=======================================================================-->

	<!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
		Root
	=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->

	<xsl:attribute-set name="root">
		<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
		<xsl:attribute name="hyphenate"><xsl:value-of select="$hyphenate"/></xsl:attribute>
		<xsl:attribute name="text-align"><xsl:value-of select="$text-align"/></xsl:attribute>
		<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
		<xsl:attribute name="font-size">10pt</xsl:attribute>
		<!-- specified on fo:root to change the properties' initial values -->
	</xsl:attribute-set>

	<!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
		Block-level
	=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->

	<xsl:attribute-set name="h1">
		<!-- multicolumn span -->
		<xsl:attribute name="span">all</xsl:attribute>
		<xsl:attribute name="text-align">center</xsl:attribute>
		<xsl:attribute name="color">navy</xsl:attribute>
		<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
		<xsl:attribute name="space-after.conditionality">retain</xsl:attribute>
		<xsl:attribute name="font-size">16pt</xsl:attribute>
		<xsl:attribute name="font-weight">bold</xsl:attribute>
		<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="h1-english" use-attribute-sets="h1">
		<!-- multicolumn span -->
		<xsl:attribute name="font-size">12pt</xsl:attribute>
	</xsl:attribute-set>

	<xsl:template match="html:h1[ contains( concat( ' ', @class, ' ' ), ' title-english ' ) ]">
		<fo:block xsl:use-attribute-sets="h1-english">
			<xsl:call-template name="process-common-attributes-and-children"/>
		</fo:block>
	</xsl:template>

	<xsl:attribute-set name="h2">
		<xsl:attribute name="color">navy</xsl:attribute>
		<xsl:attribute name="font-size">11pt</xsl:attribute>
		<xsl:attribute name="font-weight">bold</xsl:attribute>
		<xsl:attribute name="space-before">0.67em</xsl:attribute>
		<xsl:attribute name="space-after">0.67em</xsl:attribute>
		<xsl:attribute name="space-before.minimum">0.67em</xsl:attribute>
		<xsl:attribute name="space-before.optimum">0.67em</xsl:attribute>
		<xsl:attribute name="space-before.maximum">0.67em</xsl:attribute>
		<xsl:attribute name="space-after.minimum">0.67em</xsl:attribute>
		<xsl:attribute name="space-after.optimum">0.67em</xsl:attribute>
		<xsl:attribute name="space-after.maximum">0.67em</xsl:attribute>
		<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
		<xsl:attribute name="space-after.conditionality">retain</xsl:attribute>
		<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="h2-initial-first" use-attribute-sets="h2">
		<xsl:attribute name="space-before">0em</xsl:attribute>
		<xsl:attribute name="space-before.minimum">0em</xsl:attribute>
		<xsl:attribute name="space-before.optimum">0em</xsl:attribute>
		<xsl:attribute name="space-before.maximum">0em</xsl:attribute>
	</xsl:attribute-set>

	<!-- initial h2 -->
	<xsl:template match="html:h2[ 
		not( preceding::html:h2[ not( contains( concat( ' ', @class, ' ' ), ' abstract ' ) ) ] )
		and not( contains( concat( ' ', @class, ' ' ), ' abstract ' ) )
		 ]">
		<fo:block xsl:use-attribute-sets="h2-initial-first">
			<xsl:call-template name="process-common-attributes-and-children"/>
		</fo:block>
	</xsl:template>

	<xsl:attribute-set name="h3">
		<xsl:attribute name="color">navy</xsl:attribute>
		<xsl:attribute name="font-size">10pt</xsl:attribute>
		<xsl:attribute name="font-weight">bold</xsl:attribute>
		<xsl:attribute name="space-before.minimum">0.75em</xsl:attribute>
		<xsl:attribute name="space-before.optimum">1em</xsl:attribute>
		<xsl:attribute name="space-before.maximum">1.33em</xsl:attribute>
		<xsl:attribute name="space-after.minimum">0.75em</xsl:attribute>
		<xsl:attribute name="space-after.optimum">1em</xsl:attribute>
		<xsl:attribute name="space-after.maximum">1.33em</xsl:attribute>
		<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
		<!--
		<xsl:attribute name="color">#005A9C</xsl:attribute>
		-->
	</xsl:attribute-set>

	<xsl:attribute-set name="h4">
		<xsl:attribute name="color">#005A9C</xsl:attribute>
		<xsl:attribute name="font-size">1em</xsl:attribute>
		<xsl:attribute name="font-weight">bold</xsl:attribute>
		<xsl:attribute name="space-before.minimum">0.83em</xsl:attribute>
		<xsl:attribute name="space-before.optimum">1.17em</xsl:attribute>
		<xsl:attribute name="space-before.maximum">1.58em</xsl:attribute>
		<xsl:attribute name="space-after.minimum">0.83em</xsl:attribute>
		<xsl:attribute name="space-after.optimum">1.17em</xsl:attribute>
		<xsl:attribute name="space-after.maximum">1.58em</xsl:attribute>
		<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="h5">
		<xsl:attribute name="color">#005A9C</xsl:attribute>
		<xsl:attribute name="font-size">0.83em</xsl:attribute>
		<xsl:attribute name="font-weight">bold</xsl:attribute>
		<xsl:attribute name="space-before.minimum">1em</xsl:attribute>
		<xsl:attribute name="space-before.optimum">1.33em</xsl:attribute>
		<xsl:attribute name="space-before.maximum">1.75em</xsl:attribute>
		<xsl:attribute name="space-after.minimum">1em</xsl:attribute>
		<xsl:attribute name="space-after.optimum">1.33em</xsl:attribute>
		<xsl:attribute name="space-after.maximum">1.75em</xsl:attribute>
		<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="h6">
		<xsl:attribute name="color">#005A9C</xsl:attribute>
		<xsl:attribute name="font-size">0.67em</xsl:attribute>
		<xsl:attribute name="font-weight">bold</xsl:attribute>
		<xsl:attribute name="space-before.minimum">1.25em</xsl:attribute>
		<xsl:attribute name="space-before.optimum">1.67em</xsl:attribute>
		<xsl:attribute name="space-before.maximum">2.25em</xsl:attribute>
		<xsl:attribute name="space-after.minimum">1.25em</xsl:attribute>
		<xsl:attribute name="space-after.optimum">1.67em</xsl:attribute>
		<xsl:attribute name="space-after.maximum">2.25em</xsl:attribute>
		<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="p">
		<xsl:attribute name="space-before.minimum">0.75em</xsl:attribute>
		<xsl:attribute name="space-before.optimum">1em</xsl:attribute>
		<xsl:attribute name="space-before.maximum">1em</xsl:attribute>
		<xsl:attribute name="space-after.minimum">0.75em</xsl:attribute>
		<xsl:attribute name="space-after.optimum">1em</xsl:attribute>
		<xsl:attribute name="space-after.maximum">1em</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="blockquote">
		<xsl:attribute name="start-indent">inherited-property-value(start-indent) + 24pt</xsl:attribute>
		<xsl:attribute name="end-indent">inherited-property-value(end-indent) + 24pt</xsl:attribute>
		<xsl:attribute name="space-before.minimum">0.75em</xsl:attribute>
		<xsl:attribute name="space-before.optimum">1em</xsl:attribute>
		<xsl:attribute name="space-before.maximum">1.33em</xsl:attribute>
		<xsl:attribute name="space-after.minimum">0.75em</xsl:attribute>
		<xsl:attribute name="space-after.optimum">1em</xsl:attribute>
		<xsl:attribute name="space-after.maximum">1.33em</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="pre">
		<xsl:attribute name="font-size">0.83em</xsl:attribute>
		<xsl:attribute name="font-family">monospace</xsl:attribute>
		<xsl:attribute name="white-space">pre</xsl:attribute>
		<xsl:attribute name="space-before.minimum">0.75em</xsl:attribute>
		<xsl:attribute name="space-before.optimum">1em</xsl:attribute>
		<xsl:attribute name="space-before.maximum">1.33em</xsl:attribute>
		<xsl:attribute name="space-after.minimum">0.75em</xsl:attribute>
		<xsl:attribute name="space-after.optimum">1em</xsl:attribute>
		<xsl:attribute name="space-after.maximum">1.33em</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="address">
		<xsl:attribute name="font-style">italic</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="hr">
		<xsl:attribute name="border">1px inset</xsl:attribute>
		<xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
		<xsl:attribute name="space-before.optimum">0.67em</xsl:attribute>
		<xsl:attribute name="space-before.maximum">0.92em</xsl:attribute>
		<xsl:attribute name="space-after.minimum">0.5em</xsl:attribute>
		<xsl:attribute name="space-after.optimum">0.67em</xsl:attribute>
		<xsl:attribute name="space-after.maximum">0.92em</xsl:attribute>
	</xsl:attribute-set>

	<!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
		List
	=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->

	<xsl:attribute-set name="ul">
		<xsl:attribute name="space-before.minimum">0.75em</xsl:attribute>
		<xsl:attribute name="space-before.optimum">1em</xsl:attribute>
		<xsl:attribute name="space-before.maximum">1.33em</xsl:attribute>
		<xsl:attribute name="space-after.minimum">0.75em</xsl:attribute>
		<xsl:attribute name="space-after.optimum">1em</xsl:attribute>
		<xsl:attribute name="space-after.maximum">1.33em</xsl:attribute>
		<!--
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
		-->
	</xsl:attribute-set>

	<xsl:attribute-set name="ul-nested">
		<xsl:attribute name="space-before.minimum">0pt</xsl:attribute>
		<xsl:attribute name="space-before.optimum">0pt</xsl:attribute>
		<xsl:attribute name="space-before.maximum">0pt</xsl:attribute>
		<xsl:attribute name="space-after.minimum">0pt</xsl:attribute>
		<xsl:attribute name="space-after.optimum">0pt</xsl:attribute>
		<xsl:attribute name="space-after.maximum">0pt</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="ol">
		<xsl:attribute name="space-before.minimum">0.75em</xsl:attribute>
		<xsl:attribute name="space-before.optimum">1em</xsl:attribute>
		<xsl:attribute name="space-before.maximum">1.33em</xsl:attribute>
		<xsl:attribute name="space-after.minimum">0.75em</xsl:attribute>
		<xsl:attribute name="space-after.optimum">1em</xsl:attribute>
		<xsl:attribute name="space-after.maximum">1.33em</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="ol-nested">
		<xsl:attribute name="space-before.minimum">0pt</xsl:attribute>
		<xsl:attribute name="space-before.optimum">0pt</xsl:attribute>
		<xsl:attribute name="space-before.maximum">0pt</xsl:attribute>
		<xsl:attribute name="space-after.minimum">0pt</xsl:attribute>
		<xsl:attribute name="space-after.optimum">0pt</xsl:attribute>
		<xsl:attribute name="space-after.maximum">0pt</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="ul-li">
		<!-- for (unordered)fo:list-item -->
		<xsl:attribute name="relative-align">baseline</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="ol-li">
		<!-- for (ordered)fo:list-item -->
		<xsl:attribute name="relative-align">baseline</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="dl">
		<xsl:attribute name="space-before.minimum">0.75em</xsl:attribute>
		<xsl:attribute name="space-before.optimum">1em</xsl:attribute>
		<xsl:attribute name="space-before.maximum">1.33em</xsl:attribute>
		<xsl:attribute name="space-after.minimum">0.75em</xsl:attribute>
		<xsl:attribute name="space-after.optimum">1em</xsl:attribute>
		<xsl:attribute name="space-after.maximum">1.33em</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="dt">
		<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
		<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="dd">
		<xsl:attribute name="start-indent">inherited-property-value(start-indent) + 24pt</xsl:attribute>
	</xsl:attribute-set>

	<!-- list-item-label format for each nesting level -->

	<xsl:param name="ul-label-1">&#x2022;</xsl:param>
	<xsl:attribute-set name="ul-label-1">
		<xsl:attribute name="font">1em serif</xsl:attribute>
	</xsl:attribute-set>

	<xsl:param name="ul-label-2">o</xsl:param>
	<xsl:attribute-set name="ul-label-2">
		<xsl:attribute name="font">0.67em monospace</xsl:attribute>
		<xsl:attribute name="baseline-shift">0.25em</xsl:attribute>
	</xsl:attribute-set>

	<xsl:param name="ul-label-3">-</xsl:param>
	<xsl:attribute-set name="ul-label-3">
		<xsl:attribute name="font">bold 0.9em sans-serif</xsl:attribute>
		<xsl:attribute name="baseline-shift">0.05em</xsl:attribute>
	</xsl:attribute-set>

	<xsl:param name="ol-label-1">1.</xsl:param>
	<xsl:attribute-set name="ol-label-1"/>

	<xsl:param name="ol-label-2">a.</xsl:param>
	<xsl:attribute-set name="ol-label-2"/>

	<xsl:param name="ol-label-3">i.</xsl:param>
	<xsl:attribute-set name="ol-label-3"/>

	<!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
		Table
	=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->

	<xsl:attribute-set name="inside-table">
		<!-- prevent unwanted inheritance -->
		<xsl:attribute name="start-indent">0pt</xsl:attribute>
		<xsl:attribute name="end-indent">0pt</xsl:attribute>
		<xsl:attribute name="text-indent">0pt</xsl:attribute>
		<xsl:attribute name="last-line-end-indent">0pt</xsl:attribute>
		<xsl:attribute name="text-align">start</xsl:attribute>
		<xsl:attribute name="text-align-last">relative</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="table-and-caption" >
		<!-- horizontal alignment of table itself
		<xsl:attribute name="text-align">center</xsl:attribute>
		-->
		<!-- vertical alignment in table-cell -->
		<xsl:attribute name="display-align">center</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="table">
		<xsl:attribute name="border-collapse">separate</xsl:attribute>
		<xsl:attribute name="border-spacing">2px</xsl:attribute>
		<xsl:attribute name="border">1px</xsl:attribute>
		<!--
		<xsl:attribute name="border-style">outset</xsl:attribute>
		-->
	</xsl:attribute-set>

	<xsl:attribute-set name="table-caption" use-attribute-sets="inside-table">
		<xsl:attribute name="text-align">center</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="table-column">
	</xsl:attribute-set>

	<xsl:attribute-set name="thead" use-attribute-sets="inside-table">
	</xsl:attribute-set>

	<xsl:attribute-set name="tfoot" use-attribute-sets="inside-table">
	</xsl:attribute-set>

	<xsl:attribute-set name="tbody" use-attribute-sets="inside-table">
	</xsl:attribute-set>

	<xsl:attribute-set name="tr">
	</xsl:attribute-set>

	<xsl:attribute-set name="th">
		<xsl:attribute name="font-weight">bolder</xsl:attribute>
		<xsl:attribute name="text-align">center</xsl:attribute>
		<xsl:attribute name="border">1px</xsl:attribute>
		<!--
		<xsl:attribute name="border-style">inset</xsl:attribute>
		-->
		<xsl:attribute name="padding">1px</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="td">
		<xsl:attribute name="font-size">9pt</xsl:attribute>
		<xsl:attribute name="border">1px</xsl:attribute>
		<!--
		<xsl:attribute name="border-style">inset</xsl:attribute>
		-->
		<xsl:attribute name="padding">1px</xsl:attribute>
	</xsl:attribute-set>

	<!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
		Inline-level
	=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->

	<xsl:attribute-set name="b">
		<xsl:attribute name="font-weight">bolder</xsl:attribute>
	</xsl:attribute-set>
	<xsl:attribute-set name="strong">
		<xsl:attribute name="font-weight">bolder</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="strong-em">
		<xsl:attribute name="font-weight">bolder</xsl:attribute>
		<xsl:attribute name="font-style">italic</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="i">
		<xsl:attribute name="font-style">italic</xsl:attribute>
	</xsl:attribute-set>
	<xsl:attribute-set name="cite">
		<xsl:attribute name="font-style">italic</xsl:attribute>
	</xsl:attribute-set>
	<xsl:attribute-set name="em">
		<xsl:attribute name="font-style">italic</xsl:attribute>
	</xsl:attribute-set>
	<xsl:attribute-set name="var">
		<xsl:attribute name="font-style">italic</xsl:attribute>
	</xsl:attribute-set>
	<xsl:attribute-set name="dfn">
		<xsl:attribute name="font-style">italic</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="tt">
		<xsl:attribute name="font-family">monospace</xsl:attribute>
	</xsl:attribute-set>
	<xsl:attribute-set name="code">
		<xsl:attribute name="font-family">monospace</xsl:attribute>
	</xsl:attribute-set>
	<xsl:attribute-set name="kbd">
		<xsl:attribute name="font-family">monospace</xsl:attribute>
	</xsl:attribute-set>
	<xsl:attribute-set name="samp">
		<xsl:attribute name="font-family">monospace</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="big">
		<xsl:attribute name="font-size">larger</xsl:attribute>
	</xsl:attribute-set>
	<xsl:attribute-set name="small">
		<xsl:attribute name="font-size">smaller</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="sub">
		<xsl:attribute name="baseline-shift">sub</xsl:attribute>
		<xsl:attribute name="font-size">smaller</xsl:attribute>
	</xsl:attribute-set>
	<xsl:attribute-set name="sup">
		<xsl:attribute name="baseline-shift">super</xsl:attribute>
		<xsl:attribute name="font-size">smaller</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="s">
		<xsl:attribute name="text-decoration">line-through</xsl:attribute>
	</xsl:attribute-set>
	<xsl:attribute-set name="strike">
		<xsl:attribute name="text-decoration">line-through</xsl:attribute>
	</xsl:attribute-set>
	<xsl:attribute-set name="del">
		<xsl:attribute name="text-decoration">line-through</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="u">
		<xsl:attribute name="text-decoration">underline</xsl:attribute>
	</xsl:attribute-set>
	<xsl:attribute-set name="ins">
		<xsl:attribute name="text-decoration">underline</xsl:attribute>
	</xsl:attribute-set>

	<xsl:attribute-set name="abbr">
		<!-- e.g.,
		<xsl:attribute name="font-variant">small-caps</xsl:attribute>
		<xsl:attribute name="letter-spacing">0.1em</xsl:attribute>
		-->
	</xsl:attribute-set>

	<xsl:attribute-set name="acronym">
		<!-- e.g.,
		<xsl:attribute name="font-variant">small-caps</xsl:attribute>
		<xsl:attribute name="letter-spacing">0.1em</xsl:attribute>
		-->
	</xsl:attribute-set>

	<xsl:attribute-set name="q"/>
	<xsl:attribute-set name="q-nested"/>

	<!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
		Image
	=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->

	<xsl:attribute-set name="img">
	</xsl:attribute-set>

	<xsl:attribute-set name="img-link">
		<xsl:attribute name="border">2px solid</xsl:attribute>
	</xsl:attribute-set>

	<!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
		Link
	=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->

	<xsl:attribute-set name="a-link">
		<xsl:attribute name="text-decoration">underline</xsl:attribute>
		<xsl:attribute name="color">blue</xsl:attribute>
	</xsl:attribute-set>


</xsl:stylesheet>
