Brian,

Thank you, that fixed the problem. I was wondering about the name space 
issues since the web.xml used an XSD. Could a note about possible name 
space issues be added to the documentation page for xmltask?

Thanks again,
-Eric Dalquist

Brian Agnew wrote:
> Without trying this, I'd guess this is a namespace issue. The xmltask doc
> has an example of matching against namespaces:
>
> <copy path="//*[local-name()='node']" property="count"/>
>
> or you can do:
>
> path="//:node"
>
> (from memory - I can't test at the moment)
>
> Please let me know if this is the issue or not.
>
> Brian
>
> On Thu, August 3, 2006 17:04, Eric Dalquist wrote:
>   
>> I'm trying to use xmltask to insert a generated XML fragment into a
>> web.xml file. I'm attempting to do this using a marker tag in the
>> web.xml and using the <replace> subtask. I get the following error
>> message: "<xmltask> subtasks failed to find matches"
>>
>> The files and task snippets are below.
>>
>> Thank you,
>> -Eric Dalquist
>>
>>
>> My task call is:
>>         <taskdef name="xmltask"
>> classname="com.oopsconsultancy.xmltask.ant.XmlTask">
>>             <classpath refid="compile.classpath"/>
>>         </taskdef>
>>
>>         <xmltask source="${build}/WEB-INF/web.xml"
>> dest="${build}/WEB-INF/merged_web.xml" report="true"
>> failwithoutmatch="true">
>>             <replace path="//web-app/JSPC-GENERATED-XML"
>> withFile="${build}/WEB-INF/generated_partial_web.xml"/>
>>         </xmltask>
>>
>> My web.xml is:
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>
>> <web-app version="2.4"
>>     xmlns="http://java.sun.com/xml/ns/j2ee";
>>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
>>
>>     <display-name>Bookmarks Portlet</display-name>
>>
>>     <context-param>
>>         <param-name>contextConfigLocation</param-name>
>>         <param-value>/WEB-INF/context/applicationContext.xml</param-value>
>>     </context-param>
>>
>>     <listener>
>>
>> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>>     </listener>
>>
>>     <!--
>>      | This servlet is needed by the spring DispatcherPortlet for
>> rendering.
>>      +-->
>>     <servlet>
>>         <servlet-name>ViewRendererServlet</servlet-name>
>>
>> <servlet-class>org.springframework.web.servlet.ViewRendererServlet</servlet-class>
>>         <load-on-startup>1</load-on-startup>
>>     </servlet>
>>
>>     <JSPC-GENERATED-XML/>
>>
>>     <servlet-mapping>
>>         <servlet-name>ViewRendererServlet</servlet-name>
>>         <url-pattern>/WEB-INF/servlet/view</url-pattern>
>>     </servlet-mapping>
>> </web-app>
>>
>> and the XML fragment is:
>>
>> <!--
>> Automatically created by Apache Jakarta Tomcat JspC.
>> Place this fragment in the web.xml before all icon, display-name,
>> description, distributable, and context-param elements.
>> -->
>>
>>     <servlet>
>>
>> <servlet-name>org.apache.jsp.WEB_002dINF.tags.bm.include_jsp</servlet-name>
>>
>> <servlet-class>org.apache.jsp.WEB_002dINF.tags.bm.include_jsp</servlet-class>
>>     </servlet>
>>
>>     <servlet>
>>
>> <servlet-name>org.apache.jsp.WEB_002dINF.jsp.include_jsp</servlet-name>
>>
>> <servlet-class>org.apache.jsp.WEB_002dINF.jsp.include_jsp</servlet-class>
>>     </servlet>
>>
>>     <servlet>
>>
>> <servlet-name>org.apache.jsp.WEB_002dINF.jsp.viewBookmarks_jsp</servlet-name>
>>
>> <servlet-class>org.apache.jsp.WEB_002dINF.jsp.viewBookmarks_jsp</servlet-class>
>>     </servlet>
>>
>>     <servlet-mapping>
>>
>> <servlet-name>org.apache.jsp.WEB_002dINF.tags.bm.include_jsp</servlet-name>
>>         <url-pattern>/WEB-INF/tags/bm/include.jsp</url-pattern>
>>     </servlet-mapping>
>>
>>     <servlet-mapping>
>>
>> <servlet-name>org.apache.jsp.WEB_002dINF.jsp.include_jsp</servlet-name>
>>         <url-pattern>/WEB-INF/jsp/include.jsp</url-pattern>
>>     </servlet-mapping>
>>
>>     <servlet-mapping>
>>
>> <servlet-name>org.apache.jsp.WEB_002dINF.jsp.viewBookmarks_jsp</servlet-name>
>>         <url-pattern>/WEB-INF/jsp/viewBookmarks.jsp</url-pattern>
>>     </servlet-mapping>
>>
>> <!--
>> All session-config, mime-mapping, welcome-file-list, error-page, taglib,
>> resource-ref, security-constraint, login-config, security-role,
>> env-entry, and ejb-ref elements should follow this fragment.
>> -->
>>
>>
>> -------------------------------------------------------------------------
>> 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
>>
>>     
>
>
>   

-------------------------------------------------------------------------
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

Reply via email to