This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

what am I missing?


here is the xml=

<?xml-stylesheet type="text/xsl" href="addhead.xsl"?>
<book>
   <Contact>
      <LName>Tidwell</LName>
      <FName>Robert</FName>
      <Addy1>3619 16th st. w.</Addy1>
      <Addy2/>
      <City>Bradenton</City>
      <State>Fl</State>
      <Zip/>
      <HomePhone>941.744.0083</HomePhone>
      <WorkPhone/>
      <Pager/>
      <Mobile>941.587.4822</Mobile>
      <Company>Final Edge Development</Company>
      <email>fedge@tampabay.rr.com</email>
   </Contact>
.
.
.
</book>

here is the xsl (patterned after chris's filtering
example)=

<?xml version='1.0' ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/xsl/transform";>
<xsl:param name="LName" select="''" />
	<xsl:template match="*|@*">			
	 	<xsl:copy>
	 		<xsl:apply-templates select="@* | * | comment() |
processing-instruction() | text()"/>
	 	</xsl:copy>
	</xsl:template>
	<xsl:template match="book">
  		<html>
  		<title>Address Book</title>
  		<head>
			<script language="Javascript" src="filter1.js" />
  		</head>      	             
  		<body bgcolor="white" style="color:navy;font=12pt
Verdana">
      		<img  src="/images/nilogo.BMP" />   
      		<HR color="red"/><BR/>
      		<xsl:choose>
			<xsl:when test="$LName">
				<xsl:apply-templates match="Contact" mode="single"
/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:apply-templates match="Contact" />
			</xsl:otherwise>   
     		</xsl:choose> 
  		</body>
  		</html>
	</xsl:template>
	<xsl:template match="Contact">
		<xsl:for-each select="book/Contact" order-by="+
LName">
      
       		<strong style="color:Navy;font:16pt Arial"><A
style="text-decoration:none;color:navy">
			<xsl:attribute name="onclick">
				filter(<xsl:value-of select="LName"/>)
			</xsl:attribute>
		<xsl:value-of select="LName"/> 
       		,<xsl:value-of
select="FName"/></A></strong><BR/>
       

      		</xsl:for-each>
	</xsl:template>
	<xsl:template match="Contact" mode="single">
		<strong style="color:Navy;font:16pt
Arial"><xsl:value-of select="LName"/> 
       		,<xsl:value-of select="FName"/></strong><BR/>
       		<span style="color:red"><xsl:value-of
select="Company"/></span><BR/>
       		<xsl:value-of select="Addy1"/><BR/>
       		<xsl:value-of select="City"/>, <xsl:value-of
select="State"/>  <xsl:value-of select="Zip"/><BR/>
       		Home:<xsl:value-of select="HomePhone"/><br/>
       		<i>Cell:<xsl:value-of
select="Mobile"/></i><br/>
       		eMail:<xsl:value-of select="email"/><br/>
       		<br/>

	</xsl:template>
</xsl:stylesheet>

So what am I doing wrong ? I get absolutely nothing
displayed from this?

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]