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





--


--Henry Miller

[EMAIL PROTECTED]
Evolutionary Technologies International, Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to