Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

templates

Status
Not open for further replies.

mrdev

Programmer
Mar 25, 2001
22
NL
Hi there,

I have a couple of questions:

1.) Wat is the difference between <xsl:stylesheet xmlns:xsl=&quot; and <xsl:stylesheet xmlns:xsl=&quot; What do they do?

2.) I have the following files:

sheet.xsl
<?xml version=&quot;1.0&quot; ?>
<xsl:stylesheet xmlns:xsl=&quot;
<xsl:template match=&quot;/&quot;>
<xsl:apply-templates />
</xsl:template>

<xsl:template match=&quot;pagina&quot;>

<html><head><title>My Homepage</title></head>
<body topmargin=&quot;0&quot; leftmargin=&quot;0&quot;>
<table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr><td width=&quot;100%&quot; bgcolor=&quot;#0000FF&quot; height=&quot;1&quot;>
<img border=&quot;0&quot; src=&quot;picture.gif&quot; width=&quot;342&quot; height=&quot;91&quot;/>
</td></tr><tr><td valign=&quot;top&quot; height=&quot;1&quot;><br/>
<table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot;>
<tr><td width=&quot;19%&quot; valign=&quot;top&quot; align=&quot;left&quot;>

<xsl:value-of select=&quot;nav&quot;/>

</td><td width=&quot;81%&quot; bgcolor=&quot;#EFEFEF&quot; valign=&quot;top&quot; align=&quot;left&quot;>
<b><i><font face=&quot;Arial Black&quot;>

<xsl:value-of select=&quot;titel&quot;/>

</font></i></b>
<hr noshade=&quot;noshade&quot; color=&quot;#000000&quot; width=&quot;95%&quot; size=&quot;1&quot; align=&quot;center&quot;/>
<p><font face=&quot;Arial&quot; size=&quot;2&quot;>

<xsl:apply-templates/>

</font></p></td></tr></table></td></tr></table></body></html>
</xsl:template>

<xsl:template match=&quot;tekst&quot;>
<xsl:value-of select=&quot;.&quot;/>
</xsl:template>

<xsl:template match=&quot;link&quot;>
<a href=&quot; select=&quot;.&quot;/></a>
</xsl:template>

</xsl:stylesheet>


and

index.xml
<?xml version=&quot;1.0&quot; standalone=&quot;yes&quot; ?>
<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;sheet.xsl&quot;?>

<pagina>
<nav>some tekst</nav>
<titel>Home</titel>
<tekst>
Some text here. <link>a link</link> text again.
</tekst>
</pagina>


I want to have a link inside the tekst-attribute, but i don't really know how to translate that in xsl. Mayby some explaining here?

I hope some one can answer my questions.

Mr. Dev.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top