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

  • SEARCH
  • Home
  • 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 6978333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:44:30+00:00 2026-05-27T17:44:30+00:00

I have a problem with printing PDF file from a Java project that is

  • 0

I have a problem with printing PDF file from a Java project that is adding parameters in the XLS file. The project read the XML file, then he is generate a PDF file from the XSL style sheet. See below for the content of the files.
As you see in the XLS file I want to specified at “studentNumber”, but the problem is that is specified “studentNumber” need to set in the Java project. I have tried a lot of thing and search on internet but I cannot find the answer.
Any idea want I need to change to make this project proper.

XML file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="studentResultXLS.xsl"?>
<cursus>
    <enroll>
        <studentnumber>s484766</studentnumber>
        <cursuscode>ISDTCEX.B627</cursuscode>
        <enrolldate dateformat="eejjmmdd">20111121</enrolldate>
        <acquire>ja</acquire>
        <grade>4</grade>
        <result></result>
    </enroll>
    <enroll>
        <studentnumber>s484766</studentnumber>
        <cursuscode>ISDTSIP.T470</cursuscode>
        <enrolldate dateformat="eejjmmdd">20111116</enrolldate>
        <acquire>ja</acquire><grade>2</grade>
        <result></result>
    </enroll>
    <enroll>
        <studentnumber>s484767</studentnumber>
        <cursuscode>ISDTSIP.T470</cursuscode>
        <enrolldate dateformat="eejjmmdd">20111116</enrolldate>
        <acquire>ja</acquire><grade>2</grade>
        <result></result>
    </enroll>

</cursus>

XLS file:

<xsl:param name="studentnumber"/>.....

<fo:table-body>
    <xsl:for-each select="/cursus/enroll[studentnumber='s484766']">
        <fo:table-row>

            <fo:table-cell>
                <fo:block> <xsl:value-of select="studentnumber"/> </fo:block>
            </fo:table-cell>

                <fo:table-cell>
                    <fo:block> <xsl:value-of select="cursuscode"/> </fo:block>
                </fo:table-cell>
            </fo:table-row>
    </xsl:for-each>
    </fo:table-body>

Java code:

 transformer.setParameter("studentnumber", "s484766");
  • 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-27T17:44:31+00:00Added an answer on May 27, 2026 at 5:44 pm

    For reading the parameter value, you need to prefix it with a $ sign:

    <xsl:value-of select="$studentnumber"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have client which has a problem with printing from JAVA applications, using old
I have a vb.net MVC3 Razor app that generates PDF files. The problem is
I have a problem that I am facing OuOfMemory Error while printing a string
Problem: Printing from within BIDS 2008 R2 Preview tab hangs and must have the
I have problem in some JavaScript that I am writing where the Switch statement
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
I have problem with fancybox. I want to write a function that will run
I have problem with variable printing inside javascript. variable htmlString printing not working: document.write(htmlString)
I have no problem printing an Express shipping label. The ground shipping label doesn't
I want to print using php_printer.dll. I have no problem printing a simple text

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.