I'm surprised this still hasn't been fixed in the latest release. I pulled
down the schema
from http://nant.sf.net/release/0.91/nant.xsd (date 10/22/2011), and it
still does properly
define the 'filterchain' element. For those who might benefit, just replace
the existing
complexType definition for FilterChain in the xsd with this block of XML
and place it
under "C:\Program Files\Microsoft Visual Studio x.y\XML\Schemas:

  <xs:complexType name="NAnt.Core.Types.Token">
    <xs:attribute name="key" use="required"/>
    <xs:attribute name="value" use="required"/>
  </xs:complexType>
  <xs:complexType name="NAnt.Core.Filters.ExpandProperties"/>
  <xs:complexType name="NAnt.Core.Filters.ReplaceString">
    <xs:attribute name="from" use="required"/>
    <xs:attribute name="to" use="optional"/>
    <xs:attribute name="ignorecase" use="optional"/>
  </xs:complexType>
  <xs:complexType name="NAnt.Core.Filters.ReplaceTokens">
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element minOccurs="0" maxOccurs="unbounded" name="token"
type="nant:NAnt.Core.Types.Token"/>
    </xs:sequence>
    <xs:attribute name="begintoken" use="optional"/>
    <xs:attribute name="endtoken" use="optional"/>
    <xs:anyAttribute namespace="##other" processContents="skip"/>
  </xs:complexType>
  <xs:complexType name="NAnt.Core.Filters.TabsToSpaces">
    <xs:attribute name="tablength" use="optional"/>
  </xs:complexType>
  <xs:complexType name="NAnt.Core.Filters.FilterChain">
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element minOccurs="0" maxOccurs="1" name="expandproperties"
type="nant:NAnt.Core.Filters.ExpandProperties"/>
      <xs:element minOccurs="0" maxOccurs="1" name="replacestring"
type="nant:NAnt.Core.Filters.ReplaceString"/>
      <xs:element minOccurs="0" maxOccurs="1" name="replacetokens"
type="nant:NAnt.Core.Filters.ReplaceTokens"/>
      <xs:element minOccurs="0" maxOccurs="1" name="tabstospaces"
type="nant:NAnt.Core.Filters.TabsToSpaces"/>
    </xs:sequence>
    <xs:attribute name="encoding" use="optional"/>
    <xs:attribute name="id" use="optional"/>
    <xs:attribute name="refid" use="optional"/>
    <xs:anyAttribute namespace="##other" processContents="skip"/>
  </xs:complexType>

Erhhung

------

I get errors like this a lot.  The schemas are not setup correctly for some
of the elements.  I have had to manually modify my schema to account for
some of these.  That is what I recommend.

Brian Wilson

From: Macdiarmid, James D. [mailto:JAMES.D.MACDIARMID@...]
Sent: Friday, July 15, 2011 9:10 AM
Subject: [NAnt-users] Invalid Child Element 'ReplaceTokens" warning

Is anyone else getting this warning?   I started getting this when I
updated my schema to use in VS2008 for intellisense.

"The element 'filterchain' in namespace '
http://nant.sf.net/release/0.85/nant.xsd' has invalid child element
'replacetokens' in namespace 'http://nant.sf.net/release/0.85/nant.xsd'.
List of possible elements expected: 'filter' in namespace '
http://nant.sf.net/release/0.85/nant.xsd'."

Thanks,
Jim
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to