-- 作者:皇帝宇
-- 发布时间:6/16/2007 3:28:00 PM
-- [求助]请教一个XSL加载图片超连接的问题!
这是我的XML: <?xml version="1.0" encoding="UTF-8"?> <!--Sample XML file generated by XMLSpy v2007 sp2 (http://www.altova.com)--> <?xml-stylesheet type="text/xsl" href="Volutidae.xsl"?> <PRODUCTS> <Shell ID="01"> <Barcode_NO>110.88.01</Barcode_NO> <Name type="latin">Alcithoe swainsoni</Name> <Photo title="Click to view larger version" datetaken="String" alt="Sorry, no photo available" view="above">thumbnails/1_1.jpg</Photo> <LinkTo>images/1_1.jpg</LinkTo> <Photo title="Click to view larger version" datetaken="String" alt="Sorry, no photo available" view="under">thumbnails/1_2.jpg</Photo> <LinkTo>images/1_2.jpg</LinkTo> <Size unit="mm">109mm 104mm 99mm F+ / F++</Size> <Description>Set of 3 patterns 109mm 104mm 99mm F+ / F++ Minor chips, growth lines & sands All 3 have nice intact protoconchs which is hard to find. Lightest form washed up on Raglan Beach Other two from a washup in Palliser Bay New Zealand </Description> <ProductTypeName>Volutidae</ProductTypeName> <Price CURRENCY="NZ$">10</Price> </Shell> <Shell ID="02"> <Barcode_NO>110.88.02</Barcode_NO> <Name type="latin">Alcithoe fusus</Name> <Photo title="Click to view larger version" datetaken="String" alt="Sorry, no photo available" view="above">thumbnails/1_3.jpg</Photo> <LinkTo>images/1_1.jpg</LinkTo> <Photo title="Click to view larger version" datetaken="String" alt="Sorry, no photo available" view="under">thumbnails/1_4.jpg</Photo> <LinkTo>images/1_1.jpg</LinkTo> <Size unit="mm">62mm Fine</Size> <Description>62mm Fine Chipped protoconch and lower lip. Crabbed in rockpool at low tide. Purakainui, Otago New Zealand</Description> <ProductTypeName>Volutidae</ProductTypeName> <Price CURRENCY="NZ$">10</Price> </Shell> 这是我的XSL <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <title>Volutidae</title> <xsl:for-each select="PRODUCTS/Shell[ProductTypeName='Volutidae']"> <tr> <table width="1000"> <form name="myform"> <tbody> <tr> <xsl:for-each select="Photo"> <td width="100" align="left"> <a> <xsl:attribute name="href">javascript:openPix('<img src="{LinkTo}"/>', 'Amalda australis')</xsl:attribute> <img> <xsl:attribute name="src"><xsl:value-of select="."/></xsl:attribute> <xsl:attribute name="alt">click to view large photo</xsl:attribute> <xsl:attribute name="border">1</xsl:attribute> </img> </a> </td> </xsl:for-each> <td width="100" align="left"> <xsl:value-of select="Name"/> </td> <td width="160" align="left"> <xsl:value-of select="Size"/> <br/> <xsl:value-of select="Description"/> <br/> </td> <td width="100" align="left">$ <xsl:value-of select="Price"/> </td> </tbody> </table> <br/> <hr/> <br/> </tr> </xsl:for-each> </body> </html> </xsl:template> </xsl:stylesheet> 我的图片超连接总是不能显示 请问有高手可以指点吗?
|