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 DP...@rnib.org.uk on 2001/03/05 15:51:44 UTC

newbie request

I'm doing some work with an organisation
that is using namespaces in a set of xml 
documents which require validation to the
stated DTD.

I believe its possible to parse the document
against the DTD, and do proper namespace 
checking, using the xerces set properties.

Being quite new to Java, I'm having trouble
finding a simple enough example that I can
adapt. 

All the examples do far more than I actually need.

Sax2Writer.java has good examples of what I
want in terms of setting the properties, but
each time I start to strip out the additional
code, I founder on my lack of java knowledge.

Does anyone have either  simple parser code
that does no more than parse / validate,
or even a command line version that I can
pass the required properties into from the
command line please.

TIA, Regards DaveP

Re: newbie request

Posted by Andy Clark <an...@apache.org>.
DPawson@rnib.org.uk wrote:
> I'm doing some work with an organisation
> that is using namespaces in a set of xml
> documents which require validation to the
> stated DTD.

Are you aware of the inherent peril of trying to validate 
documents with namespaces using a DTD grammar? There are
tricks to be used, but it doesn't have anything to do with
the parser -- just the grammar and the instance document --
and it's not pretty.

-- 
Andy Clark * IBM, TRL - Japan * andyc@apache.org