Dear All

Could I use two different xml files as an input source in fop. I can't
combine xml files because they will be produced differently and I need to
transfer them into one pdf document. 

 I  put two xml files in the fop command line, but I got errors in "unknown
location".
Here is my code if it would help to understand what I am doing.

First xml file:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="Test2xml.xsl" type="text/xsl"?>
    <report1>
        <part0>
              <title01>ANNUAL REPORT OF FACULTY</title01>
              <title02>LOAD, ACTIVITIES, ACHIEVEMENTS, AND PLANS</title02>      
       
        </part0>
         <activityreport>
           <name>Aleksandr Puskin</name>
           <rank>As/Prof</rank>
           <department>Mathemetics</department>
           <appointment>AN</appointment>
         </activityreport>
    </report1>

Second xml file:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="Test2xml.xsl" type="text/xsl"?>    
   <report2>
        <summary1>8</summary1>
        <summary2>10</summary2>
  </report>

xsl file:Test2xml.xsl

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:fo="http://www.w3.org/1999/XSL/Format";>
 
 <xsl:template match="/"> <!-- Defines the whole document--> 
 <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
 
   <fo:layout-master-set>
        <fo:simple-page-master master-name="firstPage"
                   page-height="27.8cm" 
                   page-width="21.5cm"
                   margin-bottom="0.5cm"
                   margin-top="1.5cm"
                   margin-left="2cm"
                   margin-right="2cm" >                   
                   <fo:region-body margin-bottom="0.5cm"/>
                   <fo:region-after extent="1cm"/>          
        </fo:simple-page-master>  
        
         <fo:simple-page-master master-name="summaryPage"
                    page-height="21.5cm"
                    page-width="27.8cm"
                    margin-bottom="0.5cm"
                    margin-top="1.5cm"
                    margin-left="2cm"
                    margin-right="2cm" > 
                   <fo:region-body margin-bottom="0.5cm"/>
                   <fo:region-after extent="1cm"/>           
       </fo:simple-page-master>
  </fo:layout-master-set>
 
       <fo:page-sequence master-reference="firstPage">      
          <fo:flow flow-name="xsl-region-body"> 
            <xsl:apply-templates select="report1"/>               
        </fo:flow>
   </fo:page-sequence>

  <fo:page-sequence master-reference="summaryPage">          
         <fo:flow flow-name="xsl-region-body">
            <xsl:apply-templates select="report2"/>
         </fo:flow>
  </fo:page-sequence> 

  </fo:root> 
 </xsl:template>

<xsl:template match="report1/part0">
       
       <fo:block>
        <xsl:apply-templates select="title01"/>        
       </fo:block> 
          <fo:block>
            <xsl:apply-templates select="title02"/>              
           </fo:block>                   
 </xsl:template> 

<xsl:template match="report2">
       
       <fo:block>
        <xsl:apply-templates select="summary1"/>        
       </fo:block> 
          <fo:block>
            <xsl:apply-templates select="summary2"/>              
           </fo:block>                   
 </xsl:template>               
 

<xsl:template match="title01">       
      <fo:block  font-size="10pt"
                 font-family="arial"                                  
                 text-align="center" >
                <xsl:value-of select="."/>
        </fo:block> 
 </xsl:template>

<xsl:template match="title02">       
      <fo:block  font-size="10pt"
                 font-family="arial"                                  
                 text-align="center"
                 space-after="0.6cm" >
                <xsl:value-of select="."/>
        </fo:block> 
 </xsl:template>

<xsl:template match="summary1">       
      <fo:block  font-size="10pt"
                 font-family="arial"                                  
                 text-align="center" >
                <xsl:value-of select="."/>
        </fo:block> 
 </xsl:template>

<xsl:template match="summary2">       
      <fo:block  font-size="10pt"
                 font-family="arial"                                  
                 text-align="center"
                 space-after="0.6cm" >
                <xsl:value-of select="."/>
        </fo:block> 
 </xsl:template>
</xsl:stylesheet>

Thank you.
Tatiyana.
-- 
View this message in context: 
http://www.nabble.com/Transforming-data-from-two-xml-files.-tp15051348p15051348.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to