cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject XSP: trials of a newbie
Date Wed, 11 Oct 2000 17:41:20 GMT
Dear All,

I am trying to create an xsp page that dynamically fetches xml from a
server (using uri request)
and applies the specified stylesheet:-

Thx to Robin, I-Chung, bloritsch and sudheendra i have got this far:-

1) Read the FAQ/mail list on how to setup page.

2) Figured out i needed to encode the uri (swap "&" for "&" etc)

3) Fixed the xsp bug (e.getMessage), and along the way figured out how
to see the generated java code....

4) Figured out w/ I-Chung that the xml generated by my xsp starts with
text (outside root tags i suppose).....i got the following err msg...

org.apache.xalan.xslt.XSLProcessorException: Warning: can't output text
before document element!  Ignoring...
      at java.lang.Throwable.fillInStackTrace(Native Method)
      at java.lang.Throwable.(
      at java.lang.Exception.(
      at org.xml.sax.SAXException.(
      at org.apache.xalan.xpath.XPathException.(


5) Removed the xsl & xml:stylesheet PI's from my xsp page to see the xml was as follows:-

================== Generated page =====



<!-- This page was served in 120 milliseconds by Cocoon 1.7.4 -->

//================== End Generated page =====

================== XML (xsp) page =====

<?xml version="1.0" encoding='ISO-8859-1'?>
<?cocoon-process type="xsp"?>

<!-- <?cocoon-process type="xslt"?> removed to see xml gen'd -->
<!-- <?xml-stylesheet type="text/xsl" href="xsl/VD.xsl" ?> removed to
see xml gen'd -->

<xsp:page language="java"




//================== End XML (xsp) page =====

The xml generated when i put the request into my netscape browser
location is as follows:-

================== XML generated by request in browser  =====

<?xml version="1.0" encoding='ISO-8859-1'?>


<author>K C</author>
<company>AT&amp;T Corp.</company>
<title>Cox, Cox Radio, AT&amp;T, British Telecom</title>
<subject>Microsoft Word - withimage0613.doc </subject>
<country>North America</country>
<date>13 jun 2000 00 00</date >




================== End XML generated by request in browser  =====

Why does the request (made in xsp page) not return an xml string as it
does in the browser?

Any help appreciated....


Visit our website at

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.

View raw message