Trying to fix XSL file

wxdqz

New Member
Here are my files:

XML (A problem area highlighted in red.):
<?xml version="1.0" encoding="iso-8859-1" ?>
<?xml-stylesheet type="text/xsl" href=http://www.webdeveloper.com/forum/archive/index.php/"./characters.xsl"?>
<!DOCTYPE characters SYSTEM "C:\mRPG\Characters\rpchars.dtd">
<characters>
<char>
<name>Dreysanius von Acrutar</name>
<stats>
<height>7'0"</height>
<weight>410 lbs</weight>
<age>21</age>
<gender>Male</gender>
<species>Polar Bear</species>
</stats>
<relationships>
<family>
<parent rel="Mother" status="Deceased">Vanessa Acrutar</parent>
<parent rel="Father" status="Deceased">James Acrutar</parent>
<parent rel="Father-In-Law" status="Living">Josef Alreya</parent>
<SO rel="Wife">Kathleen Alreya</SO>
</family>
<others>
<friend rel="Business Mentor">Alkan D'harsis</friend>
</others>
</relationships>
<description>
<history>
<pgrph>Dreysanius was born to very wealthy but distant parents. Left on his own, Dreysanius got into body building, backyard wrestling, then pro wrestling at age 18. When his estranged parents died, he inherited their fortune, worth millions.</pgrph>
<pgrph>However, he wasn't wrestling for more than a few months when he was struck by a car while riding his motorcycle. He survived, but his spinal cord was severed.</pgrph>
<pgrph>Dreysanius was devestated. He fell into a depression, and began spending his fortune on cheap booze. Then he got a call from a man named Josef Alreya, who ordered him to attend his gym. With nothing better to do, Dreysanius went.</pgrph>
<pgrph>To his surprise, he discovered that the gym had put together a regimen for him that took his disability into account. While he exercised as a powerlifter, he began to take pride in his strength. Strangely, however, he never met Josef.</pgrph>
<pgrph>Finally, after two months, he and Josef met. It was then he discovered that Josef, too, was parapelegic. The older bear forced Drey into a game of Jawbreaker, where they took turns punching each other in the face until one was knocked over, knocked out, or forced to give up. Drey realized he still had a fighting spirit, and attacked life with renewed vigor.</pgrph>
<pgrph>His attempt to bring his former backyard fed (The Wild Side Wrestling Federation) into the professional world was a complete disaster. The show was poorly organized, the ring was faulty, and the crowd could be counted on one paw. Luckily, one of the spectators was a rhino named Alkan D'harsis.</pgrph>
<pgrph>Alkan was a long-time veteran of the wrestling world, who wanted a) a challenged, and b) a place where he could make his mark once and for all. Seeing that his work was cut out for him here, he offered Dreysanius training in the business of wrestling, and to take the WSWF to heights never before seen.</pgrph>
<pgrph>Dreysanius agreed, and is now learning how to run a wrestling promotion. Josef has found a permanent job as a physical trainer, Alkan has a secure place at the top of the pile, and Dreysanius' promotion is now more than he had ever dreamed.</pgrph>
<pgrph>While he wishes that he could still wrestle, Drey knows that life is good for him.</pgrph>
</history>
<physical>
<pgrph>Dreysanius still bears the scars of his professional wrestling days, although he has not wrestled since he was 18. He is very heavyset. His legs are withered, but his arms are powerfully muscled. Dreysanius can bench press more than 2,000 lbs.</pgrph>
</physical>
<personality>
<pgrph>While Dreysanius sometimes suffers from bouts of depression stemming from his disability, he is happy where he is. He enjoys being The Evil Boss on camera (and is widely regarded as a ham), he truly cares about his wrestlers, many of whom are close friends.</pgrph>
<likes>
<item>Wrestling</item>
<item>Weight Lifting</item>
<item>Eating</item>
<item>Drinking</item>
<item>Action Movies</item>
<item>Being a bastard on-camera</item>
<item>Stupid hate mail (reads it for laughs</item>
</likes>
<dislike>
<item>Wrestlers who have an ego</item>
<item>A bad show</item>
<item>Political Correctness</item>
<item>Being pitied</item>
</dislike>
<quotes>
<item>"Oh, those wrestlers are gonna hate me!"</item>
<item>"I've got your [insert politically correct term] RIGHT HERE!"</item>
<item>"Didn't think a cripple could hit that hard, now could you?</item>
<item>"Admit it, you pack of worms: You all love me."</item>
</quotes>
</personality>
</description>
</char>
</characters>

This is my XSL, with the problem area highlighted in red.

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/characters">
<html>
<head>
<title>Roleplaying Characters</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link type="text/css" rel="stylesheet" href=http://www.webdeveloper.com/forum/archive/index.php/"./characters.css" />
</head>
<body>
<h1>Characters</h1>
<xsl:for-each select="char">
<h2><xsl:value-of select="name" /></h2>
<table>
<caption>Statistics</caption>
<tr><th>Height:</th><td><xsl:value-of select="stats/height" /></td></tr>
<tr><th>Weight:</th><td><xsl:value-of select="stats/weight" /></td></tr>
<tr><th>Age:</th><td><xsl:value-of select="stats/age" /></td></tr>
<tr><th>Gender:</th><td><xsl:value-of select="stats/gender" /></td></tr>
<tr><th>Species:</th><td><xsl:value-of select="stats/species" /></td></tr>
</table>
<table>
<caption>Family</caption>
<xsl:for-each select="relationships/family/parent">
<tr><th><xsl:value-of select="@rel" />:</th><td><xsl:value-of select="/characters/char/relationships/family/parent" /> (<xsl:value-of select="@status" />)</td></tr>
</xsl:for-each>
</table>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>




This is the problem: The output of the problem area is:

Mother: Vanessa Acrutar (Deceased)
Father: Vanessa Acrutar (Deceased)
Father-In-Law: Vanessa Acrutar (Living)

Where am I going wrong?
 
Back
Top