Subject: Re: XML to HTML From: Carlos Araya <elrond@xxxxxxxxxxxxxxxx> Date: Wed, 28 Jun 2000 08:50:21 -0700 (PDT) |
Vinay: If you want to create a link to the content of <EXTRA_INFO> I would use something like: <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="LOCATION"/> </xsl:attribute> <xsl:value-of select="LOCATION"/> </xsl:element> That will create a hyperlink to the file, I don't know of any other way to includea document. Carlos On Wed, 28 Jun 2000, Vinay Jaiswal wrote: | <HOUSE> | <PRICE>500000</PRICE> | <BEDROOMS>4</BEDROOMS> | <BATHS>3</BATHS> | <GARDEN>yes</GARDEN> | <EXTRA_INFO>see file:"house_3.txt"</EXTRA_INFO> | </HOUSE> | | |XSL file... | |<?xml version="1.0"?> |<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" | | xmlns="http://www.w3.org/TR/REC-html40" | result-ns=""> | |<xsl:template match="/"> | |<HTML> | | <HEAD> | | <META http-equiv="Content-Type" content="text/html; | charset=iso-8859-1"/> | | <META http-equiv="Expires" content="0"/> | | <STYLE TYPE="text/css"> | | BODY {font-size:10pt;} | | .cell {font-size:10pt; } | | .listingCaptions { font-size:18pt;} | .tableHead { font:bold; } | </STYLE> | </HEAD> | <BODY> | <DIV> | | <xsl:apply-templates/> | </DIV> | </BODY> | </HTML> |</xsl:template> | |<xsl:template match="HOUSES"> |<TABLE border="1" frame="border" rules="all" cellpadding="2"> |<CAPTION class="listingCaptions">Real Estate Listings</CAPTION> |<COLGROUP> | <COL width="30" align="right"/> | <COL padding-left="15"/> | <COL padding-left="15"/> | <COL padding-left="15" align="center"/> |</COLGROUP> |<THEAD class="tableHead"> | <TD>Price</TD> | <TD>Num Beds</TD> | <TD>Num Baths</TD> | <TD>Garden</TD> | <TD>Extra Info</TD> | </THEAD> | <xsl:for-each select="HOUSE"> | | <TR> | <TD class="cell"> | <xsl:value-of select="PRICE"/> | </TD> | <TD class="cell"> | <xsl:value-of select="BEDROOMS"/> | </TD> | <TD class="cell"> | <xsl:value-of select="BATHS"/> | </TD> | <TD class="cell"> | <xsl:value-of select="GARDEN"/> | </TD> | <TD class="cell"> | <xsl:value-of select="EXTRA_INFO"/> | </TD> | </TR> | </xsl:for-each> | </TABLE> | </xsl:template> |</xsl:stylesheet> | | Thanks & regards | | Vinay Jaiswal | | | | XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list | -- Carlos E. Araya WebCT Project Coordinator - New Media Specialist Alquist Center for Instrucctional Development San Jose State University 1 Washington Square San Jose, Ca 95192-0026 email : araya@xxxxxxxx (prefered) | Phone (408) 924 2859 elrond@xxxxxxxxxxxxxxxx | Pager (408) 308 1793 Web : http://www.sjsu.edu/depts/alquist/ | Fax (408) 924 2437 http://valinor.sjsu.edu/~elrond/ finger elrond@xxxxxxxxxxxxxxxx for PGP key -- LIFE: You can't control the length, but you can control the depth and width. -- From Randal Schwartz picture archive XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: XML to HTML, David Carlisle | Thread | Re: XML to HTML, David Carlisle |
Re: XSLT feature request - element , Eric van der Vlist | Date | Re: variable dtd path, xsl list |
Month |