I did not see any response to my email. Any XML4J and/or DTD export out there?
______________________ Jian Ouyang Enterprise Business Services Delta Technology 4-1822 [EMAIL PROTECTED] http://dtweb/ebs/ > -----Original Message----- > From: Ouyang, Jian > Sent: Friday, October 11, 2002 8:39 AM > To: [EMAIL PROTECTED] > Subject: predefine base directory > > Hi, > > I read in DTD file with XML4J. When There is one DTD file, everything > works perfectly. When there are multiple DTD files (namely within one DTD > file, there are references to other DTD files via entity), XML4J fails. > Let me give sample DTD file to illustrate the issue. > > I have a dtd file MyDtd.dtd: > > ... > > <!ENTITY % ENTITY1 SYSTEM "next1.dtd"> > %ENTITY1; > <!ENTITY % ENTITY2 SYSTEM "next2.dtd"> > %ENTITY2; > <!ENTITY % ENTITY3 SYSTEM "next3.dtd"> > %ENTITY3; > ... > > If I reference MyDtd.dtd as it is (i.e. no path), the above (multiple) > dtds will work. If I reference to the dtd file as > some_directory/MyDtd.dtd, the above will not work unless I change > MyDtd.dtd to: > > ... > > <!ENTITY % ENTITY1 SYSTEM "some_directory/next1.dtd"> > %ENTITY1; > <!ENTITY % ENTITY2 SYSTEM "some_directory/next2.dtd"> > %ENTITY2; > <!ENTITY % ENTITY3 SYSTEM "some_directory/next3.dtd"> > %ENTITY3; > ... > > For practical reason, I can't change the DTD files simple because I can't > offer to change hundreds of dtds when the file (path) structure changes > later. > > My question is: > > Is there any way, say set a parameter, to let the XML4J know where to look > for the DTD files (i.e. set up a base path). > > or > > Is there any way, in DTD to set up the base path? > > or > > any other way to achieve the goal. > > In short, I want to find a way to do something like > > XML4J.mathod(some_directory/MyDtd.dtd) where MyDtd.dtd is the first dtd > above. > > (if I do XML4J.mathod(MyDtd.dtd) where MyDtd.dtd is the first dtd above or > if I do XML4J.mathod(some_directory/MyDtd.dtd) where MyDtd.dtd is the > second dtd above, both will work). > > Thanks. > > Jian > > > > > ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html