internal void WriteQualifiedNameInternal(string localName, string ns)
{
if (localName == null || localName == String.Empty)
{
throw new ArgumentException();
}
if (ns == null)
{
ns = String.Empty;
}
#if NET_2_0
if (Settings != null)
{
switch (Settings.ConformanceLevel)
{
case ConformanceLevel.Document:
case ConformanceLevel.Fragment:
XmlConvert.VerifyNCName(localName);
break;
}
}
else
{
XmlConvert.VerifyNCName(localName);
}
#else
XmlConvert.VerifyNCName(localName);
#endif
string prefix = ns.Length > 0 ? LookupPrefix(ns) : String.Empty;
if (prefix == null)
{
throw new ArgumentException(String.Format("Namespace '{0}' is not declared.", ns));
}
if (prefix != String.Empty)
{
WriteString(prefix);
WriteString(":");
WriteString(localName);
}
else
{
WriteString(localName);
}
}