Hi Michael,
 
Much appreciated for the suggestions you give.
 
Being new to xsl-fo & xsl, I'm still trying to find a way to debug & troubleshoot problems that I encounter so your post points me in the right direction. 
Regards,
Kamo

--- On Fri, 8/26/11, Michael Kay <mike@saxonica.com> wrote:

From: Michael Kay <mike@saxonica.com>
Subject: Re: [saxon] Missing Child Elements
To: "Mailing list for the SAXON XSLT and XQuery processor" <saxon-help@lists.sourceforge.net>, kamohelo2003@yahoo.com
Date: Friday, August 26, 2011, 1:12 PM

I'm sorry, but I can't debug your stylesheet code for you. That's not the purpose of this list.

Some people like to use the debuggers available in oXygen or Stylus Studio. However, my own experience is that these often don't help very much with the most common kind of error, which is an incorrect path expression.

You might find (I don't guarantee it) that if you save the generated XSL-FO as a file, and then run it through FOP as a separate processing phase, that it tells you where the fo:block-container with the missing child is to be found. Or there might be a way of validating it independently of FOP. Anyway, my first step in debugging this would be to study the XSL-FO file and determine what's wrong with it. The next step would be to determine where the XSLT code is that is generating the incorrect XSL-FO. Once that is known, the error might stare you in the face (as likely as not, it's something like an xsl:for-each with a select expression that selects nothing from the input). If it does turn out to be a select expression that is selecting nothing, and you can't work out why by staring at it, the best approach is usually to break it down into simpler XPath expressions (for example, by removing predicates one at a time) to work out what change makes a difference.

Michael Kay
Saxonica

On 25/08/2011 10:34, KAMOHELO MOFOKENG wrote:
Hi All,
 
I'm getting the exception:
 
-----------------------------------------------------------------------------------------------------------------------------------
(Location of error unknown)org.apache.fop.fo.ValidationException: Error(Unknown location): fo:block-container is missing child elements.
 
Required Content Model: marker* (%block;)+
___________________________________________________________________________
 
Although the exception is explanatory, I'm not sure which child element is missing & how to look for it. As far as I can see all seems fine in the .xsl file (attached) I'm using.
 
 but I still can't figure out what's wrong with my style sheet file.
 
Can anyone tell me what's wrong with the stylesheet file attached?
Also, what tools do you use for troubleshooting stylesheets?
 
Thanks in advance.
 
Regards,
Kamo


------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help