Oops. My previous post should have said: ... in the entity manager the external parameter entities *feature* can only be refreshed with the reset(XMLComponentManager) method.
On Sat, 13 Sep 2003, Michael Glavassevich wrote: > Hi everyone, > > I've checked a fix into CVS that allows parameter entities to be read when > DTDs are preparsed. The problem (which is still there) is in the > DTDLoader. The components it uses are not being reset properly (and > currently cannot be reset properly). For instance, in the entity manager > the external parameter entities can only be refreshed with the > reset(XMLComponentManager) method. This isn't being called. Fixing it > would require some major changes, as DTDLoader doesn't implement > XMLComponentManager or contain an XMLComponentManager. Certainly something > to revisit. I've made sure that the external entity features in the entity > manager are initialized to 'true', the same as their default values. > Before the default values would only be written when the component is > reset. This only masks a symptom of the problem, but at least external > parameter entities can now be read. > > On Fri, 12 Sep 2003, Henry Miller wrote: > > > I think the EntityDecl.dtd file should read: > > > > <?xml version='1.0' encoding='UTF-8' ?> > > <!ENTITY % flName " firstName, lastName " > > > <!ELEMENT firstName (#PCDATA) > > > <!ELEMENT lastName (#PCDATA) > > > > > A victim of the cut-n-paste demons, eh? > > > > I did some searching in Bugzilla, but found no hits. In fact, I kept > > getting "zarro boogs found" as a result. This leaves me to think that: > > > > 1) I can't figure out the web page form to specify a Buzilla search > > criteria. > > 2) There really isn't such a bug submitted. > > > > My money is on #1, since it was my first attempt at doing so. Can > > anyone verify if #2 is true? > > > > I'd be happy to submit the bug report, if you want me to. > > > > I'd also be happy to work on implementing a fix, but I'm not sure if > > I'm a good choice -- it's likely I'd introduce more bugs. After all, > > I'm still a noob. :-) > > > > Let me know what you think. > > > > --Henry > > > > >Hi Bob, > > > > > >This would seem bug in the current version of Xerces-j. The > > >following is the description. > > > > > >"When parsing , with the XMLGrammarPreparser parser, a DTD which > > >include external entities which define internal PEReferences; the > > >PEReferences are not recognized as such. The XMLDTDScannerImpl > > >ElementDecl scanner fails to recognize such a case." > > > > > > > > >This is easily reproduce with the xni.XMLGramarBuilder example. > > > > > >input.dtd > > >------------- > > > > > ><?xml version='1.0' encoding='UTF-8' ?> > > > > > ><!ENTITY % entDec SYSTEM "EntityDecl.dtd" > > > > > > >%entDec; > > ><!ELEMENT nameList (name, alias?)+> > > ><!ELEMENT name (%flName;) > > > ><!ELEMENT alias (%flName;) > > > > > > >EntityDecl > > >________ > > > > > ><?xml version='1.0' encoding='UTF-8' ?> > > > > > ><!ENTITY % entDec SYSTEM "EntityDecl.dtd" > > > > > > >%entDec; > > ><!ELEMENT nameList (name, alias?)+> > > ><!ELEMENT name (%flName;) > > > ><!ELEMENT alias (%flName;) > > > > > > > > > >Run the following: > > > > > >xni.XMLGrammarBuilder -d input.dtd > > > > > >Will caulse the following Error: > > > > > >[Error] :-1:-1: > > >http://www.w3.org/TR/1998/REC-xml-19980210#EntityNotDeclared?flN > > >ame > > >[Fatal Error] :-1:-1: > > >http://www.w3.org/TR/1998/REC-xml-19980210#MSG_OPEN_PAREN_ > > >OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN?name > > >:::::-1:-1:http://www.w3.org/TR/1998/REC-xml-19980210#MSG_OPEN_PAREN_OR_ELEMENT_ > > >TYPE_REQUIRED_IN_CHILDREN?name > > > at > > >org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter. > > >java:361) > > > at > > >org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter. > > >java:314) > > > at > > >org.apache.xerces.impl.XMLScanner.reportFatalError(XMLScanner.java:13 > > >78) > > > at > > >org.apache.xerces.impl.XMLDTDScannerImpl.scanChildren(XMLDTDScannerIm > > >pl.java:1009) > > > at > > >org.apache.xerces.impl.XMLDTDScannerImpl.scanElementDecl(XMLDTDScanne > > >rImpl.java:867) > > > at > > >org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(XMLDTDScannerImpl. > > >java:1956) > > > at > > >org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset(XMLDTD > > >ScannerImpl.java:318) > > > at > > >org.apache.xerces.impl.dtd.XMLDTDLoader.loadGrammar(XMLDTDLoader.java > > >:392) > > > at > > >org.apache.xerces.parsers.XMLGrammarPreparser.preparseGrammar(XMLGram > > >marPreparser.java:244) > > > at xni.XMLGrammarBuilder.main(XMLGrammarBuilder.java:271) > > > > > > > > >Regards, > > > > > > Jeffrey Rodriguez > > > Silicon Valley > > > > > > > > > > > > > > > > > > -- -------------------- Michael Glavassevich [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
