xerces-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Chan" <hc...@datawave.ca>
Subject RE: Validating against a DTD
Date Fri, 08 Nov 2002 18:51:21 GMT
Thanks Sandy,

This answer makes sense.  You Toronto IBMers sure know you're stuff.

Cheers,
Henry

> -----Original Message-----
> From: sandygao@ca.ibm.com [mailto:sandygao@ca.ibm.com]
> Sent: Friday, November 08, 2002 10:36 AM
> To: xerces-j-user@xml.apache.org
> Subject: RE: Validating against a DTD
> 
> You can preparse the DTD and save it in a grammar pool, then set this
pool
> onto the parser. For more details, please refer to this FAQ page:
> http://xml.apache.org/xerces2-j/faq-grammars.html
> 
> Cheers,
> Sandy Gao
> Software Developer, IBM Canada
> (1-905) 413-3255
> sandygao@ca.ibm.com
> 
> 
> 
> 
>                       "Henry Chan"
>                       <hchan@datawave.c        To:       <xerces-j-
> user@xml.apache.org>
>                       a>                       cc:
>                                                Subject:  RE:
Validating
> against a DTD
>                       11/08/2002 01:28
>                       PM
>                       Please respond to
>                       xerces-j-user
> 
> 
> 
> 
> 
> Thanks for the suggestion Brion.
> 
> This suggestion will work, but I don't really want to "modify" the
> original
> XML stream
> Just kinda surprised that there's no API in xerces to specify a DTD
that I
> want to validate against
> 
> thx,
> Henry
> 
> -----Original Message-----
> From: Swanson, Brion [mailto:Brion.Swanson@westgroup.com]
> Sent: Friday, November 08, 2002 5:48 AM
> To: 'xerces-j-user@xml.apache.org'
> Subject: RE: Validating against a DTD
> 
> Hi Henry,
> 
> The way I've handled this in the past is to peek at the incoming
stream
> before the parser ever gets a look at it, and insert a DOCTYPE element
in
> the front of the stream.  Note: this may require removing or saving
the
> XML
> processing instruction and/or any comments that appear before the
document
> element if those items are important to you.
> 
> Cheers!
> Brion
>       -----Original Message-----
>       From: Henry Chan [mailto:hchan@datawave.ca]
>       Sent: Thursday, November 07, 2002 6:33 PM
>       To: xerces-j-user@xml.apache.org
>       Subject: Validating against a DTD
>       Hi all,
> 
>       Just wondering if there was a way to validate an XML doc against
a
>       DTD
>       *WITHOUT* the XML doc specifying which DTD to load (i.e. no
DOCTYPE)
>       My customer is sending an XML stream and I want to validate it
>       against my own DTD
> 
>       thx,
>       Henry
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org


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


Mime
View raw message