Guest_imported
New member
- Jan 1, 1970
- 0
Hello, I shall make it short. My XML-document (local language):
<?xml version="1.0" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="stylesheet2.xsl"?>
<site>
<titel kleur="blue">Sander's Homepage</titel>
<tekst soort="arial">Welkom op mijn homepage!!!</tekst>
</site>
My XSL-stylesheet (stylesheet2.xsl):
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="site">
<HTML>
<HEAD>
<TITLE>
<xsl:value-of select="//titel"/>
</TITLE>
</HEAD>
<BODY>
<xsl:apply-templates />
</BODY>
</HTML>
</xsl:template>
<xsl:template match="titel">
<h1 align="center">
<font>
<xsl:attribute name="color">
<xsl:value-of select="@kleur"/>
</xsl:attribute>
<xsl:value-of select="//titel"/>
</font>
</h1>
</xsl:template>
<xsl:template match="tekst">
<font>
<xsl:attribute name="face">
<xsl:value-of select="@soort"/>
</xsl:attribute>
<xsl:value-of select="//tekst"/>
</font>
</xsl:template>
</xsl:stylesheet>
Problem: When i type green in XML by "kleur", I get a blue color in my browser. And when I type red, I get black. It is the same thing with #FF0000 and #00FF00 etc.
Second problem: When I type Arial in XML by "soort", I don't get any Arial font. It is the same thing with other fonts.
Question: What's wrong? Is it the browser (IE 5.0) or is it my XSL-file.
Thnx
<?xml version="1.0" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="stylesheet2.xsl"?>
<site>
<titel kleur="blue">Sander's Homepage</titel>
<tekst soort="arial">Welkom op mijn homepage!!!</tekst>
</site>
My XSL-stylesheet (stylesheet2.xsl):
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="site">
<HTML>
<HEAD>
<TITLE>
<xsl:value-of select="//titel"/>
</TITLE>
</HEAD>
<BODY>
<xsl:apply-templates />
</BODY>
</HTML>
</xsl:template>
<xsl:template match="titel">
<h1 align="center">
<font>
<xsl:attribute name="color">
<xsl:value-of select="@kleur"/>
</xsl:attribute>
<xsl:value-of select="//titel"/>
</font>
</h1>
</xsl:template>
<xsl:template match="tekst">
<font>
<xsl:attribute name="face">
<xsl:value-of select="@soort"/>
</xsl:attribute>
<xsl:value-of select="//tekst"/>
</font>
</xsl:template>
</xsl:stylesheet>
Problem: When i type green in XML by "kleur", I get a blue color in my browser. And when I type red, I get black. It is the same thing with #FF0000 and #00FF00 etc.
Second problem: When I type Arial in XML by "soort", I don't get any Arial font. It is the same thing with other fonts.
Question: What's wrong? Is it the browser (IE 5.0) or is it my XSL-file.
Thnx