Hi Mark, thanks for your help! unfortunately even specifying the namespace-uri doesn't work. I assume this would be equivalent to: path="//{http://www.tibco.com/xmlns}BwBPConfiguration" which I also tried with the same results.
Thanks anyway. Daniele On Mon, Mar 14, 2011 at 7:00 PM, Mark Coffin <mcof...@aalsolutions.com> wrote: > Hi Daniele, > > > Try the following: > > <xmltask > source="O:\Deployments\AMX\TSC_API_FRAMEWORK_EXT\PI_BusinessWorks.xml" > > dest="O:\Deployments\AMX\TSC_API_FRAMEWORK_EXT\PI_BusinessWorks3.xml" > > > <insert path="//*[local-name()='BwBPConfiguration' and > namespace-uri()='http://www.tibco.com/xmlns/pdconfiguration']"> > <![CDATA[ > <pd:MymaxJobs>10</pd:MymaxJobs> > ]]> > </insert> > <uncomment path="//*[local-name()='BwBPConfiguration' and > namespace-uri()='http://www.tibco.com/xmlns/pdconfiguration']/comment()"/> > </xmltask> > > > > > > > Mark Coffin > School Systems > > 1425 Norjohn Court, Unit #1 > Burlington, ON > L7L 0E6 > Canada > > > D: 1 800 668 8486 > F: 905 632 2605 > E: mcof...@aalsolutions.com > > Pearson > Always Learning > Learn more at www.pearsonschoolsystems.com > > > > > -----Original Message----- > From: Daniele Galluccio [mailto:daniele.galluc...@gmail.com] > Sent: Monday, March 14, 2011 2:28 PM > To: xmltask-users@lists.sourceforge.net > Subject: [Xmltask-users] (yet another) namespace issue > > Hi All, > I've been digging all the morning in the mailing list and in internet but > couldn't find anything really useful, so my last resort is to write here and > hope that someone (Brian?) will pick up the issue. > > I am trying to edit an xml file (attached), by uncommenting/adding nodes to > the document. > below is a snippet of the xml file and of the code I am trying to execute via > xmltask. > > <?xml version="1.0" encoding="UTF-8"?> > <DeploymentDescriptors> > <name>Process Archive.par</name> > <version>7</version> > <owner>sgattugari</owner> > <creationDate>1/25/11 12:31 PM</creationDate> [...] > <DeploymentDescriptorFactory> > <name>{http://www.tibco.com/xmlns/checkpoint}BwCheckpoint</name> > > <deploymentDescriptorFactoryClassName>com.tibco.dd.bw.BwCheckpoint</deploymentDescriptorFactoryClassName> > > <deploymentDescriptorXsdFileName>com/tibco/dd/bw/BwCheckpoint.xsd</deploymentDescriptorXsdFileName> > </DeploymentDescriptorFactory> > <chk:BwCheckpoint xmlns:chk="http://www.tibco.com/xmlns/checkpoint"> > <name>TIBCO BusinessWorks Checkpoint Data Repository</name> > > <chk:availableSharedResourceName>/SharedResources/CommonServices/JDBC/IL_ConfigLoader_JDBCConnection</chk:availableSharedResourceName> > > <chk:availableSharedResourceName>/SharedResources/CommonServices/JDBC/SellerMaster_JDBC_Connection</chk:availableSharedResourceName> > <chk:useSharedResource>false</chk:useSharedResource> > <!--<chk:tablePrefix>Process_Ar_86815852</chk:tablePrefix>--> > </chk:BwCheckpoint> > <pd:BwBPConfigurations > xmlns:pd="http://www.tibco.com/xmlns/pdconfiguration"> > <name>TIBCO BusinessWorks Process Configurations</name> > <pd:BwBPConfiguration> > > <pd:processDefinitionName>ESBServices/ConfigLoader/StartUp_Process.process</pd:processDefinitionName> > <pd:isDynamicCallProcess>false</pd:isDynamicCallProcess> > > <pd:processDefinitionStarterName>onStartup</pd:processDefinitionStarterName> > <pd:enabled>true</pd:enabled> > <pd:maxJobs>0</pd:maxJobs> > <pd:activation>true</pd:activation> > <!--<pd:flowLimit>0</pd:flowLimit>--> > </pd:BwBPConfiguration> > [...] > > </DeploymentDescriptors> > > > -------------------------------- > > target: > > <xmltask > source="O:\Deployments\AMX\TSC_API_FRAMEWORK_EXT\PI_BusinessWorks.xml" > > dest="O:\Deployments\AMX\TSC_API_FRAMEWORK_EXT\PI_BusinessWorks3.xml" > > > <insert path="//*[local-name()='BwBPConfiguration']"> > <![CDATA[ > <pd:MymaxJobs>10</pd:MymaxJobs> > ]]> > </insert> > <uncomment path="//*[local-name()='BwBPConfiguration']/comment()"/> > </xmltask> > > > I tried with different synthax stiles (local-name, /:BwBPConfiguration, > //pd:BwBPConfiguration, > //{http://www.tibco.com/xmlns/pdconfiguration}BwBPConfiguration) all withous > success. > The uncomment subtask returns: > [xmltask] Uncommenting <pd:flowLimit>0</pd:flowLimit> > [xmltask] org.xml.sax.SAXParseException: The prefix "pd" for element > "pd:flowLimit" is not bound. > > The insert simply fails with > Failed to add text to insert/paste > Regardless of the way I insert the node (via CDATA or xml) and succeeds if I > remove the pd prefix. > > any hint? > > thanks a lot > Daniele > > > > > ****** CONFIDENTIALITY NOTICE ****** > > NOTICE: This e-mail message and all attachments transmitted with it may > contain legally privileged and confidential information intended solely for > the use of the addressee. If the reader of this message is not the intended > recipient, you are hereby notified that any reading, dissemination, > distribution, copying, or other use of this message or its attachments is > strictly prohibited. If you have received this message in error, please > notify the sender immediately and delete this message from your system. Thank > you. > > > ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Xmltask-users mailing list Xmltask-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xmltask-users