﻿<!--  ===========================================================  -->
<!--  MODULE:    Legislative Branch Bills  XSLT                    -->
<!--  VERSION:   1.7                                               -->
<!--  DATE:  April 5, 2005                                         -->
<!--  Previous version and date: 1.6 September 13, 2005            -->
<!-- =============================================================
      Formal Public Identifier:
      billres.xsl                                                  -->
<!--  SYSTEM:    Legislative Branch XSL                            -->
<!--  PURPOSE:   Contains Bill-specific information for display of -->
<!--             the Bills and Resolutions on the web              -->
<!--                                                               -->
<!--  CONTAINS:  1) Calls to res.dtd and bill.dtd                  -->
<!--             2) Overall structure of a Bill or Resolution      -->
<!--                                                               -->
<!--  MODULES REQUIRED:                                            -->
<!--             XSL and DTD Common Elements                       -->
<!--                                                               -->
<!--  CREATED FOR:                                                 -->
<!--             House of Representatives, Senate and The Library  -->
<!--             of Congress                                       -->
<!--  ORIGINAL CREATION DATE:                                      -->
<!--             November 25, 2003                                 -->
<!--  DEVELOPED BY: Government Printing Office                     -->
<!--  DEVELOPER: Alia Malhas                                       -->
<!--  SEND COMMENTS/QUERIES TO: Kathleen Swiatek(kswiatek@gpo.gov) -->
<!-- ============================================================= -->
<!--                    CHANGE HISTORY

Changes incorporated in version 1.7 (4/05/06):
1. Remove informational boxes from the top of the bills.
2. Fixed the coding for enrolled bills to allow for the 109th
   Congress

Changes incorporated in version 1.6 (9/23/05):
1. Eliminated display of attestor name when display="no" was the
   attribute.
2. Deleted additional official-title and chamber name that was
   appearing on House engrossed bills
3. Removed border box from House engrossed bills and added rule
   between end of bill and endorsement where necessary on House
   engrossed bills and resolutions
4. Adjusted House joint resolutions to reflect proper style.

Changes incorporated in version 1.5 (7/13/05):
1. Fixed engrossed stage to show a blue background for the House
   bills and resolutions while leaving the Senate versions with a
   white background
2. Added the first enrolled version of the bills and resolutions
   including a border around the bill and a parchment background.
3. Changed the information in the comment box found on House bills
   to correctly spell "activities" and to remove the "We welcome
   your comments"  line.

Changes incorporated in version 1.4 (2/22/05):
1. Added engrossed stage for both bills and simple, joint and
   concurrent resolutions.
2. Fixed bugs found in display dealing with display of headers in
   both traditional and archaic styles.

Changes incorporated in version 1.3.2 (1/27/05):
1. Fixed certain bugs found in the first bills of the 109th Congress
   including problems with semicolons in after quoted blocks; align-
   ment issues with clause as the first item in quoted block.
2. Started beginning stages of endorsed bills that simple resolutions
   are now displayable.

Changes incorporated in version 1.3 (12/29/04)
1. Added the typeface display elements used to amend bills; the four
   typefaces covered were strikethrough type, italic type, bold
   type and bold italic type.
2. Worked on completing the other styles including the big heads in
   text and toc, including internal links, in IRC, USC and traditonal
   and verifying they appeared correctly in the amended styles
   listed above. Started also the archaic style
3. Made corrections or additions to the header-in-text display in
   olc, usc, and traditional styles.
4. Added the following elements to the resolutions which reached a
   reported stage: calendar nos., report nos. and actions; also added
   the endorsement.

Changes incorporated in version 1.2 (9/09/04):
1. Added the following items, at least in initial simple scenarios
   in order to begin to run reported bills:
   a. Added to form calendar nos., report nos. and multiple
      actions, including adding the element action-instructions.
   b. Added endorsement including all elements.
   c. Define certain scenarios of reported bills, including without
      amendment, in the nature of a substitute, both single committee
      and multiple committee, and changes by one committee, showing
      text in strikethrough, italic and bold roman
2. Added the beginnings of the unnumbered list, defining them from
   section through sub-item but not defining them in relation to
   the "up*" attributes
3. Fixed the "up1" attribute to work in archaic style

Changes incorporated in version 1.1 (7/13/04):
1. Clean up and rewrite coding to adjust and/or add to the following
   coding tags and scenarios:
    a. The indents="up*" attributes (up1 to up6);
    b. The indent="down1" attribute;
    c. The indent as absolutes in the attribute;
    d. Quoted blocks affected the indent attribute occurring both
       within the quoted block and after the quoted block.
    e. Continuation text both in and out of quoted blocks and
       affected by the "indent=up*" attribute;
    f. quoted-block-continuation-text as affected by the above
       indent attributes.
2. Adjust logic to allow display of xml elements under Part and
   Chapter headings.
3. Account for quoted-blocks that run into the text
   before the quotes.
4. Allow display of tables in the paragraph and
   subparagraph elements.
                                                                   -->
