Re: Doctype declarations in fragments

2009-10-02 Thread Wulf Berschin
Hi Michael, I think aour scenario is not uncommon: a modular DTD, documents with several hundred pages (XML size 2MB), possibly many authors working on the same document which is stored / can be retrieved as fragments either in the DMS (where we could solve this problem on file base) or in the

Re: Doctype declarations in fragments

2009-10-01 Thread Michael Glavassevich
Hi Wulf, I didn't say it would it be easy, just that you're on shaky ground if your solution involves hooking into or extending Xerces' internals. There might be other ways to deal with this, for example using XInclude instead of entity references and/or removing the DOCTYPEs from the files and

Re: Doctype declarations in fragments

2009-10-01 Thread Wulf Berschin
Hi Michael, I'm just trying to follow your approach and creating a InputStream wrapper class which removes the doctype declaration. Afaik that means: - write an own EntityResolver which resolves file entities - write a doctype removing reader which creates a FileInputStream for the resolved

RE: Doctype declarations in fragments

2009-09-16 Thread Michael Glavassevich
FYI... you need to already be browsing resolved issues [1] for Xerces-J for this link [2] to work. [1] https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&pid=10520&status=5 [2] https://issues.apache.org/jira/secure/IssueNavigator.jspa?sorter/field=updated&sorter/order=DESC Micha

RE: Doctype declarations in fragments

2009-09-16 Thread Michael Glavassevich
Gary Gregory wrote on 09/16/2009 02:24:35 PM: > For the curious: > > I has been, almost to the day, *two* years since the release of 2.9. > 1, so the "if one of us modifies or removes..." is a big if :) as > far as changes showing up in a new release. Unless the longer it has > been, the more lik

RE: Doctype declarations in fragments

2009-09-16 Thread Gary Gregory
an. Gary Gregory Senior Software Engineer Seagull Software ggreg...@seagullsoftware.com www.seagullsoftware.com From: Michael Glavassevich [mrgla...@ca.ibm.com] Sent: Wednesday, September 16, 2009 10:27 AM To: j-users@xerces.apache.org Subject: Re: Doctype declarations in fragments

Re: Doctype declarations in fragments

2009-09-16 Thread Michael Glavassevich
Hi Wulf, Haven't looked at the specifics of what you did but I'm never fond of any solution that involves extending or hooking into Xerces' internals. I'm not referring to XNI itself (which is a stable Xerces API) but rather the internal implementation classes you've chosen to use / extend. Your

Re: Doctype declarations in fragments

2009-09-16 Thread Wulf Berschin
Hi Michael, thank you for your response. I'll try your approach tomorrow... Meanwhile I was playing a little bit with XNI and the Parser Configuration and finally got Xerces to ignore this, indeed misplaced, construct. What I did is: --- public class FragmentDoctypeSkipParser extends Ab

Re: Doctype declarations in fragments

2009-09-16 Thread Michael Glavassevich
Hi Wulf, Wulf Berschin wrote on 09/16/2009 02:48:52 AM: > Hi, > > for ease of editing we have a doctype declaration in each (file) > fragment. When I parse the full master (with resolving fragments) Xerces > throws a fatal error (Doctype not allowed in content) and goes in an > endless loop whe