| Author |
Blank line before XML declaration (xslt)
|
Rob Stan
Greenhorn
Joined: Jan 20, 2011
Posts: 7
|
|
I have an RSS feed reader in xslt that looks a lot like this one
http://snipplr.com/view/19024/simple-xslt-rss-reader/
The problem is the actual feed. If the prolog of the feed is a blank line
the the reader just does not work.
This seems to be a well known problem.
http://validator.w3.org/feed/docs/error/WPBlankLine.html
Is there any work around in xslt or possible with the help of some java script?
Thanks
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
I'm not sure where JavaScript would fit in this problem.
If this was my problem in Java I would consider two solutions:
1. for a small input stream - read the whole thing into a byte[] and create a new input stream that starts in the right place to pass to the transformer.
2. for a big input stream - write a InputStream extension class that skips to the valid start when initialized.
Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: Blank line before XML declaration (xslt)
|
|
|