|
XSL by Example: Creating and Populating an HTML Template Pdf ko'rish
| bet | 130/131 | Sana | 14.05.2024 | Hajmi | 2,96 Mb. | | #232039 |
Bog'liq Ceponkus, Hoodbhoy - Applied XML - Toolkit for ProgrammersXSL by Example: Creating and Populating an HTML Template
Enough of theory! Let’s get our hands dirty and create our first XML to HTML conversion
stylesheet. We begin with the following data set, which we use for most of our examples
in this chapter:
->
Yin Yang
4
2
$6
Great food, but better to order take out
than to eat in.
Little Italy
3
4
$8
Romantic setting, great place to go with a
date.
- 253 -
Lee Tang
4
5
$9
Excellent food and a wonderful decor. Great place
for a business lunch.
Pirate's Lair
2
1
$7
Bad food and even worse decor. Never go
here unless you want an upset stomach.
Howie's Pizzeria
3
4
$7
Great place to get together with friends. They
also sport the hottest wings in town.
For now, imagine that we want to display our restaurant’s review data set as an HTML
page. In this case, the data is obviously repetitive and lends itself to a template-driven
model approach. While we are getting ahead of ourselves, let’s take a look at what the
corresponding XSL stylesheet would look like.
|
| |