users@jaxb.java.net

RE: Re: Ignore DOCTYPE dtd Declaration

From: Douglas Seifert <dseifert_at_SeeBeyond.com>
Date: Thu, 13 Nov 2003 07:58:47 -0800

Andrew,
 
If you are using xerces, there is this "feature" available (note it is not a "property"):
 
http://apache.org/xml/features/nonvalidating/load-external-dtd
 
This feature is referenced here: http://xml.apache.org/xerces-j/features.html
 
I believe you would call the setFeature() method on the SAXParser once you created it. If you are using j2sdk rather than xerces, I don't know what the equivalent feature, if any, would be. But I haven't tried looking for it.
 
I am using xerces, but I haven't tried setting this feature yet. If it works, I will let the list know and provide a code sample.
 
JAXB team, it might make things easier to provide a way to set both features and properties for the underlying SAX parser through the JAXBContext and/or Marshaller and Unmarshaller interfaces. But on the other hand, providing this might make things easier for the XML impaired to mess things up by not forcing them to learn the dense XML apis.
 
-Doug Seifert

        -----Original Message-----
        From: Andrew.Ferguson_at_arm.com [mailto:Andrew.Ferguson_at_arm.com]
        Sent: Thu 11/13/2003 3:39 AM
        To: users_at_jaxb.dev.java.net
        Cc:
        Subject: Re: Ignore DOCTYPE dtd Declaration
        
        


>See https://jaxb.dev.java.net/servlets/ReadMsg?list=users&msgNo=1531
        
        hi,
        
         I've also been trying to do this recently. I first tried this in May (its
        a low priority change..) and have been getting stuck with the reply which
        can be found here
        
              http://archives.java.sun.com/cgi-bin/wa?A1=ind0305&L=jaxb-interest#5
        
        My problem is configuring the reader to ignore the DTD - (sorry if I'm
        being dense!). The only properties for the parser thats part of J2SE I can
        find are documented here:
        
        
        http://www.saxproject.org/apidoc/org/xml/sax/package-summary.html#package_description
        
        but can't see how these would help? For the case where Xerces is being used
        I found these properties
        
              http://xml.apache.org/xerces-j/properties.html
        
        but again don't see how they could be used?
        
        any help appreciated,
        thanks,
        Andrew
        
        
        
        
        
        
        
        
        
        ---------------------------------------------------------------------
        To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
        For additional commands, e-mail: users-help_at_jaxb.dev.java.net
        
        


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net