James,

If you're using a 0.85 nightly build, then you should define a namespace
prefixes for "xsl" :

    <xmlpoke ......>
        <namespaces>
            <namespace prefix="xsl"
uri="http://www.w3.org/1999/XSL/Transform"; />
        </namespaces>
    </xmlpoke>

Hope this helps,

Gert


----- Original Message ----- 
From: "James Hafer" <[EMAIL PROTECTED]>
To: "Martin Gainty" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, May 19, 2004 4:31 AM
Subject: RE: [Nant-users] Help with xmlpoke


I tried this:




xpath="/xsl:transform/*/*/*/xsl:for-each/[EMAIL PROTECTED]'Gac']/@refto"



and got this error:





BUILD FAILED



E:\QABuildTree\ATM\is.build(215,10):

Failed to select nodes with XPath expression
'/xsl:transform/*/*/*/xsl:for-each/[EMAIL PROTECTED]'Gac']/@refto'.

 Namespace Manager or XsltContext needed. This query has a  prefix,
variable, or user-defined function.



Total time: 0.1 seconds.





This is the target I'm trying to match:



      ...

      <xsl:for-each select="References/Reference[contains(@refto,
'dbcore')]">

            <Reference type = "Gac" refto = "dbcore, Version=1.1.0.0,
Culture=neutral, PublicKeyToken=1403d50a7683ade0"/>

      </xsl:for-each>

      ...





-----Original Message-----
From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 18, 2004 7:56 PM
To: James Hafer; [EMAIL PROTECTED]
Subject: Re: [Nant-users] Help with xmlpoke



James

The trick is to follow the rules of XPath when evaluating the expression
within xmlpoke

----- Original Message ----- 

From: James <mailto:[EMAIL PROTECTED]>  Hafer

To: [EMAIL PROTECTED]

Sent: Tuesday, May 18, 2004 9:14 PM

Subject: [Nant-users] Help with xmlpoke





Hello,



I need to change version numbers for particular assemblies referenced
within an XML formatted application.config file.



For example, given this XML:



<References>

<xsl:for-each select="References/Reference[contains(@refto, 'dbcore')]">

                  <Reference type = "Gac" refto = "dbcore,
Version=1.1.0.0, Culture=neutral, PublicKeyToken=1403d50a7683ade0"/>

</xsl:for-each>

      <xsl:for-each select="References/Reference[contains(@refto,
'nxunit.framework')]">

                  <Reference type = "Gac" refto= "nxunit.framework,
Version=1.1.0.0, Culture=neutral, PublicKeyToken=1403d50a7683ade0" />

</xsl:for-each>

<xsl:for-each select="References/Reference[contains(@refto, 'nxcore')]"
>

                  <Reference type = "Gac" refto = "nxcore,
Version=1.1.0.0, Culture=neutral, PublicKeyToken=1403d50a7683ade0" />

</xsl:for-each>



How would xmlpoke be used to change the version for nxunit.framework?  I
do not completely understand the syntax if it is even possible to
accomplish.  This is as far as I've gotten:


assuming you will be supplying value correctly try..



        <xmlpoke
file="${is.appsrcdir}\nxstudio\data\ConversionStyleSheets\ConvertPrjx11t
o11a.xsl"

                 value="${configuration.version}"
                 xpath="[EMAIL PROTECTED] =
'Version']/@value"/>

<!--            xpath="/**/References/xsl:for-each/" -->


You can also be particular about what you are selecting with this
statement
<xsl:for-each
select="selectNameBetweenQuotesGoesHere[Version='1.1.0.0']">

HTH,

Martin

(e) <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
(v)617-852-7822













-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to