Title: AW: [Nant-users] Problem when processing XML files...

Hi Gordon,

Thank you very much for your answer!

> 1) As far as proxies, .NET allows you to specify a proxy server in the .config
>    file using the <proxy> element:
>
> <configuration>
>    <system.net>
>       <defaultProxy>
>          <proxy
>             proxyaddress = "http://proxyserver:80"
>             bypassonlocal = "true" />
>       </defaultProxy>
>    </system.net>
> </configuration>
> So you might try adding these settings to nant.exe.config and see if this
> provides a quick workaround.

Well, after trying that, the System.Net.WebException exception disappeared,
but a new one arised (System.InvalidOperationException). Here below is the output:

---------------------------------------------------------------------------------
html:
    [mkdir] Creating directory C:\Home\Projects\t-point\src\doc\softreqs\dist\html
[NAnt.Task:style Generated Exception  - [] <>]
Exception: SourceForge.NAnt.BuildException
Message: C:\Home\Projects\t-point\src\doc\softreqs\softreqs.build(41,6):
 Could not perform XSLT transformation.
Source: NAnt.Core
   at SourceForge.NAnt.Tasks.StyleTask.ExecuteTask()
   at SourceForge.NAnt.Task.Execute()

Nested Exception

Exception: System.InvalidOperationException
Message: The operation is not valid due to the current state of the object.
Source: System.Xml
   at System.Xml.XmlTextReader.ResolveEntity()
   at System.Xml.XPath.XPathDocument.ReadChildNodes(XPathContainer parent, String parentBaseUri, XmlReader reader, PositionInfo positionInfo)

   at System.Xml.XPath.XPathDocument.ReadChildNodes(XPathContainer parent, String parentBaseUri, XmlReader reader, PositionInfo positionInfo)

   at System.Xml.XPath.XPathDocument.Load(XmlReader reader)
   at System.Xml.XPath.XPathDocument..ctor(XmlReader reader)
   at SourceForge.NAnt.Tasks.StyleTask.ExecuteTask()

BUILD FAILED
C:\Home\Projects\t-point\src\doc\softreqs\softreqs.build(41,6):
 Could not perform XSLT transformation.:
SourceForge.NAnt.BuildException: C:\Home\Projects\t-point\src\doc\softreqs\softreqs.build(41,6):
 Could not perform XSLT transformation. ---> System.InvalidOperationException: The operation is not valid due to the current state of the object.

   at System.Xml.XmlTextReader.ResolveEntity()
   at System.Xml.XPath.XPathDocument.ReadChildNodes(XPathContainer parent, String parentBaseUri, XmlReader reader, PositionInfo positionInfo)

   at System.Xml.XPath.XPathDocument.ReadChildNodes(XPathContainer parent, String parentBaseUri, XmlReader reader, PositionInfo positionInfo)

   at System.Xml.XPath.XPathDocument.Load(XmlReader reader)
   at System.Xml.XPath.XPathDocument..ctor(XmlReader reader)
   at SourceForge.NAnt.Tasks.StyleTask.ExecuteTask()
   --- End of inner exception stack trace ---
   at SourceForge.NAnt.Tasks.StyleTask.ExecuteTask()
   at SourceForge.NAnt.Task.Execute()
   at SourceForge.NAnt.Target.Execute()
   at SourceForge.NAnt.Project.Execute(String targetName)
   at SourceForge.NAnt.Project.Execute()
   at SourceForge.NAnt.Project.Run()
System.ApplicationException
   at SourceForge.NAnt.ConsoleDriver.Main(String[] args)
Try 'nant -help' for more information
---------------------------------------------------------------------------------

Here's my target ('html.xsl' refers to the standard
DocBook stylesheet for producing HTML output [docbook.xsl]):

<target name="html" depends="init">
  <mkdir dir="${html.dir}" failonerror="false"/>
  <style style="${html.xsl}" in="${document.name}.xml"
    destdir="${html.dir}" out="${document.name}.html"/>
</target>

Any idea?

Gius_.

Reply via email to