Hi David - Sorry for the delay in replying. The XML under the <insert> will be evaluated as a separate standalone XML document prior to insertion, so that namespace will require a namespace declaration. At least, I suspect that's the case. I've not had a chance to test that.
Brian On Wed, December 19, 2007 00:01, David Parish wrote: > Problems with insert. > > I'm trying this ant task: > > <target name="coachDesignerXSL"> > <echo>Modifying Coach Designer XSL</echo> > <xmltask > > source="${deploy.target.base}/process-server/applications/teamworks.ear/teamworks.war/coachdesigner/transform/CoachDesigner.xsl" > > dest="${deploy.target.base}/process-server/applications/teamworks.ear/teamworks.war/coachdesigner/transform/CoachDesigner.xsl" > preservetype="true" > > > <insert > path="/xsl:stylesheet/xsl:[EMAIL PROTECTED]'head']/xsl:[EMAIL > PROTECTED]'HEAD']/xsl:[EMAIL PROTECTED]'coachDesignerJavascript']" > position="after"> > <![CDATA[ > <xsl:call/> > ]]> > </insert> > </xmltask> > </target> > > > This fails with: > > D:\tree\trunk\deployment\misc\modifyXML-build.xml:211: Failed to add > text to insert/paste > > This works: > > <target name="coachDesignerXSL"> > <echo>Modifying Coach Designer XSL</echo> > <xmltask > > source="${deploy.target.base}/process-server/applications/teamworks.ear/teamworks.war/coachdesigner/transform/CoachDesigner.xsl" > > dest="${deploy.target.base}/process-server/applications/teamworks.ear/teamworks.war/coachdesigner/transform/CoachDesigner.xsl" > preservetype="true" > > > <insert > path="/xsl:stylesheet/xsl:[EMAIL PROTECTED]'head']/xsl:[EMAIL > PROTECTED]'HEAD']/xsl:[EMAIL PROTECTED]'coachDesignerJavascript']" > position="after"> > <![CDATA[ > foo > ]]> > </insert> > </xmltask> > </target> > > if you replace foo with <xslcall/> it works > > yet if you replace foo with <xslts:foo/> it fails > > So something about the namespace qualifier is breaking the insert even > though it is in a cdata. This error is happening BEFORE we even read > in the file and evaluate the xpath. I know this because I entered in a > dummy "bad" path for source and dest and it still generated the same > error. > > Any ideas how I can work around this or what I'm missing? > > thanks, > -Dave > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Xmltask-users mailing list > Xmltask-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xmltask-users > -- Brian Agnew http://www.oopsconsultancy.com OOPS Consultancy Ltd Tel: +44 (0)7720 397526 Fax: +44 (0)20 8682 0012 ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Xmltask-users mailing list Xmltask-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xmltask-users