<!-- ============================================================= -->
<!--                                                               -->
<!--                                                               -->
<!-- ========================== END ============================== -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:ms="urn:schemas-microsoft-com:xslt"
  xmlns:dc="http://purl.org/dc/elements/1.1/">
	<!--<xsl:include href="table.xsl"/>-->
	<xsl:variable name="enact">
	Be it enacted by the Senate and House of Representatives of the United States of America in Congress assembled,
	</xsl:variable>
	<xsl:variable name="HouseResolution">
	Resolved,
	</xsl:variable>
	<xsl:variable name="HouseJoint">
	Resolved by the Senate and House of Representatives of the United States of America in Congress assembled,
	</xsl:variable>
	<xsl:variable name="HouseConcurrent">
	Resolved by the House of Representatives (the Senate concurring),
	</xsl:variable>
	<xsl:variable name="ConstitutionalAmendment">
	Resolved by the Senate and House of Representatives of the United States of America in Congress assembled
	(two-thirds of each House concurring therein),
	</xsl:variable>
	<xsl:variable name="SenateConcurrent">
	Resolved by the Senate (the House of Representatives concurring),
	</xsl:variable>
	<xsl:variable name="SenateJoint">
	Resolved by the Senate and House of Representatives of the United States of America in Congress assembled, 
	</xsl:variable>
	<xsl:variable name="SenateResolution">
	Resolved,
	</xsl:variable>
	<xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'"/>
	<xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞß'"/>
	<xsl:variable name="number" select="0123456789"/>

	<xsl:template match="BillStyles">
				.largecap				{
						font-variant: small-caps;
						font-weight: bold;
						font-size: 18pt;
						}
				.mediumcap				{
						font-variant: small-caps;
						font-weight: bold;
						font-size: 16pt;
						}				
				.smallcap				{
						font-variant: small-caps;
						font-weight: bold;																				
						}				
				.iscap					{
						font-variant: small-caps;
						font-weight: bold;
						text-transform: capitalize;
						}	
				.simplecap				{
						font-variant: small-caps;
						}
				.initialcap				{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: small-caps;
						font-weight: bold;
						text-transform: capitalize;
						}								
				.hang					{
						text-indent: -2em;		
						}
				.indent					{
						text-indent: 2em;
						}
				.legisnum				{ 
						font-size: 37pt;
						font-weight: bold;
						}
				.legisnumAvg			{						
						font-size: 36pt;						
						font-weight: bold;
						letter-spacing: -2;							
						}		
				.legisnumlrg			{				
						font-size: 37pt;
						font-weight: bold;	
						letter-spacing: -3;				
						}
				.legisnumSml			{				
						font-size: 17pt;
						font-weight: bold;											
						}
				.legistype				{
						font-size: 30pt;
						}
				.chamber				{
						font-size: 15pt;
						}
				.chamberEngrHouse		{
						font-size: 20pt;
						font-weight: bold;
						font: italic;
						}
				.congressEnrolled		{
						font-size: 30pt;
						font-weight: bold;
						font-family: Monotype Corsiva;
						}
				.legisEnrolled			{
						font-size: 30pt;
						font-weight: bold;
						font-family: Monotype Corsiva;
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;						
						text-transform: capitalize;
						}
				.legisEngrossed			{
						font-size: 30pt;
						font-weight: bold;
						font-family: Monotype Corsiva;
						word-spacing: 2;
						letter-spacing: 1;						
						text-transform: capitalize;
						}
				.sessionEnrolled		{
						font-size: 12pt;
						font-weight: bold;						
						}
				.dateEnrolled		{
						font-size: 10pt;						
						font: italic;
						font-weight: bold;
						}							
				.biglevel				{
						font-size: 26pt;
						font-weight: bold;
						}				
				.leftjustify 			{
						text-indent: 0em;					
						text-align: justify;
						}
				.thinspace				{
						word-spacing: -5;
						}
				.initialcapArchaic		{
						font-variant: normal;
						text-transform: capitalize;
						}
				.sectionlevelOLC		{			
					<!-- olc style  Big Levels -->			
						font-size:12pt;
						font-weight:bold;
						}
				.boldfacesectionlevelOLC{
						font-size:14pt;
						font-weight:bold;				
						}
				.sectionlevelOLCBold	{
						font-size:14pt;
						font-weight:bold;						
						}				
				.divisionlevelOLC		{		
						font-size:18pt;
						font-weight:bold;
						}				
				.titlelevelOLC			{
						font-size:18pt;
						font-weight:bold;
						}
				.subtitlelevelOLC		{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						font-size:18pt;
						font-weight:bold;
						text-transform: capitalize;
						}	
				.subtitlelevelOLCBold	{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						font-size:20pt;
						font-weight:bold;
						text-transform: capitalize;
						}
				.chapterlevelOLC		{		
						font-size:16pt;
						font-weight:bold;				
						}
				.chapterlevelOLCBold	{		
						font-size:20pt;
						font-weight:bold;
						}
				.subchapterlevelOLC		{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						font-size:16pt;
						font-weight:bold;
						text-transform: capitalize;
						}
				.subchapterlevelOLCBold	{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						font-size:20pt;
						font-weight:bold;
						text-transform: capitalize;
						}
				.chapterlevelOLCnuclear		{		
						font-size:16pt;						
						}
				.sectionlevelOLCnuclear		{		
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: small-caps;
						
						text-transform: capitalize;
						}
				.partlevelOLC			{		
						font-size:14pt;
						font-weight:bold;
						}
				.partlevelOLCBold		{		
						font-size:20pt;
						font-weight:bold;
						}
				.subpartlevelOLC		{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						font-size:14pt;
						font-weight:bold;
						text-transform: capitalize;
						}
				.subpartlevelOLCBold	{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						font-size:20pt;
						font-weight:bold;
						text-transform: capitalize;
				}
				.tocsectionOLC			{			
					<!-- olc toc -->
						font-size: 80%;						
						text-indent: -2em;
						margin-left: 2em;						
						}
				.tocdivisionOLC			{			
						font-size: 11pt;
						}
				.tocsubdivisionOLC		{			
						font-size: 10pt;
						font-variant: small-caps;
						text-transform: capitalize;
						}
				.toctitleOLC			{
						font-size: 11pt;
						}
				.tocsubtitleOLC			{
						font-variant: normal;
						text-transform: capitalize;
						font-size: 11pt;
						}
				.tocchapterOLC			{
						font-variant: small-caps;
						text-transform: capitalize;
						font-size: 11pt;
						}
				.tocsubchapterOLC		{						
						font-size: 9pt;
						}
				.tocpartOLC				{
						font-variant: small-caps;
						text-transform: capitalize;
						font-size: 11pt;
						}
				.tocsubpartOLC     		{
						font-variant: small-caps;
						font-size: 9pt;
						}				
				.mediumcapTrad			{			
					<!-- Trad style  Big Levels -->
						font-variant: small-caps;
						font-weight: bold;
						font-size: 14pt;
						}	
				.smallcapTrad			{			
					<!-- Trad style  Big Levels -->
						font-variant: small-caps;						
						font-size: 12pt;
						}
				.initialcapTrad			{
						word-spacing: 2;
						letter-spacing: 1;
						font-size: 14pt;
						font-variant: small-caps;
						text-transform: capitalize;
						font-weight: bold;						
						}
				.largecapTrad			{						
						font-variant: small-caps;						
						font-size: 16pt;
						}
				.sectionlevelTrad		{			
						font-size:12pt;
						}
				.sectionlevelTradBold	{			
						font-size:14pt;
						}
				.titlelevelTrad			{
						font-size:16pt;
						font-variant: small-caps;
						text-transform: capitalize;
						}				
				.titlelevelTradBold		{
						font-size:18pt;
						}
				.subtitlelevelTrad		{
						font-size:16pt;
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						text-transform: capitalize;
						}
				.subtitlelevelTradBold	{
						font-size:16pt;
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						text-transform: capitalize;
				}
				.partlevelTrad			{
						font-size:16pt;
						font-variant: small-caps;
						text-transform: capitalize;
						}
				.partlevelTradBold		{
						font-size:18pt;
						}
				.subpartlevelTrad		{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						font-size:16pt;
						text-transform: capitalize;
						}
				.subpartlevelTradBold	{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						font-size:18pt;
						text-transform: capitalize;
						}
				.chapterlevelTrad		{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						text-transform: capitalize;
						font-size:16pt;
						font-weight:bold;
						}
				.chapterlevelTradBold	{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						text-transform: capitalize;
						font-size:16pt;
						font-weight:bold;
						}
				.subchapterlevelTrad	{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: small-caps;
						text-transform: capitalize;
						font-size:16pt;
						}
				.subchapterlevelTradInline	{
						word-spacing: 2;
						letter-spacing: 1;	
						font-variant: small-caps;					
						
						font-size:16pt;
						}
				.subchapterlevelTradBold {
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: small-caps;
						text-transform: capitalize;
						font-size:18pt;
						}
				.tocsectionTrad			{			
					<!-- trad toc -->
						font-size: 80%;
						text-indent: -2em;
						margin-left: 2em;
						}
				.toctitleTrad			{												
						font-size: 11pt;
						font-variant: normal;	
						text-transform: capitalize;
						}
				.tocsubtitleTrad		{		
						font-size: 11pt;					
						}
				.tocchapterTrad     	{						
						font-variant: small-caps;						
						text-transform: capitalize;
						font-size: 11pt;	
						}
				.tocsubchapterTrad		{
						font-variant: normal;
						text-transform: capitalize;
						font-size: 11pt;
						}
				.tocpartTrad     		{				
						font-variant: small-caps;						
						text-transform: capitalize;
						font-size: 10pt;
						}
				.tocsubpartTrad     	{
						font-variant: normal;
						text-transform: capitalize;
						font-size: 10pt;
						}
				.sectionlevelIRC		{			
					<!-- IRC style  Big Levels (TAX)-->
					font-size:12pt;
					font-weight:bold;				
						}
				.sectionlevelIRCBold	{
						font-size:14pt;
						font-weight:bold;
						}				
				.titlelevelIRC			{
						font-size:18pt;
						font-weight:bold;
						}
				.subtitlelevelIRC		{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						font-size:18pt;
						font-weight:bold;
						text-transform: capitalize;
						}
				.subtitlelevelIRCBold	{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						font-size:22pt;
						font-weight:bold;
						text-transform: capitalize;
						}
				.chapterlevelIRC		{
						font-size:16pt;
						font-weight:bold;
						}
				.chapterlevelIRCBold	{
						font-size:20pt;
						font-weight:bold;
						}
				.subchapterlevelIRC		{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						font-size:16pt;
						font-weight:bold;
						text-transform: capitalize;
						}
				.subchapterlevelIRCBold	{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						font-size:20pt;
						font-weight:bold;
						text-transform: capitalize;
						}
				.partlevelIRC			{
						font-size:14pt;
						font-weight:bold;
						}
				.partlevelIRCBold		{		
						font-size:20pt;
						font-weight:bold;
						}
				.subpartlevelIRC		{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						font-size:14pt;
						font-weight:bold;
						text-transform: capitalize;
						}	
				.subpartlevelIRCBold	{
						word-spacing: 2;
						letter-spacing: 1;
						font-variant: normal;
						font-size:20pt;
						font-weight:bold;
						text-transform: capitalize;
						}														
				.tocsectionIRC			{			
					<!-- IRC toc -->						
						font-size:11pt;
						}
				.tocsectionIRCBold		{
					font-size:12pt;
						}
				.toclowercaseIRC		{							
						font-size:11pt;						
						}
				.toclowercaseIRCBold	{							
						font-size:12pt;						
						}
				.tocchapterIRC			{			
						font-size: 11pt;
						}
				.tocBigcapsLowcapsIRC	{
						font-size:11pt;
						font-variant: small-caps;
						text-transform: capitalize;
						}
				.tocBigcapsLowcapsIRCBold{
						font-size:12pt;
						font-variant: small-caps;
						text-transform: capitalize;
						}
				.tocpartIRC				{
						font-variant: normal;
						text-transform: capitalize;
						font-size: 11pt;
						}
				.tocpartIRCBold			{
						font-variant: normal;
						text-transform: capitalize;
						font-size: 12pt;
						}
				.tocsubpartIRC			{
						font-variant: normal;
						text-transform: capitalize;
						font-size: 11pt;
						}
				.tocsubpartIRCBold		{
						font-variant: normal;
						text-transform: capitalize;
						font-size: 12pt;
						}
				.initialcapIRC			{
						word-spacing: 2;
						font-variant: small-caps;
						text-transform: capitalize;
						}
				.sectionlevelUSC		{			
					<!-- USC style  Big Levels -->	
						font-size:14pt;
						font-weight:bold;
						}
				.smallcapUSC			{							
						font-size: 12pt;
						}
				.initialcapUSC			{	
						font-variant: small-caps;						
						font-size: 14pt;
						}
				.titlelevelUSC			{						
						font-size:18pt;
						font-weight:bold;
						}
				.subtitlelevelUSC		{		
						font-size:12pt;
						font-weight:bold;
						font-variant: normal;
						text-transform: capitalize;
						}				
				.chapterlevelUSC		{		
						font-size:14pt;
						font-weight:bold;
						}
				.subchapterlevelUSC		{		
						font-size:14pt;									
						}
				.partlevelUSC			{		
						font-size:14pt;
						font-weight:bold;
						}
				.tocsectionUSC			{			
					<!-- USC toc -->
						font-size: 80%;						
						text-indent: -2em;
						margin-left: 2em;				
						}					
				.dot-leader				{			
					<!-- table leaders -->
						vertical-align:bottom;
						background-image:url(dot_line1.gif);
						background-repeat:repeat-x;
						background-position: bottom;
						}
				.td						{
						background-color: #FFFFFF;
						}	
				.calendarOLC			{
						font-size:24pt;
						font-weight:bold;
						letter-spacing: -1;						
						}	
				.associatedDocOLC		{
						font-size:14pt;
						font-weight:bold;
						}
				.hangtable				{
						text-indent: -3em;
						font-size:10pt;											
						}
				.EndsmtHead				{
						font-size:12pt;
						font-weight:bold;
						}
				.EndsmtSimpleCap		{
						font-size:10pt;						
						font-variant: small-caps;
						}
				.EndsmtMediumCap		{
						font-size:20pt;
						font-weight:bold;
						}
				.EndsmtLargeCap			{
						font-size:28pt;
						font-weight:bold;						
						}
				.PageBreakAfter			{
						page-break-before: always;
						}
				.smtlegisnum			{				
						font-size: 28pt;
						font-weight: bold;
						}
				.smtlegisnumAvg			{
						font-size: 28pt;
						font-weight: bold;
						letter-spacing: -2;
						}
				.smtlegisnumlrg			{
						font-size: 28pt;
						font-weight: bold;
						letter-spacing: -3;
						}
				.bold					{
						font-weight: bold;
						}	
				.brakets				{
						font-size: 16pt;
						font-weight: bold;
						font-family: Arial;						
						}
				sub						{
						font-size: 10pt				
						}	
				sup						{
						font-size: 10pt
						}
				.Attest						{
						font-size: 13pt
						}
																																													
					<!-- ******************** -->					
			 }
	</xsl:template>

	<xsl:template name="DisplayEndorsement">
		<xsl:variable name="billStage" select="bill/@bill-stage"/>
		<xsl:variable name="resolutionStage" select="resolution/@resolution-stage"/>
		<center>
			<table width="70%" border="0">
				<tr>
					<td>
						<p align="right" class="EndsmtHead">
							<xsl:apply-templates select="form/calendar"/>
						</p>
					</td>
				</tr>
				<tr>
					<td>
						<table border="0" align="left" cols="2">
							<tr>
								<td align="left" width="30%">
									<div class="EndsmtSimpleCap" align="justify">
										<xsl:apply-templates select="form/congress"/>
										<br/>
										<xsl:text  disable-output-escaping="yes" >&#x00A0;</xsl:text>
										<xsl:text  disable-output-escaping="yes" >&#x00A0;</xsl:text>
										<xsl:text  disable-output-escaping="yes" >&#x00A0;</xsl:text>
										<xsl:text  disable-output-escaping="yes" >&#x00A0;</xsl:text>
										<xsl:text  disable-output-escaping="yes" >&#x00A0;</xsl:text>
										<xsl:apply-templates select="form/session"/>
									</div>
								</td>
								<td  align="center" >
									<xsl:choose>
										<xsl:when test="string-length(form/legis-num) = 16">
											<span class="smtlegisnumlrg">
												<xsl:value-of select="form/legis-num"/>
											</span>
										</xsl:when>
										<xsl:when test="string-length(form/legis-num) &lt; 16 and string-length(form/legis-num) &gt; 13">
											<TABLE width="12%" height="50" border="0" align="right">
												<TR>
													<TD></TD>
												</TR>
												<TR>
													<TD></TD>
												</TR>
											</TABLE>
											<center>
												<span class="smtlegisnumlrg" >
													<xsl:value-of select="form/legis-num"/>
												</span>
											</center>
										</xsl:when>
										<xsl:when test="string-length(form/legis-num) &lt; 14 and string-length(form/legis-num) &gt; 10">
											<TABLE width="25%" height="50" border="0" align="right">
												<TR>
													<TD></TD>
												</TR>
												<TR>
													<TD></TD>
												</TR>
											</TABLE>
											<center>
												<span class="smtlegisnumAvg">
													<xsl:value-of select="form/legis-num"/>
												</span>
											</center>
										</xsl:when>
										<xsl:when test="number(string-length(form/legis-num)) &lt; 11">
											<TABLE width="25%" height="50" border="0" align="right">
												<TR>
													<TD></TD>
												</TR>
												<TR>
													<TD></TD>
												</TR>
											</TABLE>
											<center>
												<span class="smtlegisnum">
													<xsl:value-of select="form/legis-num"/>
												</span>
											</center>
										</xsl:when>
									</xsl:choose>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<div align="center" class="EndsmtHead" >
							<xsl:apply-templates select="form/associated-doc"/>
						</div>
						<hr/>
					</td>
				</tr>
				<tr>
					<td>
						<div align="center" class="EndsmtMediumCap"  >
							<xsl:apply-templates select="form/legis-type"/>
						</div>
					</td>
				</tr>
				<tr>
					<td>
						<!--
					<xsl:choose>
						<xsl:when test="$billStage='Received-in-Senate' or $billStage='Received-in-House'
						or $billStage='Referred-in-Senate' or $billStage='Referred-in-House' 
						">
						<center> <xsl:apply-templates select="form/official-title"/></center>
						</xsl:when>
						<xsl:otherwise>
							<ul>
								<div class="hangtable" align="justify">
									<xsl:apply-templates select="form/official-title"/>
								</div>
							</ul>
						</xsl:otherwise>
					</xsl:choose>
					-->
						<ul>
							<div class="hangtable" align="justify">
								<xsl:apply-templates select="form/official-title"/>
							</div>
						</ul>
						<xsl:if test="not($resolutionStage='Engrossed-in-Senate' or $billStage='Engrossed-in-Senate')">
							<hr/>
						</xsl:if>
					</td>
				</tr>
				<tr>
					<td>
						<div align="center" class="EndsmtSimpleCap">
							<xsl:value-of select="endorsement/action-date"/>
						</div>
					</td>
				</tr>
				<!--modified 12/28/05-->
				<tr>
					<td>
						<!--				
					<xsl:choose>
						<xsl:when test="$billStage='Received-in-Senate' or $billStage='Received-in-House' or
						 $billStage='Referred-in-Senate' or $billStage='Referred-in-House'">
							<div align="center"><xsl:value-of select="endorsement/action-desc"/></div>
						</xsl:when>
						<xsl:otherwise>
							<ul>
							<div class="hangtable" align="justify">
								<xsl:value-of select="endorsement/action-desc"/>
							</div>
							</ul>
						</xsl:otherwise>
					</xsl:choose>	
					-->
						<ul>
							<div class="hangtable" align="justify">
								<xsl:value-of select="endorsement/action-desc"/>
							</div>
						</ul>
					</td>
				</tr>
			</table>
		</center>
	</xsl:template>
	<xsl:template name="displayBill">
		<xsl:variable name="resolutionType" select="resolution/@resolution-type"/>
		<xsl:variable name="billStage" select="bill/@bill-stage"/>
		<xsl:apply-templates select="form"/>
		<xsl:apply-templates select="legis-body"/>
		<xsl:apply-templates select="official-title-amendment"/>
		<xsl:apply-templates select="attestation"/>
		<xsl:if test="not($billStage='Enrolled-Bill' or $billStage='Re-Enrolled-Bill')">
			<hr/>
		</xsl:if>
		<xsl:if test="($billStage='Reported-in-House' or $billStage='Reported-in-Senate'
		or $billStage='Engrossed-in-Senate' or $billStage='Engrossed-in-House' or
		$billStage='Received-in-Senate' or $billStage='Received-in-House' or
		$billStage='Referred-in-Senate' or $billStage='Referred-in-House') and child::endorsement">
			<p class="PageBreakAfter"/>
			<p/>
			<xsl:call-template name="DisplayEndorsement"/>
		</xsl:if>
	</xsl:template>
	<xsl:template match="bill">
		<xsl:call-template name="displayBill"/>
	</xsl:template>
	<xsl:template match="resolution">
		<xsl:variable name="resolutionType" select="resolution/@resolution-type"/>
		<xsl:variable name="resolutionStage" select="resolution/@resolution-stage"/>
		<xsl:apply-templates select="form"/>
		<xsl:apply-templates select="preamble"/>
		<xsl:apply-templates select="resolution-body"/>
		<xsl:apply-templates select="official-title-amendment"/>
		<xsl:apply-templates select="attestation"/>
		<xsl:if test="not($resolutionStage='Enrolled-in-Senate' or $resolutionStage='EnrolledHouse' or
	$resolutionStage='Re-enrolled-in-Senate')">
			<hr/>
		</xsl:if>
		<xsl:if test="($resolutionStage='Reported-in-Senate' or $resolutionStage='Engrossed-in-Senate'
	or $resolutionStage='Engrossed-in-Senate'or $resolutionStage='Pre-Introduction' or
	$resolutionStage='Reported-House' or ($resolutionStage='Engrossed-House' and $resolutionType='house-joint') or
	($resolutionStage='Engrossed-House' and $resolutionType='senate-concurrent') or
	($resolutionStage='Engrossed-House' and $resolutionType='house-concurrent')) and child::endorsement">
			<p class="PageBreakAfter"/>
			<p/>
			<xsl:call-template name="DisplayEndorsement"/>
		</xsl:if>
	</xsl:template>
	<xsl:template match="form">
		<xsl:variable name="billStage" select="bill/@bill-stage"/>
		<xsl:variable name="resolutionStage" select="resolution/@resolution-stage"/>
		<xsl:choose>
			<xsl:when test="$billStage='Reported-in-House' or $billStage='Reported-in-Senate' or
		$resolutionStage='Reported-in-Senate' or $resolutionStage='Reported-House'">
				<p align="right" class="calendarOLC">
					<xsl:apply-templates select="calendar"/>
				</p>
			</xsl:when>
			<xsl:otherwise>
				<p>
					<br/>
				</p>
			</xsl:otherwise>
		</xsl:choose>
		<xsl:choose>
			<xsl:when test="$billStage='Enrolled-Bill' or $resolutionStage='Enrolled-in-Senate' ">
				<table border="0" cols="2" width="100%">
					<tr>
						<td>
							<span class="legisnumSml">
								<xsl:apply-templates select="legis-num"/>
							</span>
						</td>
						<td align="right">
							<xsl:if test="$resolutionStage='Enrolled-in-Senate'">
								<span class="legisnumSml"  >
									<xsl:apply-templates select="/resolution/attestation/attestation-group/attestation-date"/>
								</span>
							</xsl:if>
						</td>
					</tr>
				</table>
				<br/>
				<br/>
				<br/>
				<br/>
				<center>
					<span class="congressEnrolled">
						<xsl:choose>
							<xsl:when test="congress='106th CONGRESS'">
								<center>One Hundred Sixth Congress</center>
								<center> of the</center>
								<center>United States of America</center>
							</xsl:when>
							<xsl:when test="congress='107th CONGRESS'">
								<center>One Hundred Seventh Congress</center>
								<center> of the</center>
								<center>United States of America</center>
							</xsl:when>
							<xsl:when test="congress='108th CONGRESS'">
								<center>One Hundred Eighth Congress</center>
								<center> of the</center>
								<center>United States of America</center>
							</xsl:when>
							<xsl:when test="congress='109th CONGRESS'">
								<center>One Hundred Ninth Congress</center>
								<center> of the</center>
								<center>United States of America</center>
							</xsl:when>
							<xsl:when test="congress='One Hundred Ninth Congress of the United States of America'">
								<center>One Hundred Ninth Congress</center>
								<center> of the</center>
								<center>United States of America</center>	
							</xsl:when>						
						</xsl:choose>
						
					</span></center>
				<center>
					<p></p>
					<span class="sessionEnrolled">
						<xsl:choose>
							<xsl:when test="session='1st Session'">
								<center>AT THE FIRST SESSION</center>
							</xsl:when>
							<xsl:when test="session='2d Session'">
								<center>AT THE SECOND SESSION</center>
							</xsl:when>
						</xsl:choose>
					</span></center>
				<span class="dateEnrolled">
					<center>
						<p></p>
						<xsl:if test="enrolled-dateline">
							<xsl:value-of select="substring-before(enrolled-dateline, ',')"/>
							<xsl:text>, </xsl:text>
							<br></br>
							<xsl:value-of select="substring-after(enrolled-dateline, ',')"/>
						</xsl:if>
					</center>
				</span>
				<center>
					<p></p>
					<xsl:choose>
						<xsl:when test="$billStage='Enrolled-Bill'">
							<span class="legisEnrolled" >
								<xsl:value-of select="translate(legis-type,$upper,$lower)"/>
							</span>
						</xsl:when>
						<xsl:otherwise>
							<span class="legisEngrossed" >
								<xsl:value-of select="translate(legis-type,$upper,$lower)"/>
							</span>
						</xsl:otherwise>
					</xsl:choose>
				</center>
				<xsl:choose>
					<xsl:when test="$resolutionStage='Engrossed-in-Senate'">
						<center>
							<div class="tocdivisionOLC">
								<xsl:apply-templates select="official-title"/>
							</div>
						</center>
					</xsl:when>
					<xsl:when test="not($resolutionStage='Enrolled-in-Senate')">
						<ul>
							<p align="justify" class="hang">
								<xsl:apply-templates select="official-title"/>
							</p>
						</ul>
					</xsl:when>
				</xsl:choose>
				<p/>
			</xsl:when>
			<xsl:when test="$resolutionStage='Engrossed-House' and $resolutionType='house-resolution'">
				<span class="legisnumSml">
					<xsl:text>H. Res. </xsl:text>
					<xsl:value-of select="substring-after(substring-after(legis-num, '.'),'.')"/>
				</span>
				<br/>
				<br/>
				<br/>
				<br/>
				<center>
					<span class="chamberEngrHouse">
						<xsl:apply-templates select="current-chamber"/>
					</span>
				</center>
				<p></p>
				<xsl:apply-templates select="action/action-date"/>
			</xsl:when>
			<xsl:otherwise>
				<table width="25%" height="50" border="0" align="left">
					<tr>
						<td width="25%" align="left">
							<center>
								<span class="simplecap">
									<xsl:apply-templates select="congress"/>
								</span>
								<br/>
								<span class="simplecap">
									<xsl:apply-templates select="session"/>
								</span>
							</center>
						</td>
					</tr>
				</table>
				<xsl:choose>
					<xsl:when test="string-length(legis-num) = 16">
						<span class="legisnumlrg">
							<xsl:apply-templates select="legis-num"/>
						</span>
					</xsl:when>
					<xsl:when test="string-length(legis-num) &lt; 16 and string-length(legis-num) &gt; 13">
						<TABLE width="12%" height="50" border="0" align="right">
							<TR>
								<TD></TD>
							</TR>
							<TR>
								<TD></TD>
							</TR>
						</TABLE>
						<center>
							<span class="legisnumlrg" style="margin-left: -.4em;">
								<xsl:apply-templates select="legis-num"/>
							</span>
						</center>
					</xsl:when>
					<xsl:when test="string-length(legis-num) &lt; 14 and string-length(legis-num) &gt; 10">
						<TABLE width="25%" height="50" border="0" align="right">
							<TR>
								<TD></TD>
							</TR>
							<TR>
								<TD></TD>
							</TR>
						</TABLE>
						<center>
							<span class="legisnumAvg">
								<xsl:apply-templates select="legis-num"/>
							</span>
						</center>
					</xsl:when>
					<xsl:when test="string-length(legis-num) &lt; 11">
						<TABLE width="25%" height="50" border="0" align="right">
							<TR>
								<TD></TD>
							</TR>
							<TR>
								<TD></TD>
							</TR>
						</TABLE>
						<center>
							<span class="legisnum">
								<xsl:apply-templates select="legis-num"/>
							</span>
						</center>
					</xsl:when>
				</xsl:choose>
				<p/>
				<xsl:if test="$billStage='Reported-in-House' or $billStage='Reported-in-Senate'
			or $resolutionStage='Reported-House' ">
					<p align="center" class="associatedDocOLC">
						<xsl:apply-templates select="associated-doc"/>
					</p>
				</xsl:if>
				<!-- made a change here 12/28-->
				<xsl:choose>
					<xsl:when test="$billStage='Engrossed-in-House' or $billStage='Engrossed-in-Senate' or				
				$resolutionStage='Pre-Introduction' or $resolutionStage='Engrossed-in-Senate' or
				($resolutionStage='Engrossed-House' and $resolutionType='house-joint') or
				($resolutionStage='Engrossed-House' and $resolutionType='senate-concurrent') or
				($resolutionStage='Engrossed-House' and $resolutionType='house-concurrent')"></xsl:when>
					<xsl:when test="$billStage='Received-in-Senate' or $billStage='Received-in-House' or
				$billStage='Referred-in-Senate' or $billStage='Referred-in-House'">
						<hr width="40%"/>
						<p/>
						<center>
							<span class="chamber">
								<xsl:apply-templates select="current-chamber"/>
								<xsl:apply-templates select="action"/>
							</span>
						</center>
					</xsl:when>
					<xsl:when test="$resolutionStage='Referred-in-Senate' or $resolutionStage='Received-in-Senate'">
						<hr width="40%"/>
						<p/>
						<center>
							<span class="chamber">
								<xsl:apply-templates select="current-chamber"/>
							</span>
						</center>
						<xsl:apply-templates select="action"/>
					</xsl:when>
					<xsl:otherwise>
						<ul>
							<p align="justify" class="hang">
								<xsl:apply-templates select="official-title"/>
							</p>
						</ul>
						<hr width="40%"/>
						<p/>
						<center>
							<span class="chamber">
								<xsl:apply-templates select="current-chamber"/>
							</span>
						</center>
						<xsl:apply-templates select="action"/>
					</xsl:otherwise>
				</xsl:choose>
				<hr width="40%"/>
				<p/>
				<center>
					<b>
						<span class="legistype">
							<xsl:apply-templates select="legis-type"/>
						</span>
					</b>
				</center>
				<p/>
				<xsl:choose>
					<xsl:when test="($resolutionStage='Engrossed-in-Senate'and $resolutionType='senate-concurrent') or ($resolutionStage='Engrossed-House' and $resolutionType='senate-concurrent') or
						($resolutionStage='Engrossed-House' and $resolutionType='house-concurrent')"></xsl:when>
					<!--
				<xsl:when test="$resolutionStage='Received-in-Senate' or $resolutionStage='Referred-in-Senate'">
					
						<p align="justify" class="indent">
						<xsl:apply-templates select="official-title"/>
						</p>
					<p/>
				</xsl:when>
				-->
					<xsl:otherwise>
						<ul>
							<p align="justify" class="hang">
								<xsl:apply-templates select="official-title"/>
							</p>
						</ul>
						<p/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="action">
		<xsl:apply-templates select="action-date"/>
		<p align="justify" class="hang">
			<xsl:apply-templates select="action-desc"/>
		</p>
		<center>
			<xsl:apply-templates select="action-instruction"/>
		</center>
		<p/>
	</xsl:template>
	<xsl:template match="action-date">
		<xsl:variable name="resolutionStage" select="resolution/@resolution-stage"/>
		<xsl:choose>
			<xsl:when test="contains(.,'legislative day')">
				<center>
					<p/>
					<span class="simplecap">
						<xsl:value-of select="substring-before(.,substring-before(substring-after(.,'(') ,')')) "/>
					</span>
					<xsl:value-of select="substring-before(substring-after(.,'(') ,',') "/>
					<span class="simplecap">
						<xsl:text>, </xsl:text>
						<xsl:value-of select="substring-before(substring-after(.,',') ,')') "/>
						<xsl:value-of select="substring-after(.,substring-before(substring-after(.,'(') ,')')) "/>
					</span>
					<p/>
				</center>
			</xsl:when>
			<xsl:when test="$resolutionStage='Engrossed-House'">
				<p align="right">
					<i>
						<xsl:apply-templates/>
						<xsl:text>.</xsl:text>
						<xsl:text  disable-output-escaping="yes" >&#x00A0;</xsl:text>
						<xsl:text  disable-output-escaping="yes" >&#x00A0;</xsl:text>
					</i>
				</p>
			</xsl:when>
			<xsl:otherwise>
				<center>
					<p/>
					<span class="simplecap">
						<xsl:apply-templates/>
					</span>
					<p/>
				</center>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="legis-body">
		<p align="justify" class="indent">
			<xsl:choose>
				<xsl:when test="./@display-enacting-clause='no-display-enacting-clause'"></xsl:when>
				<xsl:otherwise>
					<em>
						<xsl:value-of select="$enact"/>
					</em>
				</xsl:otherwise>
			</xsl:choose>
			<xsl:choose>
				<xsl:when test="./@added-display-style='boldface-roman' or ./@reported-display-style='boldface-roman'">
					<b style="font-size=16pt;">
						<xsl:call-template name="displayLegisBody"/>
					</b>
				</xsl:when>
				<xsl:when test="./@added-display-style='italic' or ./@reported-display-style='italic'">
					<i>
						<xsl:call-template name="displayLegisBody"/>
					</i>
				</xsl:when>
				<xsl:when test="./@deleted-display-style='strikethrough' or ./@reported-display-style='strikethrough'">
					<strike>
						<xsl:call-template name="displayLegisBody"/>
					</strike>
				</xsl:when>
				<xsl:otherwise>
					<xsl:call-template name="displayLegisBody"/>
				</xsl:otherwise>
			</xsl:choose>
		</p>
	</xsl:template>
	<xsl:template name="displayLegisBody">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="preamble">
		<xsl:choose>
			<xsl:when test="@added-display-style='italic'">
				<i>
					<xsl:call-template name="displayPreamble"/>
				</i>
			</xsl:when>
			<xsl:when test="@deleted-display-style='strikethrough'">
				<strike>
					<xsl:call-template name="displayPreamble"/>
				</strike>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="displayPreamble"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="displayPreamble">
		<p align="justify">
			<xsl:apply-templates/>
		</p>
	</xsl:template>
	<xsl:template match="whereas">
		<ul>
			<p class="hang" align="justify">
				<xsl:apply-templates/>
			</p>
		</ul>
	</xsl:template>
	<xsl:template match="resolution-body">
		<xsl:variable name="resolutionType" select="resolution/@resolution-type"/>
		<xsl:choose>
			<xsl:when test="$resolutionType='house-concurrent'">
				<p align="justify" class="indent">
					<em>
						<xsl:value-of select="$HouseConcurrent"/>
					</em>
					<xsl:apply-templates/>
				</p>
			</xsl:when>
			<xsl:when test="./@style='constitutional-amendment'">
				<p align="justify" class="indent">
					<em>
						<xsl:value-of select="$ConstitutionalAmendment"/>
					</em>
					<xsl:apply-templates/>
				</p>
			</xsl:when>
			<xsl:when test="$resolutionType='house-joint'">
				<p align="justify" class="indent">
					<em>
						<xsl:value-of select="$HouseJoint"/>
					</em>
					<xsl:apply-templates/>
				</p>
			</xsl:when>
			<xsl:when test="$resolutionType='house-resolution'">
				<p align="justify" class="indent">
					<em>
						<xsl:value-of select="$HouseResolution"/>
					</em>
					<xsl:apply-templates/>
				</p>
			</xsl:when>
			<xsl:when test="$resolutionType='senate-concurrent'">
				<p align="justify" class="indent">
					<em>
						<xsl:value-of select="$SenateConcurrent"/>
					</em>
					<xsl:apply-templates/>
				</p>
			</xsl:when>
			<xsl:when test="$resolutionType='senate-joint'">
				<p align="justify" class="indent">
					<em>
						<xsl:value-of select="$SenateJoint"/>
					</em>
					<xsl:apply-templates/>
				</p>
			</xsl:when>
			<xsl:when test="$resolutionType='senate-resolution'">
				<p align="justify" class="indent">
					<em>
						<xsl:value-of select="$SenateResolution"/>
					</em>
					<xsl:apply-templates/>
				</p>
			</xsl:when>
		</xsl:choose>
	</xsl:template>
	<!--changes made 12/28-->
	<xsl:template match="action-desc">
		<xsl:variable name="billStage" select="bill/@bill-stage"/>
		<xsl:variable name="resolutionStage" select="resolution/@resolution-stage"/>
		<!--
	<xsl:choose>
	
		<xsl:when test="$billStage='Received-in-Senate' or $billStage='Received-in-House' or
		$billStage='Referred-in-Senate' or $billStage='Referred-in-House' or
		$resolutionStage='Referred-in-Senate' or $resolutionStage='Received-in-Senate'
		">
			<center>
				<xsl:apply-templates/>
			</center>
		</xsl:when>
		<xsl:otherwise>
			<ul>
				<p  align="justify" class="hang" style="font-size: 11pt">
					<xsl:apply-templates/>
				</p>
			</ul>
		</xsl:otherwise>
	</xsl:choose>	
	-->
		<ul>
			<p  align="justify" class="hang" style="font-size: 11pt">
				<xsl:apply-templates/>
			</p>
		</ul>
	</xsl:template>
	<xsl:template match="action-instruction">
		<center>
			<p style="font-size: 65%">
				<xsl:text>[</xsl:text>
				<xsl:apply-templates/>
				<xsl:text>]</xsl:text>
			</p>
		</center>
	</xsl:template>
	<xsl:template match="sponsor|cosponsor">
		<xsl:variable name="flag">
			<xsl:value-of select="contains(.,' of ')"/>
		</xsl:variable>
		<xsl:if test="$flag='false'">
			<xsl:value-of select="substring-before(., '.')"/>
			<xsl:text>. </xsl:text>
			<span class="simplecap">
				<xsl:value-of select="substring-after(., '.')"/>
			</span>
		</xsl:if>
		<xsl:if test="$flag='true'">
			<xsl:value-of select="substring-before(., '.')"/>
			<xsl:text>. </xsl:text>
			<xsl:variable name="State">
				<xsl:value-of select="substring-before(substring-after(., '.'),'of')"/>
			</xsl:variable>
			<span class="simplecap">
				<xsl:value-of select="substring-before(substring-after(., '.'),'of')"/>
			</span>
			<xsl:value-of select="substring-after(., $State)"/>
		</xsl:if>
	</xsl:template>
	<!--end of form-->
	<xsl:template match="section">
		<xsl:choose>
			<xsl:when test="@reported-display-style='boldface-roman'">
				<span class="sectionlevelOLCBold">
					<xsl:call-template name="displaySection"/>
				</span>
			</xsl:when>
			<xsl:when test="@reported-display-style='boldface-italic' or
		ancestor::*[@reported-display-style='boldface-italic']">
				<i>
					<span class="sectionlevelOLCBold">
						<xsl:call-template name="displaySection"/>
					</span>
				</i>
			</xsl:when>
			<xsl:when test="@deleted-display-style='strikethrough' or
		@reported-display-style='strikethrough'
		">
				<strike>
					<xsl:call-template name="displaySection"/>
				</strike>
			</xsl:when>
			<xsl:when test="@reported-display-style='boldface-roman'">
				<span class="sectionlevelOLCBold">
					<xsl:call-template name="displaySection"/>
				</span>
			</xsl:when>
			<xsl:when test="@added-display-style='italic' or @reported-display-style='italic'">
				<i>
					<xsl:call-template name="displaySection"/>
				</i>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="displaySection"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="displaySection">
		<xsl:variable name="billType" select="bill/@bill-type"/>
		<xsl:choose>
			<xsl:when test="./@section-type='undesignated-section'">
				<xsl:apply-templates/>
			</xsl:when>
			<xsl:when test="./@section-type='resolved'">
				<p class="indent" align="justify">
					<em>
						<xsl:value-of select="$HouseResolution"/>
					</em>
					<xsl:apply-templates/>
				</p>
			</xsl:when>
			<!--  archaic style linked -->
			<xsl:when test="(ancestor::quoted-block/@other-style='archaic') or
			(ancestor::quoted-block[@other-style='archaic-paragraph']) 			
			  and /bill/descendant::*/@idref=./@id ">
				<center>
					<a>
						<xsl:attribute name="href">
							<xsl:text>#</xsl:text>
							<xsl:value-of select='@id'/>
						</xsl:attribute>
						<xsl:attribute name="name">
							<xsl:text>toc-</xsl:text>
							<xsl:value-of select='@id'/>
						</xsl:attribute>
						<p/>
						<xsl:text>“</xsl:text>
						<xsl:value-of select="translate(header,$lower,$upper)"/>
						<p/>
						<span class="initialcapArchaic">
							<xsl:text>“</xsl:text>
							<xsl:value-of select="subsection/header"/>
						</span>
						<p/>						
							<xsl:text>“</xsl:text>
							<xsl:value-of select="translate(subsection/paragraph/header,$lower,$upper )"/>						
					</a>
				</center>
				<p class="indent">
					<xsl:if test="@section-type='subsequent-section'">
						<xsl:text>“</xsl:text>
						<span class="initialcap">
							<xsl:text>Sec. </xsl:text>
							<xsl:value-of select="enum"/>
							
						</span>
					</xsl:if>
					<xsl:text> </xsl:text>
					<xsl:apply-templates select="text"/>
					<xsl:apply-templates select="subsection"/>	
						<!--
						<xsl:text>“</xsl:text>
						<span class="initialcap">
							<xsl:text>Sec. </xsl:text>
							<xsl:value-of select="enum"/>
						</span>
					</xsl:if>
					<xsl:text> </xsl:text>
					<xsl:apply-templates select="subsection"/>
					-->
				</p>
			</xsl:when>
			<!--  archaic style not linked -->
			
			<xsl:when test="(ancestor::quoted-block/@other-style='archaic' and
		ancestor::quoted-block/@style='other') or
		(ancestor::quoted-block[@other-style='archaic-paragraph'])">
				<center>
					<xsl:if test="header">
						<xsl:text>“</xsl:text>
						<xsl:value-of select="translate(header,$lower,$upper)"/>
					</xsl:if>
					<p/>
					<span class="initialcapArchaic">
						<xsl:if test="child::subsection">
							<xsl:text>“</xsl:text>
							<xsl:value-of select="subsection/header"/>
						</xsl:if>
					</span>
				</center>
				<p class="indent">
					<xsl:if test="@section-type='subsequent-section'">
						<xsl:text>“</xsl:text>
						<span class="initialcap">
							<xsl:text>Sec. </xsl:text>
							<xsl:value-of select="enum"/>
						</span>
					</xsl:if>
					<xsl:text> </xsl:text>
					<xsl:apply-templates select="text"/>
					<xsl:text> </xsl:text>
					<xsl:apply-templates select="subsection"/>
				</p>
			</xsl:when>
			<!--  usc style not linked -->
			<xsl:when test="(ancestor::legis-body/@style='USC' or parent::quoted-block[@style='USC']) and
						not(/bill/descendant::*/@idref=./@id)">
				<ul>
					<p align="justify" class="hang">
						<b>
							<xsl:apply-templates select="enum"/>
							<xsl:text> </xsl:text>
							<xsl:apply-templates select="header"/>
						</b>
					</p>
				</ul>
				<xsl:choose>
					<xsl:when test="child::header">
						<xsl:apply-templates select="child::header/following-sibling::*"/>
					</xsl:when>
					<xsl:when test="child::enum">
						<xsl:apply-templates select="child::enum/following-sibling::*"/>
					</xsl:when>
				</xsl:choose>
			</xsl:when>
			<!--  traditional style linked -->
			<xsl:when test="($billType='traditional' and /bill/descendant::*/@idref=./@id) or
		(ancestor::quoted-block/@style='traditional' and /bill/descendant::*/@idref=./@id) or
				(ancestor::resolution-body/@style='traditional' and /bill/descendant::*/@idref=./@id)">
				<a>
					<xsl:attribute name="href">
						<xsl:text>#</xsl:text>
						<xsl:value-of select='@id'/>
					</xsl:attribute>
					<xsl:attribute name="name">
						<xsl:text>toc-</xsl:text>
						<xsl:value-of select='@id'/>
					</xsl:attribute>
					<p/>
					<center>
						<xsl:apply-templates select="header"/>
					</center>
					<p/>
				</a>
				<p align="justify" class="indent">
					<xsl:apply-templates select="enum"/>
					<xsl:text> </xsl:text>
					<xsl:if test="child::text[@display-inline='yes-display-inline']">
						<xsl:apply-templates select="text"/>
					</xsl:if>
				</p>
				<xsl:if test="child::text[@display-inline='no-display-inline']">
					<xsl:apply-templates select="text"/>
				</xsl:if>
				<xsl:choose>
					<xsl:when test="child::text">
						<xsl:apply-templates select="child::text/following-sibling::*"/>
					</xsl:when>
					<xsl:when test="child::header">
						<xsl:apply-templates select="child::header/following-sibling::*"/>
					</xsl:when>
					<xsl:when test="child::enum">
						<xsl:apply-templates select="child::enum/following-sibling::*"/>
					</xsl:when>
				</xsl:choose>
			</xsl:when>
			<!--  traditional style not linked -->
			<xsl:when test="($billType='traditional' and not(/bill/descendant::*/@idref=./@id)) or
		(ancestor::quoted-block/@style='traditional' and not(/bill/descendant::*/@idref=./@id)) or
		(ancestor::resolution-body/@style='traditional' and not(/bill/descendant::*/@idref=./@id))">
				<xsl:if test="header">
					<ul>
						<p align="center">
							<xsl:if test="ancestor::quoted-block">
								<xsl:text>“</xsl:text>
							</xsl:if>
							<xsl:apply-templates select="header"/>
						</p>
					</ul>
				</xsl:if>
				<p align="justify" class="indent">
					<xsl:apply-templates select="enum"/>
					<xsl:text> </xsl:text>
					<xsl:apply-templates select="text"/>
					<xsl:apply-templates select="paragraph"/>
					<xsl:apply-templates select="subsection"/>
				</p>
			</xsl:when>
			<!--  olc style linked -->
			<xsl:when test="$billType='olc' and /bill/descendant::*/@idref=./@id">
				
					<ul>
					<p align="justify" class="hang">
					<a>
					<xsl:attribute name="href">
						<xsl:text>#</xsl:text>
						<xsl:value-of select='@id'/>
					</xsl:attribute>
					<xsl:attribute name="name">
						<xsl:text>toc-</xsl:text>
						<xsl:value-of select='@id'/>
					</xsl:attribute>
						<xsl:apply-templates select="enum"/>
						<xsl:apply-templates select="header"/>
						<xsl:if test="count(child::*)=2 and child::enum and child::header and ancestor::quoted-block">
							<xsl:text>”.</xsl:text>
						</xsl:if>
						</a>
						<xsl:if test="text[@display-inline='yes-display-inline']">
							<xsl:text> </xsl:text>							
							<xsl:apply-templates select="text"/>
							<xsl:if test="quoted-block[@display-inline='yes-display-inline']">
								<xsl:apply-templates select="quoted-block"/>
							</xsl:if>							
						</xsl:if>						
					</p>
				</ul>
				
				
				
				
				<xsl:if test="text[@display-inline='no-display-inline']">
					<p align="left" class="indent">
						<xsl:apply-templates select="text"/>
						<xsl:if test="quoted-block[@display-inline='yes-display-inline']">
							<xsl:apply-templates select="quoted-block"/>
						</xsl:if>
					</p>
				</xsl:if>
				
				<xsl:if test="quoted-block[@display-inline='no-display-inline']">
					<xsl:apply-templates select="quoted-block"/>
				</xsl:if>
				<xsl:choose>
					<xsl:when test="child::quoted-block">
						<xsl:apply-templates select="child::quoted-block/following-sibling::*"/>
					</xsl:when>
					<xsl:when test="child::text">
						<xsl:apply-templates select="child::text/following-sibling::*"/>
					</xsl:when>
					<xsl:when test="child::header">
						<xsl:apply-templates select="child::header/following-sibling::*"/>
					</xsl:when>
					<xsl:when test="child::enum">
						<xsl:apply-templates select="child::enum/following-sibling::*"/>
					</xsl:when>
				</xsl:choose>
			</xsl:when>
			<!--  olc style linked -->
			<xsl:when test="$billType='olc' and not(/bill/descendant::*/@idref=./@id)">
				<ul>
					<p align="justify" class="hang">
						<xsl:apply-templates select="enum"/>
						<xsl:apply-templates select="header"/>
						<xsl:if test="count(child::*)=2 and child::enum and child::header and ancestor::quoted-block">
							<xsl:text>”.</xsl:text>
						</xsl:if>
					</p>
				</ul>
				<p align="left" class="indent">
					<xsl:apply-templates select="text"/>
					<xsl:if test="quoted-block[@display-inline='yes-display-inline']">
						<xsl:apply-templates select="quoted-block"/>
					</xsl:if>
				</p>
				<xsl:if test="quoted-block[@display-inline='no-display-inline']">
					<xsl:apply-templates select="quoted-block"/>
				</xsl:if>
				<xsl:choose>
					<xsl:when test="child::quoted-block">
						<xsl:apply-templates select="child::quoted-block/following-sibling::*"/>
					</xsl:when>
					<xsl:when test="child::text">
						<xsl:apply-templates select="child::text/following-sibling::*"/>
					</xsl:when>
					<xsl:when test="child::header">
						<xsl:apply-templates select="child::header/following-sibling::*"/>
					</xsl:when>
					<xsl:when test="child::enum">
						<xsl:apply-templates select="child::enum/following-sibling::*"/>
					</xsl:when>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<p align="justify" >
					<xsl:apply-templates/>
				</p>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="enum">
		<xsl:choose>
			<xsl:when test="child::deleted-phrase">
				<xsl:apply-templates/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="displayEnum"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="displayEnum">
		<xsl:variable name="billType" select="bill/@bill-type"/>
		<xsl:variable name="billStage" select="bill/@bill-stage"/>
		<xsl:variable name="resolutionStage" select="resolution/@resolution-stage"/>
		<xsl:choose>
			<xsl:when test="parent::section/parent::constitution-article/parent::quoted-block/@style='traditional'">
				<xsl:text>“</xsl:text>
				<span class="sectionlevelOLC">
					<span class="initialcap">
						<xsl:text>section </xsl:text>
					</span>
					<xsl:value-of select="."/>
					<xsl:text> </xsl:text>
				</span>
			</xsl:when>
			<xsl:when test="parent::section[@section-type='section-one']/parent::legis-body[@added-display-style='boldface-roman'] or
		parent::section[@section-type='section-one']/parent::legis-body[@reported-display-style='boldface-roman']">
				<span class="sectionlevelOLCBold">
					<xsl:text>SECTION </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(string(parent::section/@section-type)='section-one')">
				<xsl:choose>
					<xsl:when test="ancestor::*[@reported-display-style='boldface-roman']
				or ancestor::*[@reported-display-style='boldface-italic']">
						<span class="sectionlevelOLCBold">
							<xsl:text>SECTION </xsl:text>
							<xsl:value-of select="."/>
						</span>
						<xsl:text> </xsl:text>
					</xsl:when>
					<xsl:when test="(not(ancestor::quoted-block) and $billType='traditional') or
				(parent::section and ancestor::resolution-body[@style='traditional'])">
						<span class="initialcapTrad">
							<xsl:text>section </xsl:text>
							<xsl:value-of select="."/>
						</span>
					</xsl:when>
					<!--change 12/28/05-->
					<xsl:when test="($billStage='Introduced-in-House' or $billStage='Engrossed-in-House' or
				$billStage='Received-in-Senate' or $billStage='Received-in-House' or
				$billStage='Referred-in-Senate' or $billStage='Referred-in-House' or
				$billStage='Engrossed-in-Senate'or $billStage='Reported-in-House' or $billStage='Pre-Introduction'
				or $resolutionStage='Introduced-in-House' or $resolutionStage='Introduced-in-Senate'
				or $billStage='Reported-in-Senate' or $billStage='Enrolled-Bill' or $billStage='Introduced-in-Senate') and
				not(parent::*[@reported-display-style='boldface-italic'])">
						<span class="sectionlevelOLC">
							<xsl:text>SECTION </xsl:text>
							<xsl:value-of select="."/>
						</span>
						<xsl:text> </xsl:text>
					</xsl:when>
					<xsl:when test="$billStage='Introduced-in-Senate'">
						<span class="initialcapTrad">
							<xsl:text>section </xsl:text>
							<xsl:value-of select="."/>
						</span>
						<xsl:text> </xsl:text>
					</xsl:when>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="string(parent::section/@section-type) ='subsequent-section' 		
		">
				<xsl:choose>
					<xsl:when test="(not(ancestor::quoted-block) and $billType='traditional') or
				(parent::section and ancestor::resolution-body[@style='traditional'])">
						<span class="initialcapTrad">
							<xsl:text>sec. </xsl:text>
							<xsl:value-of select="."/>
							<xsl:text> </xsl:text>
						</span>
					</xsl:when>
					<xsl:when test="
				ancestor::*[@reported-display-style='boldface-roman'] or
				ancestor::*[@reported-display-style='boldface-italic'] or
				not(ancestor::quoted-block) and not($billType='traditional') and
				(parent::section[@section-type='subsequent-section']/parent::legis-body[@added-display-style='boldface-roman'] or
				parent::section[@section-type='subsequent-section']/parent::legis-body[@reported-display-style='boldface-roman'] or
				parent::*[@reported-display-style='boldface-roman'] or
				parent::*[@added-display-style='boldface-roman']			
				)
				">
						<span class="sectionlevelOLCBold">
							<xsl:if test="ancestor::quoted-block">
								<xsl:text>“</xsl:text>
							</xsl:if>
							<xsl:text>SEC. </xsl:text>
							<xsl:value-of select="."/>
						</span>
					</xsl:when>
					<xsl:when test="(parent::section/ancestor::quoted-block[@other-style='nuclear']) or
								(parent::section and ancestor::quoted-block[@other-style='traditional-inline'])">
						<span class="sectionlevelOLCnuclear">
							<xsl:if test="ancestor::quoted-block">
								<xsl:text>“</xsl:text>
							</xsl:if>
							<xsl:text>Sec. </xsl:text>
							<xsl:value-of select="."/>
						</span>
					</xsl:when>
					<xsl:when test="parent::section/parent::resolution-body/@style='traditional'">
						<span class="initialcap">
							<xsl:text>sec. </xsl:text>
							<xsl:value-of select="."/>
							<xsl:text> </xsl:text>
						</span>
					</xsl:when>
					<xsl:when test="not(ancestor::quoted-block) and not($billType='traditional')">
						<span class="sectionlevelOLC">
							<xsl:text>SEC. </xsl:text>
							<xsl:value-of select="."/>
						</span>
					</xsl:when>
					<xsl:when test="ancestor::quoted-block/@style='USC'">
						<span class="sectionlevelUSC">
							<xsl:text>“</xsl:text>
							<xsl:text>§ </xsl:text>
							<xsl:value-of select="."/>
						</span>
					</xsl:when>
					<xsl:when test="ancestor::legis-body/@added-display-style='boldface-roman' and
				(ancestor::quoted-block/@style='OLC' or ancestor::quoted-block/@style='tax')">
						<span class="boldfacesectionlevelOLC">
							<xsl:text>“</xsl:text>
							<xsl:text>SEC. </xsl:text>
							<xsl:value-of select="."/>
						</span>
					</xsl:when>
					<xsl:when test="ancestor::quoted-block/@style='OLC'">
						<xsl:text>“</xsl:text>
						<span class="sectionlevelOLC">
							<xsl:text>SEC. </xsl:text>
							<xsl:value-of select="."/>
						</span>
					</xsl:when>
					<xsl:when test="parent::section and ancestor::quoted-block/@style='tax'">
						<xsl:text>“</xsl:text>
						<span class="sectionlevelIRC">
							<xsl:text>SEC. </xsl:text>
							<xsl:value-of select="."/>
						</span>
					</xsl:when>
					<xsl:when test="(ancestor::quoted-block/@style='traditional') 					
					">
						<xsl:text>“</xsl:text>
						<span class="initialcapTrad">
							<xsl:text>Sec. </xsl:text>
							<xsl:value-of select="."/>
							<xsl:text> </xsl:text>
						</span>
					</xsl:when>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$billType='traditional' and parent::title[@reported-display-style='boldface-roman']">
				<span class="titlelevelTradBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>TITLE </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(($billType='traditional' or ancestor::quoted-block/@style='traditional') and parent::title) or
		(ancestor::quoted-block[@style='other' and @other-style='archaic'] and parent::title) or
		(ancestor::quoted-block[@style='other' and @other-style='traditional-inline'] and parent::title) or
		(ancestor::quoted-block[@style='other' and @other-style='archaic-paragraph'] and parent::title)
		">
				<span class="titlelevelTrad">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>TITLE </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::title and ancestor::legis-body/@style='USC' or
		parent::title and ancestor::quoted-block[@style='quoted-block']">
				<span class="titlelevelUSC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>TITLE </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(parent::title/ancestor::quoted-block[@style='USC'])">
				<span class="titlelevelUSC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>TITLE </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(parent::title/ancestor::quoted-block[@style='tax'])">
				<span class="titlelevelIRC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>TITLE </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::title ">
				<span class="titlelevelOLC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>TITLE </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(ancestor::quoted-block/@style='traditional' and parent::subtitle) or
		(ancestor::quoted-block[@style='other' and @other-style='archaic'] and parent::subtitle) or
		(ancestor::quoted-block[@style='other' and @other-style='archaic-paragraph'] and parent::subtitle)">
				<span class="subtitlelevelTrad">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subtitle </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="$billType='traditional' and parent::subtitle[@reported-display-style='boldface-roman']">
				<span class="subtitlelevelTradBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subtitle </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::subtitle and ancestor::legis-body/@style='USC'">
				<span class="subtitlelevelUSC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subtitle </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::subtitle[@reported-display-style='boldface-roman']">
				<span class="subtitlelevelOLCBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subtitle </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="($billType='traditional' and parent::subtitle) or
			(ancestor::quoted-block[@style='other' and @other-style='traditional-inline'] and parent::subtitle)">
				<span class="subtitlelevelTrad">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subtitle </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(parent::subtitle/ancestor::quoted-block[@style='USC'])">
				<span class="subtitlelevelUSC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subtitle </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(parent::subtitle[@reported-display-style='boldface-italic']/ancestor::quoted-block[@style='tax'])or
		(parent::subtitle and ancestor::*[@reported-display-style='boldface-italic'] and ancestor::quoted-block[@style='tax'])">
				<span class="subtitlelevelIRCBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subtitle </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::subtitle and ancestor::quoted-block/@style='tax'">
				<span class="subtitlelevelIRC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subtitle </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::subtitle">
				<span class="subtitlelevelOLC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subtitle </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(parent::chapter and ancestor::*[@reported-display-style='boldface-italic'])">
				<span class="chapterlevelIRCBold">
					<xsl:text>“</xsl:text>
					<xsl:value-of select="translate('chapter ',$lower,$upper)"/>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
				</span>
			</xsl:when>
			<xsl:when test="parent::chapter and ancestor::quoted-block/@style='tax'">
				<span class="chapterlevelIRC">
					<xsl:text>“</xsl:text>
					<xsl:value-of select="translate('chapter ',$lower,$upper)"/>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
				</span>
			</xsl:when>
			<xsl:when test="($billType='traditional' and parent::chapter[@reported-display-style='boldface-roman'])">
				<span class="chapterlevelTradBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>chapter </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(($billType='traditional' or ancestor::quoted-block/@style='traditional') and parent::chapter) 
			
				">
				<span class="chapterlevelTrad">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>chapter </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::chapter and ancestor::legis-body/@style='USC'">
				<span class="chapterlevelUSC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>CHAPTER </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::chapter[@reported-display-style='boldface-roman']">
				<span class="chapterlevelOLCBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>CHAPTER </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(parent::chapter/ancestor::quoted-block[@style='USC'])">
				<span class="chapterlevelUSC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>CHAPTER </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>			
			<xsl:when test="(parent::chapter/ancestor::quoted-block[@other-style='nuclear'])">
				<span class="chapterlevelOLCnuclear">	
					<xsl:text>“</xsl:text>									
					<xsl:text>CHAPTER </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>			
			<xsl:when test="parent::chapter">
				<span class="chapterlevelOLC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>CHAPTER </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="($billType='traditional' and parent::subchapter[@reported-display-style='boldface-roman'])">
				<span class="subchapterlevelTradBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subchapter </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(ancestor::quoted-block[@style='other' and @other-style='traditional-inline'] and parent::subchapter) or
			(ancestor::quoted-block[@style='other' and @other-style='archaic-paragraph'] and parent::subchapter)">
				<span class="subchapterlevelTradInline">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subchapter </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>			
			<xsl:when test="(($billType='olc' and ancestor::quoted-block/@style='traditional') and parent::subchapter) or
		($billType='traditional' and parent::subchapter) or
		(($billType='olc' and ancestor::quoted-block/@other-style='archaic') and parent::subchapter) 	
			">
				<span class="subchapterlevelTrad">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>					
					<xsl:value-of select="."/>
					
					
				</span>
			</xsl:when>
			<xsl:when test="(($billType='traditional' and ancestor::quoted-block/@style='OLC') and parent::subchapter)">
				<span class="subchapterlevelOLC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subchapter </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(parent::subchapter[@reported-display-style='boldface-roman'] and ancestor::quoted-block[@style='tax']) or
		parent::subchapter/parent::quoted-block[@style='tax']/ancestor::*[@reported-display-style='boldface-roman']
		or (parent::subchapter and ancestor::*[@reported-display-style='boldface-italic'])">
				<span class="subchapterlevelIRCBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subchapter </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::subchapter and ancestor::quoted-block/@style='tax'">
				<span class="subchapterlevelIRC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subchapter </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::subchapter and ancestor::legis-body/@style='USC'">
				<span class="subchapterlevelUSC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>SUBCHAPTER </xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
				</span>
			</xsl:when>
			<xsl:when test="parent::subchapter[@reported-display-style='boldface-roman']">
				<span class="subchapterlevelOLCBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subchapter </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::subchapter/ancestor::quoted-block[@style='USC']">
				<span class="subchapterlevelUSC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>SUBCHAPTER </xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
				</span>
			</xsl:when>
			<xsl:when test="parent::subchapter">
				<span class="subchapterlevelOLC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subchapter </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="$billType='traditional' and parent::part[@reported-display-style='boldface-roman']">
				<span class="partlevelTradBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:value-of select="translate('part ',$lower,$upper)"/>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
				</span>
			</xsl:when>
			<xsl:when test="(($billType='traditional' or ancestor::quoted-block/@style='traditional') and parent::part) or
		(ancestor::quoted-block[@style='other' and @other-style='archaic'] and parent::part) or
		(ancestor::quoted-block[@style='other' and @other-style='traditional-inline'] and parent::part) or
		(ancestor::quoted-block[@style='other' and @other-style='archaic-paragraph'] and parent::part)">
				<span class="partlevelTrad">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>Part </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::part and ancestor::legis-body/@style='USC'">
				<span class="partlevelUSC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>PART </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(parent::part[@reported-display-style='boldface-roman'] and ancestor::quoted-block[@style='tax']) or
		parent::part/parent::quoted-block[@style='tax']/ancestor::*[@reported-display-style='boldface-roman']">
				<span class="partlevelIRCBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>PART </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::part[@reported-display-style='boldface-roman']">
				<span class="partlevelOLCBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>PART </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(parent::part/ancestor::quoted-block[@style='USC'])">
				<span class="partlevelUSC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>PART </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(parent::part[@reported-display-style='boldface-italic']/ancestor::quoted-block[@style='tax'])or
		(parent::part and ancestor::*[@reported-display-style='boldface-italic'] and ancestor::quoted-block[@style='tax'])">
				<span class="partlevelIRCBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>PART </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(parent::part/ancestor::quoted-block[@style='tax'])">
				<span class="partlevelIRC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>PART </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::part">
				<span class="partlevelOLC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>PART </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="$billType='traditional' and parent::subpart[@reported-display-style='boldface-roman']">
				<span class="subpartlevelTradBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subpart </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="(($billType='traditional' or ancestor::quoted-block/@style='traditional') and parent::subpart) or
		((ancestor::quoted-block[@style='other' and @other-style='archaic'] and parent::subpart)) or
				(ancestor::quoted-block[@style='other' and @other-style='traditional-inline'] and parent::subpart) or
				(ancestor::quoted-block[@style='other' and @other-style='archaic-paragraph'] and parent::subpart)">
				<span class="subpartlevelTrad">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subpart </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::subpart[@reported-display-style='boldface-roman']">
				<span class="subpartlevelOLCBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subpart </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::subpart and ancestor::quoted-block[@style='tax']/ancestor::*[@reported-display-style='boldface-roman']
		or (parent::subpart and ancestor::*[@reported-display-style='boldface-italic'] and ancestor::quoted-block[@style='tax'])">
				<span class="subpartlevelIRCBold">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subpart </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::subpart and ancestor::quoted-block/@style='tax'">
				<span class="subpartlevelIRC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subpart </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::subpart">
				<span class="subpartlevelOLC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>subpart </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::division">
				<span class="divisionlevelOLC">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:text>DIVISION </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="ancestor::*[@reported-display-style='boldface-roman']/parent::quoted-block[@style='tax']">
				<span class="sectionlevelIRCBold">
					<xsl:value-of select="."/>
					<xsl:text> </xsl:text>
				</span>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="."/>
				<xsl:text> </xsl:text>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="header">
		<xsl:choose>
			<xsl:when test="child::deleted-phrase">
				<xsl:apply-templates select="deleted-phrase"/>
				<xsl:apply-templates select="added-phrase"/>
				<xsl:apply-templates select="text()"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="displayHeader"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="displayHeader">
		<xsl:variable name="billType" select="bill/@bill-type"/>
		<xsl:choose>
			<xsl:when test="parent::section and ancestor::quoted-block/@style='USC'">
				<span class="sectionlevelUSC">
					<xsl:text> </xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
				<p/>
			</xsl:when>
			<xsl:when test="parent::section and ancestor::quoted-block/@style='traditional'">
				<b>
					<span class="smallcap">
						<xsl:value-of select="translate(.,$upper,$lower)"/>
					</span>
				</b>
				<p/>
			</xsl:when>
			<xsl:when test="(parent::section and $billType='traditional' and ancestor::*[@reported-display-style='boldface-roman'])">
				<span class="sectionlevelTradBold">
					<xsl:text> </xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
				</span>
			</xsl:when>
			<xsl:when test="(parent::section and $billType='traditional') or
		(parent::section and ancestor::resolution-body/@style='traditional') 
			
		">
				<span class="sectionlevelTrad">
					<xsl:text> </xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
				</span>
			</xsl:when>
			<xsl:when test="$billType='traditional' and parent::title[@reported-display-style='boldface-roman']">
				<span class="titlelevelTradBold">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::title[@reported-display-style='boldface-roman']">
				<span class="titlelevelOLC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="$billType='traditional' and parent::subtitle[@reported-display-style='boldface-roman']">
				<span class="subtitlelevelTradBold">
					<xsl:text>—</xsl:text>
					<xsl:text>subtitle </xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="($billType='traditional' and parent::chapter[@reported-display-style='boldface-roman'])">
				<span class="chapterlevelTradBold">
					<xsl:text>—</xsl:text>
					<xsl:text>chapter </xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::chapter[@reported-display-style='boldface-roman']">
				<span class="chapterlevelOLCBold">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="$billType='olc' and parent::subchapter[@reported-display-style='boldface-roman']">
				<span class="subchapterlevelOLCBold">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="$billType='traditional' and parent::part[@reported-display-style='boldface-roman']">
				<span class="partlevelTradBold">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="translate(ancestor::quoted-block/child::after-quoted-block,$lower,$upper) "/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="(parent::part[@reported-display-style='boldface-roman'] and ancestor::quoted-block[@style='tax']) or
		 (parent::part/parent::quoted-block[@style='tax']/ancestor::*[@reported-display-style='boldface-roman'])">
				<span class="partlevelIRCBold">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="translate(ancestor::quoted-block/child::after-quoted-block,$lower,$upper) "/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::part[@reported-display-style='boldface-roman']">
				<span class="partlevelOLCBold">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="translate(ancestor::quoted-block/child::after-quoted-block,$lower,$upper) "/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="$billType='traditional' and parent::subpart[@reported-display-style='boldface-roman']">
				<span class="subpartlevelTradBold">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::subpart[@reported-display-style='boldface-roman']">
				<span class="subpartlevelOLCBold">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::subpart and ancestor::quoted-block[@style='tax']/ancestor::*[@reported-display-style='boldface-roman']">
				<span class="subpartlevelIRCBold">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::paragraph and ancestor::*[@reported-display-style='boldface-roman']">
				<span class="smallcap">
					<xsl:value-of select="."/>
				</span>
				<xsl:if test="name(.)='header'">
					<xsl:text>.—</xsl:text>
				</xsl:if>
				<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
					<xsl:text>”</xsl:text>
					<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
				</xsl:if>
			</xsl:when>
			<xsl:when test="(ancestor::quoted-block[@style='other' and @other-style='traditional-inline'] and parent::subchapter) or
			(ancestor::quoted-block[@style='other' and @other-style='archaic-paragraph'] and parent::subchapter)
			">
				<span class="subchapterlevelTradInline">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$upper,$lower)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="(parent::subchapter[@reported-display-style='boldface-roman'] and ancestor::quoted-block[@style='tax']) or
		parent::subchapter/parent::quoted-block[@style='tax']/ancestor::*[@reported-display-style='boldface-roman']
		or (parent::subchapter and ancestor::*[@reported-display-style='boldface-italic'])">
				<span class="subchapterlevelIRCBold">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="$billType='olc' and (parent::section/parent::legis-body[@added-display-style='boldface-roman'] or
		parent::section/parent::legis-body[@reported-display-style='boldface-roman'] or
		(parent::section and ancestor::*[@reported-display-style='boldface-roman']) or
		(parent::section and ancestor::*[@reported-display-style='boldface-italic']))		 		 		
		">
				<span class="sectionlevelOLCBold">
					<xsl:text> </xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:text>.</xsl:text>
					<xsl:if test="parent::subsection">
						<xsl:text>—</xsl:text>
					</xsl:if>
					<!-- if there is only an enum and a header within a quoted block display a ".	-->
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”.</xsl:text>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="$billType='olc' and ((parent::section and ancestor::legis-body/@added-display-style='boldface-roman') or
				parent::*[@reported-display-style='boldface-roman'] or
				parent::*[@added-display-style='boldface-roman'])">
				<span class="sectionlevelOLCBold">
					<xsl:text> </xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:text>.</xsl:text>
					<!-- if there is only an enum and a header within a quoted block display a ".	-->
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”.</xsl:text>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::section and ancestor::quoted-block[@style='tax']">
				<span class="sectionlevelIRC">
					<xsl:text> </xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:text>.</xsl:text>
					<!-- if there is only an enum and a header within a quoted block display a ".	-->
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”.</xsl:text>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="(parent::section and ancestor::quoted-block[@other-style='nuclear']) or
			(parent::section and ancestor::quoted-block[@other-style='traditional-inline'])
			">
				<span class="sectionlevelOLCnuclear">
					<xsl:text> </xsl:text>
					<xsl:value-of select="translate(.,$upper,$lower)"/>
					<xsl:text>.</xsl:text>
					<!-- if there is only an enum and a header within a quoted block display a ".	-->
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”.</xsl:text>
					</xsl:if>
				</span>
			
			</xsl:when>
			<xsl:when test="(parent::section)">
				<span class="sectionlevelOLC">
					<xsl:text> </xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:text>.</xsl:text>
					<!-- if there is only an enum and a header within a quoted block display a ".	-->
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”.</xsl:text>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="(parent::subsection)">
				<xsl:choose>
					<xsl:when test="not(following-sibling::*)">
						<span class="initialcap">
							<xsl:value-of select="."/>
							<xsl:text>.—</xsl:text>
						</span>
						<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
							<xsl:text>”</xsl:text>
							<xsl:value-of select="translate(ancestor::quoted-block/child::after-quoted-block,$lower,$upper) "/>
						</xsl:if>
					</xsl:when>
					<xsl:when test="parent::subsection/parent::section/ancestor::quoted-block[@other-style='archaic']">
						<xsl:text> </xsl:text>
					</xsl:when>
					<xsl:when test="following-sibling::*">
						<span class="initialcap">
							<xsl:apply-templates/>
						</span>
						<xsl:text>.—</xsl:text>
					</xsl:when>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="(enum-in-header)">
				<span class="smallcap">
					<xsl:apply-templates/>
				</span>
				<xsl:text>.—</xsl:text>
			</xsl:when>
			<xsl:when test="(($billType='traditional' or ancestor::quoted-block/@style='traditional') and parent::title) or
	     (ancestor::quoted-block[@style='other' and @other-style='archaic'] and parent::title) or
	     (ancestor::quoted-block[@style='other' and @other-style='traditional-inline'] and parent::title) 	or
	     (ancestor::quoted-block[@style='other' and @other-style='archaic-paragraph'] and parent::title)     ">
				<span class="titlelevelTrad">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="translate(ancestor::quoted-block/child::after-quoted-block,$lower,$upper) "/>
					</xsl:if>
				</span>
				<p/>
			</xsl:when>
			<xsl:when test="parent::title and ancestor::legis-body/@style='USC'">
				<span class="titlelevelUSC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::title/ancestor::quoted-block[@style='USC']">
				<span class="titlelevelUSC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::title/ancestor::quoted-block[@style='tax']">
				<span class="titlelevelIRC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::title">
				<span class="titlelevelOLC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="(($billType='traditional' or ancestor::quoted-block/@style='traditional') and parent::subtitle) or
	     (ancestor::quoted-block[@style='other' and @other-style='archaic'] and parent::subtitle) or
	     (ancestor::quoted-block[@style='other' and @other-style='traditional-inline'] and parent::subtitle) or
	     (ancestor::quoted-block[@style='other' and @other-style='archaic-paragraph'] and parent::subtitle)
	     ">
				<span class="subtitlelevelTrad">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::subtitle and ancestor::legis-body/@style='USC'">
				<span class="subtitlelevelUSC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::subtitle/ancestor::quoted-block[@style='USC']">
				<span class="subtitlelevelUSC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="(parent::subtitle[@reported-display-style='boldface-italic']/ancestor::quoted-block[@style='tax'])or
		(parent::subtitle and ancestor::*[@reported-display-style='boldface-italic'] and ancestor::quoted-block[@style='tax'])">
				<span class="subtitlelevelIRCBold">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::subtitle and ancestor::quoted-block/@style='tax'">
				<span class="subtitlelevelIRC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::subtitle">
				<span class="subtitlelevelOLC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="(parent::chapter and ancestor::*[@reported-display-style='boldface-italic'])">
				<span class="chapterlevelIRCBold">
					<xsl:value-of select="translate('—',$lower,$upper)"/>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
				</span>
			</xsl:when>
			<xsl:when test="parent::chapter and ancestor::quoted-block/@style='tax'">
				<span class="chapterlevelIRC">
					<xsl:value-of select="translate('—',$lower,$upper)"/>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
				</span>
			</xsl:when>
			<xsl:when test="($billType='traditional' or ancestor::quoted-block/@style='traditional') and parent::chapter">
				<span class="chapterlevelTrad">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::chapter and ancestor::legis-body/@style='USC'">
				<span class="chapterlevelUSC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::chapter/ancestor::quoted-block[@style='USC']">
				<span class="chapterlevelUSC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="(parent::chapter/ancestor::quoted-block[@other-style='nuclear'])">
				<span class="chapterlevelOLCnuclear">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::chapter">
				<span class="chapterlevelOLC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="($billType='traditional' and parent::subchapter[@reported-display-style='boldface-roman'])">
				<span class="subchapterlevelTradBold">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="(($billType='olc' and ancestor::quoted-block/@style='traditional') and parent::subchapter) or
		($billType='traditional' and parent::subchapter) or
		(($billType='olc' and ancestor::quoted-block/@other-style='archaic') and parent::subchapter) or
		(ancestor::quoted-block[@style='other' and @other-style='archaic-paragraph'] and parent::subchapter)
		">
				<span class="subchapterlevelTrad">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="($billType='traditional' and ancestor::quoted-block/@style='OLC') and parent::subchapter">
				<span class="subchapterlevelOLC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::subchapter and ancestor::quoted-block/@style='tax'">
				<span class="subchapterlevelIRC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
				</span>
			</xsl:when>
			<xsl:when test="parent::subchapter and ancestor::legis-body/@style='USC'">
				<span class="subchapterlevelUSC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::subchapter/ancestor::quoted-block[@style='USC']">
				<span class="subchapterlevelUSC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::subchapter">
				<span class="subchapterlevelOLC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="(($billType='traditional' or ancestor::quoted-block/@style='traditional') and parent::part) or
		(ancestor::quoted-block[@style='other' and @other-style='archaic'] and parent::part) or
		(ancestor::quoted-block[@style='other' and @other-style='traditional-inline'] and parent::part) or
		(ancestor::quoted-block[@style='other' and @other-style='archaic-paragraph'] and parent::part)">
				<span class="partlevelTrad">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="translate(ancestor::quoted-block/child::after-quoted-block,$lower,$upper) "/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::part and ancestor::legis-body/@style='USC'">
				<span class="partlevelUSC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="translate(ancestor::quoted-block/child::after-quoted-block,$lower,$upper) "/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::part/ancestor::quoted-block[@style='USC']">
				<span class="partlevelUSC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="(parent::part[@reported-display-style='boldface-italic']/ancestor::quoted-block[@style='tax']) or
		(parent::part and ancestor::*[@reported-display-style='boldface-italic'] and ancestor::quoted-block[@style='tax'])">
				<span class="partlevelIRCBold">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::part/ancestor::quoted-block[@style='tax']">
				<span class="partlevelIRC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::part">
				<span class="partlevelOLC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="translate(ancestor::quoted-block/child::after-quoted-block,$lower,$upper) "/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="(($billType='traditional' or ancestor::quoted-block/@style='traditional') and parent::subpart) or
		((ancestor::quoted-block[@style='other' and @other-style='archaic'] and parent::subpart)) or
		(ancestor::quoted-block[@style='other' and @other-style='traditional-inline'] and parent::subpart) or
		(ancestor::quoted-block[@style='other' and @other-style='archaic-paragraph'] and parent::subpart)">
				<span class="subpartlevelTrad">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="(parent::subpart and ancestor::*[@reported-display-style='boldface-italic'] and ancestor::quoted-block[@style='tax'])">
				<span class="subpartlevelIRCBold">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::subpart and ancestor::quoted-block/@style='tax'">
				<span class="subpartlevelIRC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::subpart">
				<span class="subpartlevelOLC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="."/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:when test="parent::division">
				<span class="divisionlevelOLC">
					<xsl:text>—</xsl:text>
					<xsl:value-of select="translate(.,$lower,$upper)"/>
					<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
						<xsl:text>”</xsl:text>
						<xsl:value-of select="translate(ancestor::quoted-block/child::after-quoted-block,$lower,$upper) "/>
					</xsl:if>
				</span>
			</xsl:when>
			<xsl:otherwise>
				<span class="smallcap">
					<xsl:if test="following-sibling::*">
						<xsl:apply-templates/>
					</xsl:if>
					<xsl:if test="not(following-sibling::*)">
						<xsl:value-of select="."/>
					</xsl:if>
				</span>
				<xsl:choose>
					<xsl:when test="name(.)='header' and parent::committee-appointment-paragraph">
						<xsl:text> </xsl:text>
					</xsl:when>
					<xsl:when test="name(.)='header'">
						<xsl:text>.—</xsl:text>
					</xsl:when>
				</xsl:choose>
				<xsl:if test="not(following-sibling::*) and name(ancestor::quoted-block/child::*[2])='after-quoted-block'">
					<xsl:text>”</xsl:text>
					<xsl:value-of select="ancestor::quoted-block/child::after-quoted-block"/>
				</xsl:if>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="chapter">
		<xsl:choose>
			<xsl:when test="@reported-display-style='boldface-roman'">
				<span class="sectionlevelOLCBold">
					<xsl:call-template name="DisplayChapter"/>
				</span>
			</xsl:when>
			<xsl:when test="@reported-display-style='boldface-italic'
		or ancestor::*[@reported-display-style='boldface-italic']">
				<i>
					<span class="sectionlevelOLCBold">
						<xsl:call-template name="DisplayChapter"/>
					</span>
				</i>
			</xsl:when>
			<xsl:when test="@deleted-display-style='strikethrough' or
		@reported-display-style='strikethrough'
		">
				<strike>
					<xsl:call-template name="DisplayChapter"/>
				</strike>
			</xsl:when>
			<xsl:when test="@reported-display-style='boldface-roman'">
				<span class="sectionlevelOLCBold">
					<xsl:call-template name="DisplayChapter"/>
				</span>
			</xsl:when>
			<xsl:when test="@added-display-style='italic' or @reported-display-style='italic'">
				<i>
					<xsl:call-template name="DisplayChapter"/>
				</i>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="DisplayChapter"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="DisplayChapter">
		<xsl:call-template name="createAnchor"/>
		<p/>
		<xsl:call-template name="displaySub"/>
	</xsl:template>
	<xsl:template match="//quoted-block/chapter/subchapter[last()]/section[last()]/paragraph[last()]">
		<ul>
			<xsl:text>“</xsl:text>
			<xsl:apply-templates/>
			<xsl:if test="parent::section/parent::subchapter/parent::chapter/parent::quoted-block/child::after-quoted-block=''">
				<xsl:text>”</xsl:text>
			</xsl:if>
		</ul>
	</xsl:template>
	<xsl:template match="subchapter">
		<xsl:choose>
			<xsl:when test="@reported-display-style='boldface-roman'">
				<span class="sectionlevelOLCBold">
					<xsl:call-template name="DisplaySubchapter"/>
				</span>
			</xsl:when>
			<xsl:when test="@reported-display-style='boldface-italic'">
				<i>
					<span class="sectionlevelOLCBold">
						<xsl:call-template name="DisplaySubchapter"/>
					</span>
				</i>
			</xsl:when>
			<xsl:when test="@deleted-display-style='strikethrough' or
		@reported-display-style='strikethrough'
		">
				<strike>
					<xsl:call-template name="DisplaySubchapter"/>
				</strike>
			</xsl:when>
			<xsl:when test="@reported-display-style='boldface-roman'">
				<span class="sectionlevelOLCBold">
					<xsl:call-template name="DisplaySubchapter"/>
				</span>
			</xsl:when>
			<xsl:when test="@added-display-style='italic' or @reported-display-style='italic'">
				<i>
					<xsl:call-template name="DisplaySubchapter"/>
				</i>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="DisplaySubchapter"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="DisplaySubchapter">
		<xsl:call-template name="createAnchor"/>
		<xsl:call-template name="displaySub"/>
	</xsl:template>
	<xsl:template match="part|subpart|division">
		<xsl:choose>
			<xsl:when test="@reported-display-style='boldface-roman'">
				<span class="sectionlevelOLCBold">
					<xsl:call-template name="displaySub"/>
				</span>
			</xsl:when>
			<xsl:when test="@reported-display-style='boldface-italic'
		or ancestor::*[@reported-display-style='boldface-italic']">
				<i>
					<span class="sectionlevelOLCBold">
						<xsl:call-template name="displaySub"/>
					</span>
				</i>
			</xsl:when>
			<xsl:when test="@deleted-display-style='strikethrough' or
		@reported-display-style='strikethrough'
		">
				<strike>
					<xsl:call-template name="displaySub"/>
				</strike>
			</xsl:when>
			<xsl:when test="@reported-display-style='boldface-roman'">
				<span class="sectionlevelOLCBold">
					<xsl:call-template name="displaySub"/>
				</span>
			</xsl:when>
			<xsl:when test="@added-display-style='italic' or @reported-display-style='italic'">
				<i>
					<xsl:call-template name="displaySub"/>
				</i>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="displaySub"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="BigHeadsLinked">
		<p>
			<center>
				<a>
					<xsl:attribute name="href">
						<xsl:text>#</xsl:text>
						<xsl:value-of select='@id'/>
					</xsl:attribute>
					<xsl:attribute name="name">
						<xsl:text>toc-</xsl:text>
						<xsl:value-of select='@id'/>
					</xsl:attribute>
					<xsl:apply-templates select="enum"/>
					<xsl:apply-templates select="header"/>
					<xsl:if test="not(following-sibling::*)">
						<xsl:value-of select="parent::quoted-block/child::after-quoted-block"/>
					</xsl:if>
				</a>
			</center>
		</p>
	</xsl:template>
	<xsl:template name="BigHeads">
		<p>
			<center>
				<xsl:apply-templates/>
			</center>
		</p>
	</xsl:template>
	<xsl:template name="displaySub">
		<xsl:variable name="billType" select="bill/@bill-type"/>
		<xsl:call-template name="createAnchor"/>
		<xsl:choose>
			<xsl:when test="($billType='olc' and /bill/descendant::*/@idref=./@id) or
		($billType='traditional' and /bill/descendant::*/@idref=./@id)">
				<xsl:call-template name="BigHeadsLinked"/>
				<xsl:choose>
					<xsl:when test="child::header">
						<xsl:apply-templates select="child::header/following-sibling::*"/>
					</xsl:when>
					<xsl:when test="child::enum">
						<xsl:apply-templates select="child::enum/following-sibling::*"/>
					</xsl:when>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="BigHeads"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="createAnchor">
		<a>
			<xsl:attribute name="NAME">
				<xsl:value-of select="@id"/>
			</xsl:attribute>
		</a>
	</xsl:template>
	<xsl:template match="title">
		<xsl:choose>
			<xsl:when test="@reported-display-style='boldface-roman'">
				<span class="sectionlevelOLCBold">
					<xsl:call-template name="DisplayTitle"/>
				</span>
			</xsl:when>
			<xsl:when test="@reported-display-style='boldface-italic'">
				<i>
					<span class="sectionlevelOLCBold">
						<xsl:call-template name="DisplayTitle"/>
					</span>
				</i>
			</xsl:when>
			<xsl:when test="@deleted-display-style='strikethrough' or
		@reported-display-style='strikethrough'">
				<strike>
					<xsl:call-template name="DisplayTitle"/>
				</strike>
			</xsl:when>
			<xsl:when test="@reported-display-style='boldface-roman'">
				<span class="sectionlevelOLCBold">
					<xsl:call-template name="DisplayTitle"/>
				</span>
			</xsl:when>
			<xsl:when test="@added-display-style='italic' or @reported-display-style='italic'">
				<i>
					<xsl:call-template name="DisplayTitle"/>
				</i>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="DisplayTitle"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="DisplayTitle">
		<xsl:variable name="billType" select="bill/@bill-type"/>
		<xsl:call-template name="createAnchor"/>
		<xsl:choose>
			<xsl:when test="($billType='olc' and /bill/descendant::*/@idref=./@id) or
		($billType='traditional' and /bill/descendant::*/@idref=./@id)">
				<xsl:call-template name="BigHeadsLinked"/>
				<xsl:choose>
					<xsl:when test="child::header">
						<xsl:apply-templates select="child::header/following-sibling::*"/>
					</xsl:when>
					<xsl:when test="child::enum">
						<xsl:apply-templates select="child::enum/following-sibling::*"/>
					</xsl:when>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="BigHeads"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="subtitle">
		<xsl:choose>
			<xsl:when test="@reported-display-style='boldface-roman'">
				<span class="sectionlevelOLCBold">
					<xsl:call-template name="displaySubtitle"/>
				</span>
			</xsl:when>
			<xsl:when test="@reported-display-style='boldface-italic'">
				<i>
					<span class="sectionlevelOLCBold">
						<xsl:call-template name="displaySubtitle"/>
					</span>
				</i>
			</xsl:when>
			<xsl:when test="@deleted-display-style='strikethrough' or
		@reported-display-style='strikethrough'
		">
				<strike>
					<xsl:call-template name="displaySubtitle"/>
				</strike>
			</xsl:when>
			<xsl:when test="@reported-display-style='boldface-roman'">
				<span class="sectionlevelOLCBold">
					<xsl:call-template name="displaySubtitle"/>
				</span>
			</xsl:when>
			<xsl:when test="@added-display-style='italic' or @reported-display-style='italic'">
				<i>
					<xsl:call-template name="displaySubtitle"/>
				</i>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="displaySubtitle"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="displaySubtitle">
		<xsl:variable name="billType" select="bill/@bill-type"/>
		<xsl:call-template name="createAnchor"/>
		<xsl:choose>
			<xsl:when test="($billType='olc' and /bill/descendant::*/@idref=./@id) or
	($billType='traditional' and /bill/descendant::*/@idref=./@id)">
				<xsl:call-template name="BigHeadsLinked"/>
				<xsl:choose>
					<xsl:when test="child::header">
						<xsl:apply-templates select="child::header/following-sibling::*"/>
					</xsl:when>
					<xsl:when test="child::enum">
						<xsl:apply-templates select="child::enum/following-sibling::*"/>
					</xsl:when>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="BigHeads"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="toc/child::*//text()">
		<xsl:variable name="billType" select="bill/@bill-type"/>
		<xsl:choose>
			<!-- house and the senate have different toc entries-->
			<xsl:when test="following::text()[1]=ancestor::quoted-block/after-quoted-block">
				<xsl:value-of select="."/>
				<xsl:text>.”</xsl:text>
				<xsl:value-of select="ancestor::quoted-block/after-quoted-block"/>
			</xsl:when>
			<xsl:when test="name(following::node()[1])='after-quoted-block' and following::node()[1]=''">
				<xsl:value-of select="."/>
				<xsl:text>.”</xsl:text>
			</xsl:when>
			<xsl:when test=".='TABLE OF CONTENTS' and $billType='traditional'">
				<xsl:value-of select="."/>
			</xsl:when>
			<xsl:when test="parent::toc-entry/parent::toc/parent::chapter">
				<xsl:choose>
					<xsl:when test="parent::toc-entry[@level='subchapter']">
						<span class="initialcapTrad">
							<xsl:text>subchapter </xsl:text>
						</span>
						<xsl:value-of select="substring-after(.,'Subchapter ')"/>
						<xsl:text>.</xsl:text>
					</xsl:when>
					<xsl:when test="parent::toc-entry[@level='section']">
						<xsl:value-of select="."/>
						<xsl:text>.</xsl:text>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="."/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="parent::toc-entry[@level='chapter']">
				<xsl:choose>
					<xsl:when test="parent::toc-entry[@level='chapter']">
						<span class="tocchapterTrad">
							<xsl:text>chapter </xsl:text>
						</span>
						<xsl:value-of select="substring-after(.,'Chapter ')"/>
						<xsl:text>.</xsl:text>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="."/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="parent::toc-entry[@level='subtitle' or @level='subchapter'
			or @level='part' or @level='subpart']">
				<xsl:value-of select="."/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="."/>
				<!--
			<xsl:text>.</xsl:text>		
			-->
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="toc/toc-entry/act-name/text()">
		<xsl:value-of select="."/>
	</xsl:template>
	<xsl:template match="text()">
		<xsl:choose>
			<xsl:when test="following::text()[1]=ancestor::quoted-block/after-quoted-block">
				<xsl:value-of select="."/>
				<xsl:if test="position() = last()">
					<xsl:choose>
						<xsl:when test="name(..)='list-item' and not(position()=last())">
							<xsl:value-of select="following::text()[1]"/>
							<xsl:text>”</xsl:text>
							<xsl:value-of select="following::text()[1]"/>
						</xsl:when>
						<xsl:when test="name(..)!='added-phrase' and name(..)!='entry' and name(..)!='act-name' and
					following::*[1]=ancestor::quoted-block/after-quoted-block and not(parent::quote)">
							<xsl:text>”</xsl:text>
							<xsl:value-of select="following::text()[1]"/>
						</xsl:when>
					</xsl:choose>
				</xsl:if>
			</xsl:when>
			<xsl:when test="name(following::node()[1])='after-quoted-block' and following::node()[1]=''">
				<xsl:value-of select="."/>
				<xsl:text>”</xsl:text>
			</xsl:when>
			<xsl:when test="parent::after-quoted-block"></xsl:when>
			<xsl:when test="parent::header/child::added-phrase or parent::header/child::deleted-phrase">
				<xsl:call-template name="displayHeader"/>
				<xsl:text>.</xsl:text>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="."/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="short-title">
		<xsl:value-of select="."/>
	</xsl:template>
	<xsl:template match="text">
		<xsl:variable name="billType" select="bill/@bill-type"/>
		<xsl:choose>
			<xsl:when test="./@display-inline='yes-display-inline'">
				<xsl:apply-templates />
			</xsl:when>
			<xsl:when test="parent::section/@display-inline='yes-display-inline'">
				<xsl:if test="parent::section/ancestor::quoted-block">
					<xsl:text>“</xsl:text>
				</xsl:if>
				<xsl:apply-templates />
			</xsl:when>
			<xsl:when test="parent::section/@display-inline='no-display-inline' and $billType='traditional' ">
				<span class="indent">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:apply-templates />
				</span>
			</xsl:when>
			<xsl:when test="parent::section/@display-inline='no-display-inline' and
		not(following-sibling::quoted-block[@display-inline='yes-display-inline']) ">
				<p align="justify" class="indent">
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:apply-templates />
				</p>
			</xsl:when>
			<xsl:when test="parent::enum-in-header">
				<xsl:value-of select="."/>
			</xsl:when>
			<xsl:otherwise>
				<p align="justify" >
					<xsl:if test="ancestor::quoted-block">
						<xsl:text>“</xsl:text>
					</xsl:if>
					<xsl:apply-templates />
				</p>
			</xsl:otherwise>
		</xsl:choose>
		<xsl:if test="following-sibling::table">
			<br/>
		</xsl:if>
	</xsl:template>
	<xsl:template match="subsection">
		<xsl:choose>
			<xsl:when test="@reported-display-style='boldface-roman'">
				<span class="sectionlevelOLCBold">
					<xsl:call-template name="displaySubsection"/>
				</span>
			</xsl:when>
			<xsl:when test="@reported-display-style='boldface-italic'">
				<i>
					<span class="sectionlevelOLCBold">
						<xsl:call-template name="displaySubsection"/>
					</span>
				</i>
			</xsl:when>
			<xsl:when test="@changed='added'">
				<i>
					<xsl:call-template name="displaySubsection"/>
				</i>
			</xsl:when>
			<xsl:when test="@deleted-display-style='strikethrough' or
		@reported-display-style='strikethrough'
		">
				<strike>
					<xsl:call-template name="displaySubsection"/>
				</strike>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="displaySubsection"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="displaySubs