Drat - accidentally pressed send before email was complete. Please see changes inline...
On Fri, 2006-01-13 at 23:46 +1300, Simon Kitching wrote: > Hmm.. > > The original files (eg impl/src/main/tld/myfaces_core.tld) don't have > any xmlns declaration in them. It does have this: > <!DOCTYPE taglib > PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" > "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd" [ > It also has xml entity references that need expanding. > > However after processing to expand the xml entities, the resulting > "expanded" files do have an xmlns declarations on the base <taglib> > element, because the referenced DTD has this: > > <!ELEMENT taglib (tlib-version, jsp-version, short-name, uri?, > display-name?, small-icon?, large-icon?, description?, > validator?, listener*, tag+) > > > <!ATTLIST taglib id ID #IMPLIED > xmlns CDATA #FIXED > "http://java.sun.com/JSP/TagLibraryDescriptor"> > > > This all seems valid to me, though I've not seen a DTD declare an xmlns for > an element before. > Still, whether it's explicitly provided inline or implicitly inserted by the > DTD, the effect is the same. > > When the tlddoc application v1.3 is run on this expanded file, the following > results: > com.sun.tlddoc.GeneratorException: Error: myfaces_core.tld does not have > xmlns="http://java.sun.com/xml/ns/javaee" > > I've confirmed that manually changing the xmlns declaration in the input tld > file to the one above does allow the file to be processed. > Deleting it also has the same effect; presumably because the tlddoc > application registers an internal DTD file with public > identifier " [continued] Deleting it also has the same effect. > All the above seems to me to imply that v1.3 of tlddoc does not support > JSP1.2 tag libraries. So we shouldn't be using that version of tlddoc. > Unforunately I tested v1.2 of tlddoc, and got the same error (wants > ns/javaee). And version 1.1 of tlddoc appears to want a <taglib> tag > with no associated namespace at all. > > Regardless, I can't see any problem with what MyFaces is doing; it looks like > either a stuffup in the tlddoc project or > a stuffup in the sun web-jsptaglibrary_1_2.dtd file. Normally, an app that parses an xml file will bundle its own version of any needed DTD, and map the public id to that local copy so that parsing can occur without needing internet access. I suspected from the above that tlddoc.jar was bundling a .dtd inconsistent with the one available from the sun url (and the one bundled with myfaces). Oddly, though, searching the tlddoc.jar file shows it includes *no* dtd files at all. Regards, Simon
