// Token: 0x06002CED RID: 11501 RVA: 0x000CAB00 File Offset: 0x000C8D00 public XpsSchemaValidator(XpsValidatingLoader loader, XpsSchema schema, ContentType mimeType, Stream objectStream, Uri packageUri, Uri baseUri) { XmlReader xmlReader = new XpsSchemaValidator.XmlEncodingEnforcingTextReader(objectStream) { ProhibitDtd = true, Normalization = true }; string[] array = XpsSchemaValidator._predefinedNamespaces; if (!string.IsNullOrEmpty(schema.RootNamespaceUri)) { array = new string[XpsSchemaValidator._predefinedNamespaces.Length + 1]; array[0] = schema.RootNamespaceUri; XpsSchemaValidator._predefinedNamespaces.CopyTo(array, 1); } xmlReader = new XmlCompatibilityReader(xmlReader, array); xmlReader = XmlReader.Create(xmlReader, schema.GetXmlReaderSettings()); if (schema.HasUriAttributes(mimeType) && packageUri != null && baseUri != null) { xmlReader = new XpsSchemaValidator.RootXMLNSAndUriValidatingXmlReader(loader, schema, xmlReader, packageUri, baseUri); } else { xmlReader = new XpsSchemaValidator.RootXMLNSAndUriValidatingXmlReader(loader, schema, xmlReader); } this._compatReader = xmlReader; }
XpsSchemaValidator( XpsValidatingLoader loader, XpsSchema schema, ContentType mimeType, Stream objectStream, Uri packageUri, Uri baseUri ) { XmlTextReader xmlTextReader = new XmlEncodingEnforcingTextReader(objectStream); xmlTextReader.ProhibitDtd = true; xmlTextReader.Normalization = true; XmlReader xmlReader = xmlTextReader; string [] predefinedNamespaces = _predefinedNamespaces; if (!string.IsNullOrEmpty(schema.RootNamespaceUri)) { predefinedNamespaces = new string[_predefinedNamespaces.Length + 1]; predefinedNamespaces[0] = schema.RootNamespaceUri; _predefinedNamespaces.CopyTo(predefinedNamespaces, 1); } xmlReader = new XmlCompatibilityReader(xmlReader, predefinedNamespaces); xmlReader = XmlReader.Create(xmlReader, schema.GetXmlReaderSettings()); if (schema.HasUriAttributes(mimeType) && packageUri != null && baseUri != null) { xmlReader = new RootXMLNSAndUriValidatingXmlReader(loader, schema, xmlReader, packageUri, baseUri); } else { xmlReader = new RootXMLNSAndUriValidatingXmlReader(loader, schema, xmlReader); } _compatReader = xmlReader; }
XpsSchemaValidator( XpsValidatingLoader loader, XpsSchema schema, ContentType mimeType, Stream objectStream, Uri packageUri, Uri baseUri ) { XmlTextReader xmlTextReader = new XmlEncodingEnforcingTextReader(objectStream); xmlTextReader.ProhibitDtd = true; xmlTextReader.Normalization = true; XmlReader xmlReader = xmlTextReader; string [] predefinedNamespaces = _predefinedNamespaces; if ( !string.IsNullOrEmpty(schema.RootNamespaceUri) ) { predefinedNamespaces = new string[_predefinedNamespaces.Length + 1]; predefinedNamespaces[0] = schema.RootNamespaceUri; _predefinedNamespaces.CopyTo(predefinedNamespaces, 1); } xmlReader = new XmlCompatibilityReader(xmlReader, predefinedNamespaces); xmlReader = XmlReader.Create(xmlReader, schema.GetXmlReaderSettings()); if (schema.HasUriAttributes(mimeType) && packageUri != null && baseUri != null) { xmlReader = new RootXMLNSAndUriValidatingXmlReader(loader, schema, xmlReader, packageUri, baseUri); } else { xmlReader = new RootXMLNSAndUriValidatingXmlReader(loader, schema, xmlReader); } _compatReader = xmlReader; }