Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: errors in printing latex template output

by veerubiji (Sexton)
on Oct 24, 2011 at 08:35 UTC ( #933312=note: print w/ replies, xml ) Need Help??


in reply to Re: errors in printing latex template output
in thread errors in printing latex template output

hi, I tried as you Said like this

open($file, 'formal.xml'); { local $/; my $xml= <$file>; }
it given two errors like $xml and $file requires explicit package and I cleared those errors like this
my $file; my $xml; open($file, 'formal.xml'); { local $/; $xml= <$file>; }
but it doesn't produce any output its just blank pdf with author name. I tried using data dumper to print $xml_hash. but it doesn't contain any student word it number and regarding information in hash.then I think how it will recognize student. and also I tried to print address elements as you said
[%st.address.house_number%]
its also not working. its also printing as before I posted.


Comment on Re^2: errors in printing latex template output
Select or Download Code
Re^3: errors in printing latex template output
by jethro (Monsignor) on Oct 24, 2011 at 09:17 UTC

    Sorry, my fault. The "my" in "my $xml= <$file>;" is wrong and should be removed. Your correction should work as well. Did you notice that you use "DTC_Specification_transformed.xml" as filename instead of "formal.xml" in your corrected script?

    Use data::dumper to print out $xml as well just before converting it with xml2hash. If it contains the file contents then at least up to that point the script is working

      yes I corrected it, If I print $xml before converting to xml2hash using data::dumper it printing my original file as it is.But my output is blank pdf with authors name.

        Step by step. What is in the $xml_hash? And what is in the file output.tex?

        * If $xml_hash is empty that means that XML::Fast somehow can't cope with the data you are providing. Check for differences of your input data to your first script with the inline XML

        * If $xml_hash seems sensible and output.tex is empty then the template doesn't fit the data

        * if output.tex seems correct and the pdf is empty than pdflatex has a problem. Call pdflatex by hand and check the error messages

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://933312]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2015-07-05 14:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls