This is my first php program!


Transforming XML with XSLT



Download 6,9 Mb.
Pdf ko'rish
bet67/69
Sana26.02.2022
Hajmi6,9 Mb.
#471647
1   ...   61   62   63   64   65   66   67   68   69
Bog'liq
PHP

Transforming XML with XSLT
|
277
Transforming XML with XSLT
Extensible Stylesheet Language Transformations (XSLT) is a language for transform-
ing XML documents into different XML, HTML, or any other format. For example,
many web sites offer several formats of their content—HTML, printable HTML, and
WML (Wireless Markup Language) are common. The easiest way to present these
multiple views of the same information is to maintain one form of the content in
XML and use XSLT to produce the HTML, printable HTML, and WML.
PHP’s XSLTextension uses the Sablotron C library to provide XSLTsupport.
Sablotron does not ship with PHP—you’ll need to download it from
http://www.gin-
gerall.com
, install it, and then rebuild PHP with the
--enable-xslt --with-xslt-
sablot
option to
configure
.
PHP’s XSLTsupport is still experimental at the time of writing, and the exact imple-
mentation details may change from what is described here. However, this description
$authors);
echo "\n";
}
}
function show_book ($isbn) {
foreach ($this->records as $book) {
if ($book['isbn'] !== $isbn) {
continue;
}
$authors = join(', ', $book['author']);
printf("%s by %s.
", $book['title'], $authors);
printf("ISBN: %s
", $book['isbn']);
printf("Comment: %s
\n", $book['comment']);
}
?>
Back to the ">list of books.
}
}; // main program code
$my_library = new BookList ("books.xml");
if ($_GET['isbn']) {
// return info on one book
$my_library->show_book($_GET['isbn']);
} else {
// show menu of books
$my_library->show_menu( );
}
?>


echo "Executing code...";
eval(stripslashes($code)); // BAD!
} ?>




// do something with the supplied values
?>
Thank you for filling out the form,
.
else { ?>
Please enter the
following information:






Name:



Please enter the following
information:






Name:


Thank you for filling out the form,
{NAME}.
function handle_errors ($error, $message, $filename, $line) {
ob_end_clean( );
echo "$message in line $line of $filename
element, we register the error handler and
begin output buffering. If we cannot connect to the database (or if anything else goes
wrong in the subsequent PHP code), the heading and table are not displayed.
Instead, the user sees only the error message, as shown in Figure 13-1. If no errors
are raised by the PHP code, however, the user simply sees the HTML page.

Download 6,9 Mb.

Do'stlaringiz bilan baham:
1   ...   61   62   63   64   65   66   67   68   69




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish