Exemple #1
0
 public override void WriteDocType(string name, string pubid, string sysid, string subset)
 {
     if (_checkNames)
     {
         ValidateQName(name);
     }
     if (_checkValues)
     {
         if (pubid != null)
         {
             int i;
             if ((i = _xmlCharType.IsPublicId(pubid)) >= 0)
             {
                 throw XmlConvert.CreateInvalidCharException(pubid, i);
             }
         }
         if (sysid != null)
         {
             CheckCharacters(sysid);
         }
         if (subset != null)
         {
             CheckCharacters(subset);
         }
     }
     if (_replaceNewLines)
     {
         sysid  = ReplaceNewLines(sysid);
         pubid  = ReplaceNewLines(pubid);
         subset = ReplaceNewLines(subset);
     }
     writer.WriteDocType(name, pubid, sysid, subset);
 }