Hi, How about making a normalized copy of the DTD and putting that next to the files that are being imported? It could be that MarkLogic is able to follow the first step to the DTD, but is not resolving the parameter entities that include further DTD fragments.
I haven't tried though, just a thought.. Kind regards, Geert > Drs. G.P.H. Josten Consultant http://www.daidalos.nl/ Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665 JZ Bleiswijk Tel.: +31 (0) 10 850 1200 Fax: +31 (0) 10 850 1199 http://www.daidalos.nl/ KvK 27164984 De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. > From: [email protected] > [mailto:[email protected]] On Behalf Of > Lee, David > Sent: donderdag 9 april 2009 16:54 > To: General Mark Logic Developer Discussion > Subject: RE: [MarkLogic Dev General] Loading an xml document > referencingexternally defined entities > > Thanks for the advise. > > I dont have the ability to manually edit documents (there's > actually legal/contract issues involved) > > But I can "pre processes" them to resolve entity references. > > I was sort of hoping something as big as ML would handle this > correctly but I can work around it. > > > > -David > > > > ---------------------------------------- > > David A. Lee > > Senior Principal Software Engineer > > Epocrates, Inc. > > [email protected] > > 812-482-5224 > > > > > > > > > > > > From: [email protected] > [mailto:[email protected]] On Behalf Of > Vidhya Parthasarathy > Sent: Thursday, April 09, 2009 10:52 AM > To: General Mark Logic Developer Discussion > Subject: RE: [MarkLogic Dev General] Loading an xml document > referencingexternally defined entities > > > > David, > > > > You are right any external references is not checked by > marklogic. You have to appended the xml file with doctype declaration > > > > try adding this to you xml file before insertion > > > > <!DOCTYPE article PUBLIC "-//DUMMY//DTD dummy DTD//EN" [ > > <!ENTITY ldquo "“" > > > ]> > > > > Vidhya > > > > > > From: [email protected] > [mailto:[email protected]] On Behalf Of > Lee, David > Sent: Thursday, April 09, 2009 10:42 > To: [email protected] > Subject: [MarkLogic Dev General] Loading an xml document > referencing externally defined entities > > > > > > I'm trying to load an XML document using the XCC library > which has reference to entities defined seperately in a .ent file. > > The document header has a DTD reference > > > > --- xml doc > > > > <!DOCTYPE TOPIC SYSTEM "lww-five-minute.dtd"[]> > > > > > > > > Inside lww-five-minute.dtd is an external entity reference > > > > --- dtd doc > > > > <!ENTITY % xmlspecchars-integrated.ent PUBLIC > "-//LWW//DTD XML Special Characters Module v4.0 20050408//EN" > "xmlspecchars-integrated.ent" > > %xmlspecchars-integrated.ent; > > --------- > > > > Then inside xmlspecchars-integrated.ent is entity definitions > > e.g. > > <!ENTITY ldquo "“" > <!--=double quotation mark, > left, U+201C--> > > > > > > When I try to load the document using Session.insertContent() > I get the following error: > > > > com.marklogic.xcc.exceptions.XQueryException: > XDMP-DOCENTITYREF: Invalid entity reference "ldquo" at > new5mcc.xml line 28635 > > in /insert > > > > I've tried putting the dtd and ent files onto the ML server > but no avail. > > If I pre-parse the XML with some other XML tool which > resolves the entities then put *that* file to ML it works fine. > > Any suggestions on how to load an xml document which uses > external entity definitions ? > > thanks > > ---------------------------------------- > David A. Lee > Senior member of the technical staff > Epocrates, Inc. > [email protected] > > > > > > > > _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
