This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: ** security problem and link
- To: xsl-list at mulberrytech dot com
- Subject: RE: ** security problem and link
- From: "John E. Simpson" <simpson at polaris dot net>
- Date: Tue, 15 Feb 2000 09:07:48 -0500
- References: <93CB64052F94D211BC5D0010A800133101FDEA48@wwmess3.bra01.icl .co.uk>
- Reply-To: xsl-list at mulberrytech dot com
At 04:50 PM 2/15/2000 +0000, ural wrote:
>How do I insert anchor tab using xml and xsl.
Exactly how you do that depends on *what* your XML looks like. As an
example, though, this XML:
<rootelem>
<childelem>
<uri>http://www.flixml.org</uri>
<uri>http://www.xml.com</uri>
<uri>http://www.mulberrytech.com/xsl/xsl-list</uri>
</childelem>
</rootelem>
run through this XSL (using James Clark's XT XSLT processor):
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/REC-html40">
<xsl:template match="rootelem">
<html>
<head><title>Link Demo</title></head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="childelem">
<ul>Here's a list of URIs:
<xsl:for-each select="./uri">
<li><a href="{.}"><xsl:value-of select="."/></a></li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
produces this HTML:
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/TR/REC-html40"><head><title>Link
Demo</title></head><body>
<ul>Here's a list of URIs:
<li><a href="http://www.flixml.org">http://www.flixml.org</a></li>
<li><a href="http://www.xml.com">http://www.xml.com</a></li>
<li><a
href="http://www.mulberrytech.com/xsl/xsl-list">http://www.mulberrytech.com/
xsl/xsl-list</a></li>
</ul>
</body></html>
Is that what you wanted to know?
=============================================================
John E. Simpson
simpson@polaris.net
-------------------------------------------------------------
I put contact lenses in my dog's eyes. They had little
pictures of cats on them. Then I took one out and he ran
around in circles. (Stephen Wright)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list