Kevin,
 
Try using this :
 
<project name="test" default="build">
 <target name="build">
  <xmlpoke file="test.xml" xpath="/Commands/@xsi:noNamespaceSchemaLocation" value="d:\Commands.xsd">
   <namespaces>
    <namespace prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance" />
   </namespaces>
  </xmlpoke>
 </target>
</project>
 
Gert


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Kirkpatrick
Sent: donderdag 3 februari 2005 22:39
To: nant-users@lists.sourceforge.net
Subject: [Nant-users] Help with XMLPoke

Has anyone successfully xmlpoked the value of xsi:noNamespaceSchemaLocation?

 

Here is my definition.

<?xml version="1.0" encoding="utf-8" ?>

- <Commands xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:noNamespaceSchemaLocation="Path Value">

….

</Commands>

 

Result from XMLPoke

Failed to select nodes with XPath _expression_ '//*[namespace::*]/@xsi:noNamespaceSchemaLocation'.

    Prefix 'xsi' is not defined.

 

Thanks in advance.

 

-----Original Message-----
Sent: Monday, January 31, 2005 7:10 PM
To: nant-users@lists.sourceforge.net
Subject: [Nant-users] Help with XMLPoke

 

I’m trying to poke this Xpath query and I’m getting an error saying: prefix ‘xsi’ not defined.

Has anyone had trouble with this?

 

//*[namespace::*]/@xsi:noNamespaceSchemaLocation

 

-----------------

BUILD FAILED

 

D:\PolicyServices\BuildFiles\PolicyServices.build(412,4):

Failed to select nodes with XPath _expression_ '//*[namespace::*]/@xsi:noNamespaceSchemaLocation'.

    Prefix 'xsi' is not defined.

 

Total time: 21.7 seconds.

----------

Sample input .xml

<?xml version="1.0" encoding="utf-8" ?>

- <Commands xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Value that needs pokin">

…………..

 

Reply via email to