This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: what am I missing?
- To: xsl-list at lists dot mulberrytech dot com
- Subject: RE: [xsl] what am I missing?
- From: Carlton Noles <nolesce at yahoo dot com>
- Date: Sun, 13 May 2001 13:45:28 -0700 (PDT)
- Reply-To: xsl-list at lists dot mulberrytech dot com
Thanx everyone for the help. The crux of the last
problem was the namespace issue. BTW Chris when I said
I patterned it after your example I meant as far as
the choose and filtering was concerned, the other
templates i lifted from another project I wrote. They
worked there but that was a different namespace and
thus the problem. on to the next issue...
on a new project I am using the filtering as a TOC on
an xml with this structure....
volume/
Title/
Credit/
Credit/
Credit/
Book
bTitle/
intro/
verse
vNumber/
paragraf/
paragraf/
/verse
/book
book
.
.
.
/book
/volume
as you have probably guessed I am having problems with
the <Credit> and <Paragraf> elements. I used an
xsl:for-each (tho i was told not to) ;{)} and that at
least saw all the paragrafs but didn't render them,
just gave me a <br/> for each one. here is the xsl
what should I do to display the Paragraf's and the
Credit's.
<?xml version='1.0' ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="book" />
<xsl:template match="*|@*">
<xsl:copy>
<xsl:apply-templates select="@* | * | comment() |
processing-instruction() | text()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="Volume">
<html>
<title><xsl:value-of select="Title" /></title>
<head>
<script language="Javascript" src="filtertao.js" />
</head>
<body bgcolor="white" style="color:navy;font=12pt
Trebuchet">
<h1 style="font:36pt Monotype
Corsiva;color:maroon"><xsl:value-of
select="Title"/></h1>
<HR color="Maroon"/><BR/>
<xsl:apply-templates select="Credit"/>
<xsl:choose>
<xsl:when test="$book">
<xsl:apply-templates select="Book[bTitle=$book]"
mode="single" />
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="Book" />
</xsl:otherwise>
</xsl:choose>
</body>
</html>
</xsl:template>
<xsl:template match="Credit">
<xsl:value-of select="Credit"/>
</xsl:template>
<xsl:template match="Book">
<strong style="color:Navy;font:16pt Arial"><A
style="text-decoration:none;color:navy">
<xsl:attribute name="onclick">filter('<xsl:value-of
select="bTitle"/>')</xsl:attribute>
<xsl:value-of select="bTitle"/><br/> </A></strong>
</xsl:template>
<xsl:template match="Book" mode="single">
<strong style="color:Navy;font:16pt
Arial"><xsl:value-of select="bTitle"/></strong><BR/>
Thus Spake The Master Programmer:<br/>
<span style="color:maroon"><xsl:value-of
select="intro"/></span><BR/>
<xsl:apply-templates select="verse"/>
<br/>
<a href="Javascript:filter('')">BACK</a>
</xsl:template>
<xsl:template match="verse">
<B
style="color:gold;background-color:maroon;font:25pt
Monotype Corsiva"><xsl:value-of
select="vNumber"/>.</B><br/>
<xsl:apply-templates select="Paragraf"/><br/>
</xsl:template>
<xsl:template match="Paragraf">
<xsl:value-of select="Paragraf"/>
</xsl:template>
</xsl:stylesheet>
here i go again making a fool of myself...
Carlton Noles
__________________________________________________
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