Great! I will add this to the build and commit the code in cvs soon. Thanks Andy!
fabrizio -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Pruitt Sent: Tuesday, October 14, 2003 7:07 AM To: [EMAIL PROTECTED] Subject: [displaytag-devel] Self documenting tld!! I've written up a jsp 1.2 version of the displaytag.tld. By using the jsp 1.2 dtd, all of the tag reference documentation (http://displaytag.sourceforge.net/tagreference.html) for a custom tag can be generated from the tld itself. In order to stay compatible with j2ee 1.2 containers, I've also included a script that converts a jsp 1.2 TLD to a jsp 1.1 TLD. The HTML attachment is the maven generated tag reference (after the xslt transform). (It probably won't look right without the stylesheets; try generating it yourself or dropping it in the taglib\target\docs dir.) The 1.1 tld is generated to the tld directory, so that it is sent out with the build. HERE'S WHAT TO DO 1) Replace your src/tld with this version. 2) Add the xslt scripts (format-tld.xslt,convert-tld.xslt) in a new directory at src/xslt 3) Before running a Maven build, alter your maven.xml to generate the 1.1 tld and the xdoc file: <preGoal name="xdoc:jelly-transform"> <!-- Major hack - set jaxp properties as they are foobared --> ${systemScope.setProperty('javax.xml.transform.TransformerFactory','org. apac he.xalan.processor.TransformerFactoryImpl')} <xslt style="${maven.src.dir}/xslt/format-tld.xslt" in="${maven.src.dir}/tld/displaytag.tld" out="${maven.docs.src}/tagreference.xml" /> <!-- preprocess faq.fml --> <attainGoal name="faq" /> </preGoal> <!-- add tld to taglib jar --> <postGoal name="java:jar-resources"> <echo message="creating jsp 1.1 version of the tld" /> <!-- Major hack - set jaxp properties as they are foobared --> ${systemScope.setProperty('javax.xml.transform.TransformerFactory','org. apac he.xalan.processor.TransformerFactoryImpl')} <xslt style="${maven.src.dir}/xslt/convert-tld.xslt" in="${maven.src.dir}/tld/displaytag.tld" out="${maven.src.dir}/tld/displaytag_11.tld" /> <echo message="copying ${maven.src.dir}/tld/displaytag.tld to file ${maven.build.dest}/META-INF/displaytag.tld" /> <copy file="${maven.src.dir}/tld/displaytag.tld" tofile="${maven.build.dest}/META-INF/displaytag.tld" /> </postGoal> andy pruitt [EMAIL PROTECTED] [EMAIL PROTECTED] ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ displaytag-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-devel
