[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: ** security problem and link
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|