Re: xslt help
jfuller <[email protected]>
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <[email protected]> |
Debbie wrote: > Forgive me if I'm doing this wrong. Would you be able to help me with > an XSLT 1.0 problem? I got this email from the postings I receive from > my subscription. If I should do this another way please let me know. I > am using XSLT 1.0 that is transformed into a PDF by FOP. > > I have a template in XSLT 1.0 that iterates through the questions in > each section of a report and brings back a unique response per section. > This is working fine. The problem I'm having is that it prints many > blank lines in the report. I've tried everything I can find in FAQ > sections of forums and nothing takes out the blank lines. The report > prints as follows: your question is not related to EXSLT, this is whitespace handling issue. I would suggest going over to XSL-List or perhaps some FO related list. * I will assume that the whitespace your are concerned with is present in the resultant XML document after XSLT processing; if this is output from FO, then perhaps this is an XSL:FO problem * you didnt mention if you could replicate the problem using different XSLT Processors (I would reccommend SAXON XSLT Processor at http://www.saxonica.com). * though your question is wonderfully detailed, I have a few suggestions; always state processor, platform this is occuring on, in addition (so others in the future may be helped) giving a descriptive subject header to your email is always recc. debugging whitespace issues by email, can be difficult...lots of mail readers do what they think is right as well...so I am guessing at the solution to your problem. If it was me trying to debug this problem I would first create the smallest possible stripped down XSL-T that demonstrates the problem, using the source XML, so make a simple XSLT that just does a raw print out to with no FO, etc. Breaking the problem down this way will make it easier for you to know 'if' whitespace is simply being taken from your source document or generated by the XSLT Processing itself (if it is the later this can be a valid or invalid behavior of the processor). * manually adjust the source XML, e.g. remove all incidental whitespace from that document, if whitespace still shows up you know its not coming from the source (useful to know) * have u tried using normalize-space() in your xsl:value selects? * whitespace and XSLT links: http://www.xml.com/pub/a/2001/11/07/whitespace.html http://www.dpawson.co.uk/xsl/sect2/N8321.html As I mentioned before, your problem is not related to EXSLT, so you will get more responses at another list. good luck, Jim Fuller