Bob, et. al.,

I grabbed the install image for CI Factory and scoured the code.  It appears 
like the developers have implemented A LOT of Nant extensions that could be 
useful, including a <largeproperty> element.  As far as I can tell so far, 
<largeproperty> supports both direct XML plain text, or CDATA string content.  
XML content is indicated by a property option.  There is also an option for 
Nant style expansion ( ${ . } ) within the content upon reference.

In the CI Factory Nant extension library, there appear as well to be some 
advanced XML parsing and generation tasks via functions which are more or less 
a pass through to the XmlTextReader / XmlTextWriter in the .NET libraries.  I 
also noticed a reference to an <ifthenelse> task-could be interesting.

In looking through their scripts, it appears that they use the <largeproperty> 
a great deal for generation of HTML code for error messages, e-mail and 
auto-generated web pages.  But, I believe that any well-formed XML will  work.

The question yet to be answered yet is whether there is a practical way to 
parse the <largeproperty> content in a Nant script, to selectively retrieve 
portions of it.  If so, <largeproperty> could be used to pass around structured 
data.  In my case, I simply want to embed structured data in a Nant script that 
will be parsed by an external program.

I haven't tried these out yet, but I'm going to try dumping the CI Factory Nant 
extension DLL in my Nant directory and see if I can get this to work.  I will 
also contact the developers and see if I can get the source code to their Nant 
extension library so we could extract portions as needed.

Ken Parrish
Gomez, Inc.

Examples culled from their scripts:

    <largeproperty name="Alerts.SendMessage.Content">
      <value expand="true" xml="true">
        <html>
          <head>
          </head>
          <body>
            <p>${datetime::now()}</p>
            <p>
              <a href="${UrlToThisBuild}">${CCNetLabel}</a>
            </p>

            <p>${Alerts.Developer.Name},</p>
            <p>Thank you for reducing the number of lines of code from 
${Alerts.ChangePackageSize.Previous.LineCount} to 
${Alerts.ChangePackageSize.LineCount}.</p>
            <br/>
            <p>Cheers,</p>
            <p>Your pal, the build server.</p>
          </body>
        </html>
      </value>
    </largeproperty>

 
    <largeproperty name="Packages.AddCleanUpActions.Block">
      <value xml="false">
        <![CDATA[<call target="SourceControl.CleanGetOfThirdPartyDirectory" />
                <call target="SourceControl.CleanGetOfProductDirectory" />]]>
          </value>
    </largeproperty>









From: Bob Archer [mailto:bob.arc...@amsi.com] 
Sent: Wednesday, June 24, 2009 10:37 AM
To: Parrish, Ken; nant-users@lists.sourceforge.net
Subject: RE: Embedded XML in Nant scripts ...

CI Factory has a "largestring" property which allows you to embed XML IIRC 
correctly. You may be able to snag it.

BOb


From: Parrish, Ken [mailto:kparr...@gomez.com] 
Sent: Wednesday, June 24, 2009 9:47 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Embedded XML in Nant scripts ...

I have a need to embed 'extra' information in a Nant script.  We've developed a 
configuration management database and have various crawlers and update engines, 
one of which parses existing Nant scripts collecting configuration management 
data embedded as <properties> in our build scripts.

There are occasions when it would be useful to insert additional information in 
a build script beyond using just properties.  In particular, snippets of 
structured XML.  I'm using the .NET XMLDocument parser and model to interrogate 
these scripts.

Is there any practical way to embed 'auxilliary' snippets of XML in a Nant 
script?  Does anyone have any other ideas for incorporating snippets of XML in 
a Nant script?

Thanks,

Ken Parrish
Gomez, Inc.

------------------------------------------------------------------------------
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to