Subject: Re: [xsl] Stumped on why a field isn't showing up|
From: Deirdre Saoirse Moen <deirdre@xxxxxxxxxxx>
Date: Sun, 13 Jun 2004 10:45:31 -0700
The first thing I notice in your stylesheet is the fact that you are selecting "novel/chapter" for your first apply-templates. According to your sample XML there is no novel/chapter. There is a text node "&ch01;" that looks like it could at one point been a representation of something but I'm just making a guess.
It is using "chapter" as the context of continuing the recursion process
of apply-templates. Since "author" and "address" are child elements of
"novel" and not "chapter" the apply-templates process being invoked
doesn’t find any child elements following the chapter path and stop's
the processing for that element.
There are two ways to fix this:
1) Add a root ("/") reference to the beginning of your apply-templates for the "author" and "address". So, turn this:
The one other thing I should point out is the fact that you have an extra </xsl:apply-templates> in your second template.
I hope this helps you get a little closer to where you want to be! And don’t hesitate to ask further questions if the need arises.