On Oct 31, Aaron Mulder quoth:

>       Time for a validating parser?

Try rxp.  http://www.cogsci.ed.ac.uk/~richard/rxp.html 

Here's the output on the enterprise-bean problem with the following
DOCTYPE header added:

<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>

$ ./rxp -V ./foo.xml > /dev/null 
Warning: Start tag for undeclared element enterprise-bean in unnamed
entity at line 4 char 24 of file:///[...]/foo.xml
Warning: Content model for ejb-jar does not allow element enterprise-bean
here in unnamed entity at line 4 char 24 of file:///[...]/foo.xml

I had to add the doctype header so that it would fetch the DTD from
java.sun.com automagically to validate the XML.

Anyone doing XML docs might want to consider use something similar to
check for dumb errors. Think of it like 'lint'.  I'm sure there are
numerous other standalone validating parsers out there.  rxp was just the
first one I came across and isn't really missing anything that I need.

[marc: does telkel publish the jaws and jboss.xml dtds on their web site
in some form like http://www.jboss.org/dtds/jboss-1_0.dtd,
http://www.jboss.org/dtds/jaws-1_0.dtd?  If not, could you? It would make 
validating XML so much easier.]

I think that validating all XML on deployment would be nice, but certainly
not an essential feature for jboss as the developer could almost as easily
verify their XML by making it (really) well formed (DOCTYPE) and running
it through a validating standalone parser like rxp before jarring.

> On Tue, 31 Oct 2000, Rickard [iso-8859-1] �berg wrote:
> > Hang on, that is wrong. It should be "enterprise-beans", with an "s".

--------------------------------------------------------------------------
    The fact that no one understands you doesn't mean you're an artist.
--------------------------------------------------------------------------
Caskey <caskey*technocage.com>       ///                   TechnoCage Inc.
--------------------------------------------------------------------------
           Oh no! Space monkeys are attacking! -- eddie izzard



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to