[Mono-list] Re: Small patch for SoapFormatter

Mike Lipkie mlipkie@attbi.com
Fri, 24 Jan 2003 21:34:45 -0600


Thanks,

I will consider it.  The problem is that only the namespace attribute is a
URI, not other attributes.  I think I would just format the namespace to be
the URI formatted string.

-----Original Message-----
From: mono-list-admin@lists.ximian.com
[mailto:mono-list-admin@lists.ximian.com]On Behalf Of
ginga@kit.hi-ho.ne.jp
Sent: Friday, January 24, 2003 9:18 PM
To: Mike Lipkie
Cc: mono-list@ximian.com
Subject: [Mono-list] Re: Small patch for SoapFormatter


Hello,

> 4)  I also have not looked into the XMLTextWriter but will it update the
XML
> attributes and replace escape characters in the string (i.e. space with
> %20%)?  If not, shoudl this be hard coded in the generation or added to
the
> XMLTextWriter?

Replacing whitespaces with %20 is specific to URIs and it shouldn't be
done by XmlTextWriter itself.


I don't know SOAP well, sorry if I'm missing some points. However,
You might have already considered, you can create XmlSoapWriter that
overrides XmlWriter (as a decorator). For example:

public class XmlSoapWriter : XmlWriter
{
  public XmlWriter writer;
  public XmlSoapWriter (XmlWriter w)
  {
    this.writer = w;
  }

  // It is invoked to write attribute value (and in several cases).
  public override bool WriteString (string value)
  {
    writer.WriteString (NodeType == XmlNodeType.Attribute ?
      value.Replace (" ", "%20") : value);
  }
}

... with wrapping other abstract methods 'writer.XXXmethods(XXXargs)'

Thanks,

-- Atsushi Eno

_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list