Using xsl Stylesheet - html view
Posted: Fri Nov 14, 2003 1:44 pm
Hi @ all,
I still have a big problem. I want to use a stylesheet to view my xml in html. My xsl looks like that:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title> My Database </title>
</head>
<body>
<h2>
<xsl:value-of select="database/Patient/Name"/>
</h2>
<h1> My Database </h1>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
The following line is not working:
<xsl:value-of select="database/Patient/Name"/>
The html-doc does not show the "name", why?!?
My xsd looks like that:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:element name="database">
<xs:complexType>
<xs:sequence>
<xs:element name="Patient">
<xs:complexType>
<xs:sequence>
<xs:element name="Name">
<xs:simpleType>
...
Do you have an indea?
Thank you very much for help!
Marc
I still have a big problem. I want to use a stylesheet to view my xml in html. My xsl looks like that:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title> My Database </title>
</head>
<body>
<h2>
<xsl:value-of select="database/Patient/Name"/>
</h2>
<h1> My Database </h1>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
The following line is not working:
<xsl:value-of select="database/Patient/Name"/>
The html-doc does not show the "name", why?!?
My xsd looks like that:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:element name="database">
<xs:complexType>
<xs:sequence>
<xs:element name="Patient">
<xs:complexType>
<xs:sequence>
<xs:element name="Name">
<xs:simpleType>
...
Do you have an indea?
Thank you very much for help!
Marc