cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C. Gaffga" <cgaf...@triplemind.com>
Subject [C2] Problem: Checking XML before including it (XSPUtil.include)
Date Mon, 23 Jul 2001 15:46:46 GMT
I have some XML stored in the database an want to include in
in my page. Im using the following code in my XSP-page:

try {
  ...
  org.apache.cocoon.components.language.markup.xsp.XSPUtil.include(
     __is, this.contentHandler, newParser);
} catch (Exception e) {
 <blockquote>
   XML-Error XML: <xsp:expr>e.getMessage()</xsp:expr>
 </blockquote>
}

that work's fine if the XML is wellformed, but if it's not, it's the problem
that not
just the error message is outputted but also all XML that has been processed
before the
Error occured.

How can I check the XML before?
I tried to start the parser with no conumer but that throws an exception
every time

  parser.setConsumer(null);
  parser.parse(__is);

Is the a dummy consumer? something like dev/null ?

Christoph Gaffga

P.S.: It's no performence Problem for my Application if the XML is processed
twice.


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message