Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5953329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:48:36+00:00 2026-05-22T17:48:36+00:00

I’m a beginner at XSL FO. I have a very simple XML document :

  • 0

I’m a beginner at XSL FO.
I have a very simple XML document :

<?xml version= "1.0" ?>
<test>
TEST
</test>

I would like to print the content between the tag <test>

I wrote the following XLS FO document to be processed by FOP.

<fo:root xmlns:yt="http://www.yseop.com/text/2" 
xmlns:y="http://www.yseop.com/engine/3" 
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


   <fo:layout-master-set>
      <fo:simple-page-master master-name="rapport">
         <fo:region-body margin-top="0.75in" margin-left="0.75in" margin-right="0.75in" margin-bottom="0.75in"/>
         <fo:region-after extent="0.25in"/>
         <fo:region-start/>
      </fo:simple-page-master>
   </fo:layout-master-set>

   <fo:page-sequence master-reference="rapport">

       <fo:flow flow-name="xsl-region-body">
            <fo:block>
            XXX
                <xsl:apply-templates select="document('D:\XXX-conseilVente\xmlBatch\input_test1.xml')/test"/>
            </fo:block>
      </fo:flow>
   </fo:page-sequence>



</fo:root>

I get the following warning :

      [fop] 25 mai 2011 12:05:10 org.apache.fop.events.LoggingEventListener processEvent
      [fop] ATTENTION: Unknown formatting object "{http://www.w3.org/1999/XSL/Transform}apply-templates" encountered (a child of fo:block}. (See position 22:99)

and there is nothing on my output pdf.

I guess I am not using the right function to parse the document with xsl-t

Can you tell me what function to use?

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:48:36+00:00Added an answer on May 22, 2026 at 5:48 pm

    XSLT and XSL-FO are two separate languages. Basically, it works the other way round, than what you do at the moment: The FO is embedded in an XSLT stylesheet, which is then used to process the original XML to create an XSL-FO document (without any XSLT). That is thrown at the XSL-FO processor to create, e.g., PDF.

        XSLT     processing
         |           |
    XML ---> XSL-FO ---> PDF
    

    So you start with a XSLT stylesheet like this (no namespaces and such, just to give you an idea):

    <xslt:stylesheet>
    
      <xslt:template match="/">
        <fo:root>
          <!-- fo head -->
          <fo:page-sequence>
            <fo:flow>
              <xslt:apply-templates /> <!-- process the rest of the doc-->
            </fo:flow>
          </fo:page-sequence>
        </fo:root>
      </xslt:template>
    
      <xslt:template match="test">
        <fo:block>
          <xslt:value-of select="." />
        </fo:block>
      </xslt:template>
    
    </xslt:stylesheet>
    

    You can find many questions ansered at Dave Pawson’s XSL FAQ.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.