cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Pogue <mpo...@apache.org>
Subject Re: [Bug in Xerces] Gets confused with CDATA
Date Wed, 19 Jan 2000 00:48:27 GMT
Here's a simple BAT script that I use with every release.  It's real
handy.
No, it's not in the distribution (it's Windows-specific).  But, you can
easily write your own similar csh or sh script for Linux, et.al...

It will parse a file, and show you any errors that it finds (with line
numbers).
It's quick and dirty, and contains pathnames specific to my system. 
But, hopefully, 
you'll get the idea...I haven't bothered to clean it up.

======== cut here ===================
@echo off

REM ---------------------------------
REM parse a single file
REM ---------------------------------

set SHOWDATE=c:\tools\usr\local\bin\date

echo -------------------------------
%SHOWDATE%

REM --------------------------------
REM setup
REM --------------------------------
set JARS=d:\xerces-1_0_0
set JARFILES=%JARS%\xerces.jar;%JARS%\xercesSamples.jar
set XML4JSWITCHES=-p dom.wrappers.NonValidatingDOMParser 
REM set app=dom.traversal.IteratorView
REM set app=sax.SAXCount
set app=dom.DOMCount

echo ******** Parsing "%1"

jre -cp %JARFILES%  %app% %XML4JSWITCHES%   %1 %2 %3 %4 %5 %6 %7 %8 %9 

%SHOWDATE%
echo -------------------------------
======== cut here ===================

Mike

Philippe Lavoie wrote:
> 
> Thanks a lot Mike,
> 
> my problem was that I should have ended the CDATA with
> ]]&gt; instead of (as you mention) ]]>
> 
> I was writing instructions on how to include weird characters
> for our web developpers. Guess I should read my own docs :)
> 
> > I haven't tried the file with the DTD (because I don't have it).  But,
> > I'd suggest that the well-formedness errors need to go away before you
> > look at the DTD question!
> >
> > For those other people using Cocoon, if you have trouble with
> > a specific
> > XML file, try running it through the parser just by itself.
> > The parser
> > will usually tell you exactly where the problem is.  (Note that the
> > parser prints out the error line number...)
> >
> >
> 
> I know that this is a FAQ, but I can't find it in the Xerces FAQ.
> How do I use Xerces to validate the well-formedness of my xml file ?
> 
> Thanks again
> 
> Phil
>

Mime
View raw message