You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Andrew Newton <an...@research.netsol.com> on 2001/04/13 20:40:35 UTC

trouble with

I have two sample schemas; the first with an element that accepts
any element from any namespace as its child.  When I try to
place an element from the second schema in it, I get the 
following error with Xerces-J 1.3.1:

$ java dom.DOMCount -v any.xml
[Error] any.xml:17:21: The content of element type "any1:acceptAny" must match "##any:uri=http://any1.com*".
any.xml: 450 ms (5 elems, 7 attrs, 26 spaces, 53 chars)
$

When using Xerces-J 1.3.0, it works fine:

$ java dom.DOMCount -v any.xml
any.xml: 398 ms (5 elems, 7 attrs, 26 spaces, 53 chars)
$


I've included the sample files.  Am I doing or assuming something wrong?

-andy

-- 
Andrew Newton
anewton@research.netsol.com

Re: does xerces have a command line invocation for validation

Posted by Arnaud Le Hors <le...@us.ibm.com>.
Xalan is a transformation engine so it makes perfect sense to have a
standalone program for it, the same is not so true for Xerces. So we
don't have any such program but there are many sample programs you can
use if all you want to no is check whether a document is wellformed or
valid. SAXCount or DocumentTracer for instance would do the job. You
just need to ignore the output.
If you want to write a small program that does nothing else than parse
the document it'd be trivial to write starting from one of those
samples.
-- 
Arnaud  Le Hors - IBM Cupertino, XML Strategy Group

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


does xerces have a command line invocation for validation

Posted by "John L. Utz III" <ut...@singingfish.com>.
hi;

i am pretty sure that the answer is no, because i didnt see it in the
docs, but it seemed appropriate to ask.

xalan has one and i use the heck out of it. thus, i wanted to go back and
look for the same thing in xerces and i didnt find it.

to continue with the xalan example, here's the relevant section from
'getting started':

	java org.apache.xalan.xslt.Process -in xmlSource
    		-xsl stylesheet -out outputfile

this is just awesome for so many things, junit tests, dev work,
integrating with emacs...running in perl/python...etc

so, something along the lines of:

	java org.apache.xerces.*Parser.Validate [-otherargs] data.xml


would be full of sublime beauty.


tnx for any help you can provide!

johnu






---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org