public static void Main() { XmlSchema schema = new XmlSchema(); // <xs:notation name="jpeg" public="image/jpeg" system="viewer.exe" /> XmlSchemaNotation notation = new XmlSchemaNotation(); notation.Name = "jpeg"; notation.Public = "image/jpeg"; notation.System = "viewer.exe"; schema.Items.Add(notation); XmlSchemaSet schemaSet = new XmlSchemaSet(); schemaSet.ValidationEventHandler += new ValidationEventHandler(ValidationCallbackOne); schemaSet.Add(schema); schemaSet.Compile(); XmlSchema compiledSchema = null; foreach (XmlSchema schema1 in schemaSet.Schemas()) { compiledSchema = schema1; } XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable()); nsmgr.AddNamespace("xs", "http://www.w3.org/2001/XMLSchema"); compiledSchema.Write(Console.Out, nsmgr); }
} //WriteXmlSchemaGroup() //XmlSchemaNotation public static void WriteXmlSchemaNotation(XmlSchemaNotation notation, XmlTextWriter myXmlTextWriter) { myXmlTextWriter.WriteStartElement("notation", XmlSchema.Namespace); myXmlTextWriter.WriteAttributeString(null, "name", XmlSchema.Namespace, notation.Name); myXmlTextWriter.WriteAttributeString(null, "public", XmlSchema.Namespace, notation.Public); myXmlTextWriter.WriteAttributeString(null, "system", XmlSchema.Namespace, notation.System); myXmlTextWriter.WriteEndElement(); } //WriteXmlSchemaNotation()
public void DumpNotation (XmlSchemaNotation n) { depth++; IndentLine ("**Notation**"); IndentLine ("Name: " + n.Name); depth--; }
internal XSNotationDeclaration(XmlSchemaNotation xmlNotation) { _notation = xmlNotation; if (_notation.Annotation is XmlSchemaAnnotation annotation) { _annotation = XMLSchemaSerializer.CreateXSAnnotation(annotation); _annotation.BindToContainer(RootContainer, this); } }
private static void Equal(XmlSchemaNotation expected, XmlSchemaNotation actual) { throw new NotImplementedException(); }
protected virtual void Visit(XmlSchemaNotation notation) { }