Hello, I can't get xmltask to work. I don't know what I am missing. It says, that it can't find any entries in the named buffer. Please, have a look at the following example.
First, the XHTML source: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Dummy HTML to test the Ant Build</title> </head> <body> <p>This is the first paragraph.</p> <p class="test">This the second. It has class="test".</p> <p>Good Bye.</p> </body> </html> This is the according Ant build.xml: <?xml version="1.0" encoding="UTF-8"?> <project name="build_webpage" basedir="." default="All"> <description>This Ant Build will create the homepage.</description> <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask" /> <target name="All"> <xmltask source="ant_test.html" destbuffer="output" report="true" outputter="simple"> <copy path="/html/body/p[1]/text()" buffer="output" /> <print buffer="output" comment="Copied to 'output' buffer" /> <print path="/html/body/p[2]/text()" comment="/html/body/p[2]/text()" /> </xmltask> </target> </project> and this is the output of "E:\eclipse\plugins\org.apache.ant_1.6.5.200601181600\bin\ant.bat" Unable to locate tools.jar. Expected to find it in E:\Java\jre1.5.0_06\lib\tools.jar Buildfile: build.xml All: [xmltask] Document --> [xmltask] <html xmlns="http://www.w3.org/1999/xhtml"> [xmltask] <head> [xmltask] <title>Dummy HTML to test the Ant Build</title> [xmltask] </head> [xmltask] <body> [xmltask] <p>This is the first paragraph.</p> [xmltask] <p class="test">This the second. It has class="test".</p> [xmltask] <p>Good Bye.</p> [xmltask] </body> [xmltask] </html> [xmltask] Document <-- [xmltask] Couldn't find any entries for buffer 'output' [xmltask] Document --> [xmltask] <html xmlns="http://www.w3.org/1999/xhtml"> [xmltask] <head> [xmltask] <title>Dummy HTML to test the Ant Build</title> [xmltask] </head> [xmltask] <body> [xmltask] <p>This is the first paragraph.</p> [xmltask] <p class="test">This the second. It has class="test".</p> [xmltask] <p>Good Bye.</p> [xmltask] </body> [xmltask] </html> [xmltask] Document <-- [xmltask] Document --> [xmltask] <html xmlns="http://www.w3.org/1999/xhtml"> [xmltask] <head> [xmltask] <title>Dummy HTML to test the Ant Build</title> [xmltask] </head> [xmltask] <body> [xmltask] <p>This is the first paragraph.</p> [xmltask] <p class="test">This the second. It has class="test".</p> [xmltask] <p>Good Bye.</p> [xmltask] </body> [xmltask] </html> [xmltask] Document <-- BUILD SUCCESSFUL Total time: 3 seconds Das Sprungziel - end wurde nicht gefunden. (the batch file had a problem at the end, but it does not matter here) What I do not understand: a) For every additional <print> I add in the build.xml the whole HTML source is being printed. If I leave the second print statement away, than the third [xmltask] Document --> does not appear. b) Why does it not do what I want it to do ? c) While I have the XML prolog and a DOCTYPE declaration in the XHTML xmltask does not consider these when writing to the console. Why ? Thank you very much in advance, Andreas ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Xmltask-users mailing list Xmltask-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xmltask-users