Oh, dunno, I worked out how to do this ages ago, I remember messing around for ages at the time, I just cut and pasted what i'd discovered. since you've got a better solution lets just forget about DTD nastiness.
I think xpointer makes this sort of thing easier, but it's not well supported? On Mon, Jul 01, 2002 at 04:14:29PM +0100, Jules Gosnell wrote: > No go, Neale, > > [java] 2002-07-01 04:07:53 - Exception initializing > TldLocationsCache: XML parsing error on file /WEB-INF/web.xml: (line 3, > col -1): Document root element is missing. > > I have this at the top of the web.xml > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application > 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> > <!DOCTYPE project [<!ENTITY jsp_servlets SYSTEM "jsp_servlets.xml"> > %jsp_servlets;]> > > Should I only have one DOCTYPE directive ? > > > I'll stick with using ant's replace for the moment - it works fine for > this.... > > Thanks for the help, > > > > Jules > > > > Neale Swinnerton wrote: > > Try .... > > > > <!DOCTYPE project [ > > <!ENTITY jsp_mappings SYSTEM "jsp_mappings.xml"> > > %jsp_mappings; > > ]> > > > > and then > > > > &jsp_mappings; > > > > where you need it as before... > > > > > > On Mon, Jul 01, 2002 at 02:59:12PM +0100, Jules Gosnell wrote: > > > >>I checked out the website module to see if I could fix the build.xml to > >>precompile all the JSP pages..... > >> > >>I'm nearly there, but my XML skills are letting me down... > >> > >>I can get Jasper to compile all the JSPs into Java > >>I can compile these into classes. > >> > >>The problem then is that Jasper helpfully generates me an xml snippet > >>containing some <servlet/> and <servlet-mapping/> directives. This needs > >>to be inserted into the web.xml at the correct place. Jasper is then > >>effectively removed from the equation as all mappings are directed > >>straight to precompiled java servlets, instead of through Jasper. > >> > >>I am trying something like: > >> > >><!DOCTYPE name [<!ENTITY jsp_mappings SYSTEM "jsp_mappings.xml">]> > >> > >>at the top of the web.xml amd then : > >> > >>&jsp_mappings; > >> > >>where I want the snippet inserted... (jsp_mappings.xml is in WEB-INF > >>with web.xml) > >> > >>No dice : > >> > >>14:28:44,992 ERROR [XmlFileLoader] Relative URI "jsp_mappings.xml"; can > >>not be resolved without a document URI.:-1:2 > >>org.xml.sax.SAXParseException: Relative URI "jsp_mappings.xml"; can not > >>be resolved without a document URI. > >> at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3108) > >> at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3102) > >> at........ > >> > >>Does this mean that I need to have some sort of custom resolver registered ? > >> > >>All I want to do is #include a piece of xml into an xml file - is there > >>a better way.... > >> > >>Thanks all, > >> > >> > >>Jules > >> > >> > >> > >>------------------------------------------------------- > >>This sf.net email is sponsored by:ThinkGeek > >>Welcome to geek heaven. > >>http://thinkgeek.com/sf > >>_______________________________________________ > >>Jboss-development mailing list > >>[EMAIL PROTECTED] > >>https://lists.sourceforge.net/lists/listinfo/jboss-development > >> > >> > > > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Jboss-development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development > > -- regards Neale Swinnerton ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development