What is your DOCTYPE DTD specification  "webpages/prods.xml" , then ?
It must be physically accessible

e.g

<!-- DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
             "http://my.netscape.com/publish/formats/rss-0.91.dtd"; -->

<!-- A  remote DTD downloaded from netscape -->

or

<!-- DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
             "DTD/rss-0.91.dtd" -->

<!-- A relative DTD == "webpages/DTD/rss-0.91.dtd" -->

--
Peter Pilgrim
G.O.A.T
                    "the Greatest Of All Time"



---------------------------------------- Message History 
----------------------------------------


From: Nik DAMPIER <[EMAIL PROTECTED]>@java.sun.com> on 21/04/2001 16:48

Please respond to "A mailing list for discussion about Sun Microsystem's Java          
    Servlet API Technology." <[EMAIL PROTECTED]>

DELEGATED - Sent by:     "A mailing list for discussion about Sun Microsystem's Java   
           Servlet API Technology."@java.sun.com>


To:   [EMAIL PROTECTED]
cc:
Subject:  Re: XML from servlets & XSLT??


I am using xalan-j_2_0_1
And this is the code that I have in my servlet:
XSLTInputSource xmlSource = null;

xmlSource = new XSLTInputSource(new FileReader((String)
"webpages/prods.xml"));

XSLTInputSource xslSource = null;

xslSource = new XSLTInputSource(new FileReader((String)
"webpages/prods.xsl"));
res.setContentType("text/html");
XSLTResultTarget target = new XSLTResultTarget(res.getWriter());

try
{
        XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
        processor.process(xmlSource, xslSource, target);
}
catch (SAXException exc)
{}

The system ID error you say is a DTD error, is this because I have not used
a DTD??
How do I read the file from the server and send it back???




--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to