I'm not aware of a built-in way to do this. But I've been using the
BBEdit XML Tools scripts at:
One script provides the option to check XML well-formedness without a
DTD.
-Dennis
Thanks Dennis, you beat me to it. :-)
Regards,
Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com>
P.O. Box 1048, Bedford, MA 01730-1048
> I've tried using them, but they give a java error when I try to
> execute them. I had thought that they might not work with the current
> version of BB.
They seem to work fine with BBEdit 9.1.1 (2328) here. Perhaps there's
a problem with your Java installation?
-Dennis
> They seem to work fine with BBEdit 9.1.1 (2328) here. Perhaps there's
> a problem with your Java installation?
With the same version of BBEdit, I get the following results:
The XMLForm script works fine if (a) there is no DTD specified or (b) the
DTD is specified by absolute path (or presumably (c), it can be found by
some sort of resolver). It fails if, for example, the DTD is in the same
directory as the XML file and is specified by a relative path. This appears
to be because the script _always_ creates a temporary file (why, I'm not
sure, and the comments imply that wasn't the original intent). The script
checks the temporary file, but the DTD is of course no longer there.
The XMLValidate script fails with a Java exception regardless of how the DTD
is specified. There's nothing unusual about my Java installation that I'm
aware of, except that I've changed my default JVM to 1.6 rather than 1.5.
However, changing back to 1.5 doesn't make any difference (and I need 1.6
for a particular piece of software I use frequently). The exception is
"java.lang.NoClassDefFoundError:
org/apache/xmlbeans/impl/tool/InstanceValidator".
--
Nigel Stanger, <http://www.business.otago.ac.nz/infosci/>
Dept. of Information Science, <http://xri.net/=nigel.stanger>
University of Otago, Dunedin, NEW ZEALAND. +64-3-479-8179
This sentenc containz three errors.