08-19-2008
The standards-based way of doing it would be to use XSL Formatting Objects (XSL FO) One free tool to look at is the Apache FOP tool. But, be warned, there is a steep learning curve to XSL FO.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Is there any way to append pdf files in UNIX? I have a apllication which creates pdf files. Now i want to append them so that it gives me one pdf file. Is this possible? (2 Replies)
Discussion started by: cp7800
2 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I'd like to view ps and pds file under Unix(Xwindow)
who could tell me the which software/command can work?
Thanks!
Vicky (2 Replies)
Discussion started by: vicky20000
2 Replies
3. UNIX for Dummies Questions & Answers
Is there an easy way to print to a pdf file in Unix? Now I'm using lpr command to print to a network printer , but I need to have a pdf version of the file as well! Can someone help me?
-Rune (2 Replies)
Discussion started by: runeho
2 Replies
4. Shell Programming and Scripting
I use sar reports for getting the statistic. It is better for me to get these reports converted to xml. I use some scripts to convert them but it takes a long time. Do you know any public scripts to convert sar report to xml in 1 -2 kicks. (0 Replies)
Discussion started by: gogogo
0 Replies
5. Solaris
Looking for a Unix command / tool that would convert PCL files into PDF files.
I've searched the forum and the web and can't find any.
Is it even possible?
Cheers. (1 Reply)
Discussion started by: KenLynch
1 Replies
6. Shell Programming and Scripting
Hi Experts,
I have a requirement where i need to setup a batch job which runs everymonth and move the pdf files from unix server to windows servers.
Could some body provide the inputs for this.
and also please provide the inputs on how to map the network dirve in the unix like that... (1 Reply)
Discussion started by: ger199901
1 Replies
7. Shell Programming and Scripting
Hi!
I need to realize this task.
In folder i have such files:
name1.txt
name1.pdf
name2.txt
name2.pdf
etc...
I want to scan this folder, match files with same name (name1.txt with name1.pdf, name2.txt with name2.pdf) and create files name1.xml and name2.xml, based on it. i.e:
i want... (13 Replies)
Discussion started by: optik77
13 Replies
8. UNIX for Dummies Questions & Answers
on a PROGRESS environment, i create an invoice which at printing it must generate both the .dat for the invoice that was sent to the printer and the .dat for the PDF version. we have never printed PDF files in our lp printer until recently. i've done a bit of googling and it comes down to that i... (2 Replies)
Discussion started by: pdf2ps
2 Replies
9. Post Here to Contact Site Administrators and Moderators
Hi,
Can anyone tell me the best text to pdf converter? I need to convert several text files to pdf. :)I'm looking to evaluate any products before I purchase.
thanks,
Linda (1 Reply)
Discussion started by: lnemitz
1 Replies
10. HP-UX
Hi,
Can anyone tell me the best converter I can use to convert text to pdf for HP/UX 11.31?
Thanks,
Linda (0 Replies)
Discussion started by: lnemitz
0 Replies
LEARN ABOUT PHP
xslt_set_error_handler
XSLT_SET_ERROR_HANDLER(3) 1 XSLT_SET_ERROR_HANDLER(3)
xslt_set_error_handler - Set an error handler for aXSLTprocessor
SYNOPSIS
void xslt_set_error_handler (resource $xh, mixed $handler)
DESCRIPTION
Set an error handler function for the XSLT processor given by $xh, this function will be called whenever an error occurs in the XSLT
transformation (this function is also called for notices).
PARAMETERS
o $
xh -The XSLT processor link identifier, created with xslt_create(3).
o $handler
- The user function needs to accept four parameters: the XSLT processor, the error level, the error code and an array of messages.
The function can be shown as:
error_handler (resource $xh, int $error_level, int $error_code, array $messages)
RETURN VALUES
No value is returned.
EXAMPLES
Example #1
xslt_set_error_handler(3) Example
<?php
// Our XSLT error handler
function xslt_error_handler($handler, $errno, $level, $info)
{
// for now, let's just see the arguments
var_dump(func_get_args());
}
// XML content :
$xml='<?xml version="1.0"?>
<para>
oops, I misspelled the closing tag
</pata>';
// XSL content :
$xsl='<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<strong><xsl:value-of select="para"/></strong>
</xsl:template>
</xsl:stylesheet>';
$xh = xslt_create();
xslt_set_error_handler($xh, "xslt_error_handler");
echo xslt_process($xh, 'arg:/_xml', 'arg:/_xsl',
NULL, array("/_xml" => $xml, "/_xsl" => $xsl));
?>
The above example will output something similar to:
array(4) {
[0]=>
resource(1) of type (XSLT Processor)
[1]=>
int(3)
[2]=>
int(0)
[3]=>
array(6) {
["msgtype"]=>
string(5) "error"
["code"]=>
string(1) "2"
["module"]=>
string(9) "Sablotron"
["URI"]=>
string(9) "arg:/_xml"
["line"]=>
string(1) "4"
["msg"]=>
string(34) "XML parser error 7: mismatched tag"
}
}
SEE ALSO
xslt_set_object(3) if you want to use an object method as handler.
PHP Documentation Group XSLT_SET_ERROR_HANDLER(3)