You are here: Re: How to create custom XHTML tag? « HTML « IT news, forums, messages
Re: How to create custom XHTML tag?

Posted by janecki on 11/25/54 11:47

I've done almost it. Check this out in web browser:

file: index.xml

<?xml version="1.0" encoding="ISO-8859-2"?>
<?xml-stylesheet type="text/xsl" href="tereska.xsl"?>

<doc>
<window title="Cool!">working working working </window><br/>
<window title="Cool!">working working working </window><br/>
<window title="Cool!">working working working </window><br/>
</doc>


file: tereska.xsl

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<xsl:template match="doc">
<html><head><title>janecki@onet.pl</title>

<style>
..title { font-size: 16px;
color: white;
font-family: "Trebuchet MS";
font-weight: bold;
}
..message { font-size: 12px;
color: black;
font-family: "Trebuchet MS";
font-weight: normal;
}

</style>
</head>
<body><xsl:apply-templates/></body></html>
</xsl:template>


<xsl:template match="window">
<table cellspacing="0" border="0" width="150" style="border: 1px
solid darkblue;">
<tr><td bgcolor="darkblue" align="center"
class="title"><xsl:value-of select="@title"/></td></tr>
<tr><td class="message"><xsl:apply-templates/></td> </tr>
</table>
</xsl:template>


<xsl:template match="br">
<br/>
</xsl:template>


</xsl:stylesheet>


Now i must figureout how to embed this in XHTML document.
It is possible with namespaces but I don't know how to do this right
now.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация