Creating a new addEntityDecl() API in the validators would be my choice also.  
There was a short "External Entities" discussion on
the xml-dev list today and the proposed XInclude spec was mentioned as a 
"specific" replacement for external entities.

george

-----Original Message-----
From: Ted Leung [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 13, 2000 5:30 PM
To: George T. Joseph
Subject: Re: One more...Changes for XMLParser.java



----- Original Message -----
From: "George T. Joseph" <[EMAIL PROTECTED]>
To: "Ted Leung" <[EMAIL PROTECTED]>
Sent: Thursday, January 13, 2000 11:52 AM
Subject: FW: One more...Changes for XMLParser.java


> Hi Ted,
>
> I think I've come up with a workaround that you might like better.  I
figured I'd run it by you before posting on the xerces-dev
> list.
>
> I found that if I created a custom processing instruction in my DOMParser
extension, I could call...
>
> /*****/
> int d = fStringPool.addString(ds);
> int e = -1;
> int f = fStringPool.addString(fs);
> int rc = fSchemaValidator.fEntityPool.addEntityDecl(d, -1, -1, e, f, -1,
true);
> readerdepth++;
> boolean bbo = startReadingFromEntity(d, readerdepth,
XMLEntityHandler.CONTEXT_IN_CONTENT);
> readerdepth--;
> /*****/
>
> ...and cause an eternal entity to be read inline.  The only problem now is
that XSchemaValidator.fEntityPool and
> DTDValidator.fEntityPool are both private.
>
> Would you be open to one of the following...
>
> Make fEntityPool public in both DTDValidator.java and
XSchemaValidator.java
> --or--
> Create a getEntityPool() API in DTDValidator.java, XSchemaValidator.java
and XMLValidator.java to return fEntityPool
> --or--
> Create an addEntityDecl() API in DTDValidator.java, XSchemaValidator.java
and XMLValidator.java that wraps
> fEntityPool.addEntityDecl()
>
> george
>

I'd be happiest with the last -- but only making it public on the
implementation classes.   The schema validator is  going to
change quite a bit to support the new draft, so you should regard this as
temporary if we decide to do it.

Also, there's no need for a private run through -- I think it's beneficial
for all of these discussions to take place in public view
so people can learn, etc.  I think you should repost your message to
xerces-dev.   Are you interested in doing some more work
on Schema validation?  We can always use more help.

Ted


Reply via email to