D
duzy
Hi!
I do not understand why it generates only tables with colors according to
css, and do not display any text or image.
plik catalog.xsl
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslutput method="html" />
<xsl:template match="/">
<html>
<head>
<title>catalog.xsl</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table align="center" class="episodb">
<tr>
<td>
<img>
<xsl:attribute name="src">
img/ <xsl:value-of select="/root/titleimg" />
</xsl:attribute>
</img>
</td>
</tr>
</table>
<br />
<xsl:for-each select="/root/brief/wers">
<table align="center" width="800" class="episodb">
<tr>
<td>
<xsl:value-of select="." />
</td>
</tr>
</table>
<br /> <br />
</xsl:for-each>
<table align="center" class="episodb">
<tr>
<td>
<img width="400">
<xsl:attribute name="src">
img/<xsl:value-of select="/root/foto/@name" />.gif
</xsl:attribute>
</img>
</td>
</tr>
</table>
<br /><br />
<table align="center" class="episodb">
<tr>
<td>
<xsl:value-of select="/root/foto" />
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
plik xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
<root xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com catalog.xsd">
<titleimg>title.jpg</titleimg>
<brief>
<wers>
Two University of Colorado film students named Matt Stone and
Trey Parker made a short cartoon called "Jesus vs Frosty" (also known as The
ORIGINAL Spirit of Christmas) in which some kids make a snowman that comes
to life and starts killing everyone. Eventually Jesus comes along and chops
off Frosty's head by throwing his halo at him.
</wers><wers>
Executives from the American Fox Network somehow caught sight of
this cartoon and commissioned Matt and Trey to make another short to be sent
out to celebrities as a Christmas card, this was the called "The Spirit of
Christmas" The film was an instant hit. Everyone wanted to see it. Rumor has
it that George Clooney made 300 copies of the video to give to his friends.
</wers><wers>
Eventually the video made it to the Internet where everyone got
to see it. It was then inevitable that the cartoon would be made into a TV
Series, and Comedy Central who had previously shown King of the Hill
commissioned Matt and Trey to produce a series. The rest is history....
</wers>
</brief>
<foto name="busstop">Somethink about main haracters (from the left in
foto)</foto>
</root>
I do not understand why it generates only tables with colors according to
css, and do not display any text or image.
plik catalog.xsl
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslutput method="html" />
<xsl:template match="/">
<html>
<head>
<title>catalog.xsl</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table align="center" class="episodb">
<tr>
<td>
<img>
<xsl:attribute name="src">
img/ <xsl:value-of select="/root/titleimg" />
</xsl:attribute>
</img>
</td>
</tr>
</table>
<br />
<xsl:for-each select="/root/brief/wers">
<table align="center" width="800" class="episodb">
<tr>
<td>
<xsl:value-of select="." />
</td>
</tr>
</table>
<br /> <br />
</xsl:for-each>
<table align="center" class="episodb">
<tr>
<td>
<img width="400">
<xsl:attribute name="src">
img/<xsl:value-of select="/root/foto/@name" />.gif
</xsl:attribute>
</img>
</td>
</tr>
</table>
<br /><br />
<table align="center" class="episodb">
<tr>
<td>
<xsl:value-of select="/root/foto" />
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
plik xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
<root xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com catalog.xsd">
<titleimg>title.jpg</titleimg>
<brief>
<wers>
Two University of Colorado film students named Matt Stone and
Trey Parker made a short cartoon called "Jesus vs Frosty" (also known as The
ORIGINAL Spirit of Christmas) in which some kids make a snowman that comes
to life and starts killing everyone. Eventually Jesus comes along and chops
off Frosty's head by throwing his halo at him.
</wers><wers>
Executives from the American Fox Network somehow caught sight of
this cartoon and commissioned Matt and Trey to make another short to be sent
out to celebrities as a Christmas card, this was the called "The Spirit of
Christmas" The film was an instant hit. Everyone wanted to see it. Rumor has
it that George Clooney made 300 copies of the video to give to his friends.
</wers><wers>
Eventually the video made it to the Internet where everyone got
to see it. It was then inevitable that the cartoon would be made into a TV
Series, and Comedy Central who had previously shown King of the Hill
commissioned Matt and Trey to produce a series. The rest is history....
</wers>
</brief>
<foto name="busstop">Somethink about main haracters (from the left in
foto)</foto>
</root>