[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: ** security problem and link

Subject: RE: ** security problem and link
From: "John E. Simpson" <simpson@xxxxxxxxxxx>
Date: Tue, 15 Feb 2000 09:07:48 -0500
cet for contact lenses
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@xxxxxxxxxxx
-------------------------------------------------------------
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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.