Example: XSLReportProcessor sample XSL file

Note: Read the Code example disclaimer for important legal information.
<?xml version="1.0"?>

<!-- Sample of styling an imagined real estate document. -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       xmlns:fo="http://www.w3.org/1999/XSL/Format" >
         
  <xsl:template match="RESIDENTIAL-LISTINGS">
    <fo:root>
    <fo:layout-master-set> 
	<fo:simple-page-master master-name="theMaster"> 
         <fo:region-body region-name="theRegion"/>  
	</fo:simple-page-master> 
 	<fo:page-sequence-master master-name="theMaster"> 
	   <fo:single-page-master-reference master-name="thePage" /> 
      </fo:page-sequence-master>
	</fo:layout-master-set> 
	 <fo:page-sequence master-name="theMaster"> 
	 <fo:flow flow-name="theRegion"> 
           <xsl:apply-templates/>
	</fo:flow> 
	</fo:page-sequence> 
    </fo:root>
  </xsl:template>
  <xsl:template match="RESIDENTIAL-LISTING">
        
      
      <fo:block font-family="Times New Roman" font-weight="normal" font-size="24pt" 
       background-color="silver" padding-before="5px" padding-after="5px" 
       padding-start="5px" padding-end="5px" border-before-style="solid"
       border-before-color="blue" border-after-style="solid" border-after-color="blue" 
       border-start-style="solid" border-start-color="blue" border-end-style="solid" 
       border-end-color="blue"> 
	
	<fo:character character="y" background-color="blue" border-before-style="solid"
       border-before-color="yellow" border-after-style="solid" border-after-color="yellow"
       border-start-style="solid" border-start-color="yellow" border-end-style="solid" 
       border-end-color="yellow" /> 
	</fo:block> 


  </xsl:template>
</xsl:stylesheet>