FpML
/// <summary> /// Extracts the data from the DOM tree below the indicated context /// <see cref="XmlElement"/> and create a suitable <see cref="HandCoded.Meta.Release"/> /// structure to add to the indicated <see cref="HandCoded.Meta.Specification"/>. /// </summary> /// <param name="specification">The owning <see cref="HandCoded.Meta.Specification"/>.</param> /// <param name="context">The context <see cref="XmlElement"/> containing data</param> /// <param name="loadedSchemas">A dictionary of all ready loaded schemas.</param> public override void LoadData(HandCoded.Meta.Specification specification, XmlElement context, Dictionary<string, HandCoded.Meta.SchemaRelease> loadedSchemas) { XmlAttribute id = context.GetAttributeNode ("id"); SchemaRelease release = new SchemaRelease (specification, GetVersion (context), GetNamespaceUri (context), GetSchemaLocation (context), GetPreferredPrefix (context), GetAlternatePrefix (context), new FpMLInstanceInitialiser (), new FpMLSchemaRecogniser (), GetRootElements (context), GetSchemeDefaults (context), GetSchemeCollection (context)); HandleImports (release, context, loadedSchemas); if (id != null) loadedSchemas.Add (id.Value, release); }
/// <summary> /// Extracts the data from the DOM tree below the indicated context /// <see cref="XmlElement"/> and create a suitable <see cref="HandCoded.Meta.Release"/> /// structure to add to the indicated <see cref="HandCoded.Meta.Specification"/>. /// </summary> /// <param name="specification">The owning <see cref="HandCoded.Meta.Specification"/>.</param> /// <param name="context">The context <see cref="XmlElement"/> containing data</param> /// <param name="loadedSchemas">A dictionary of all ready loaded schemas.</param> public override void LoadData(HandCoded.Meta.Specification specification, XmlElement context, Dictionary <string, HandCoded.Meta.SchemaRelease> loadedSchemas) { XmlAttribute id = context.GetAttributeNode("id"); SchemaRelease release = new SchemaRelease(specification, GetVersion(context), GetNamespaceUri(context), GetSchemaLocation(context), GetPreferredPrefix(context), GetAlternatePrefix(context), new FpMLInstanceInitialiser(), new FpMLSchemaRecogniser(), GetRootElements(context), GetSchemeDefaults(context), GetSchemeCollection(context)); HandleImports(release, context, loadedSchemas); if (id != null) { loadedSchemas.Add(id.Value, release); } }
/// <summary> /// Constructs a <b>Builder</b> instance attached the root element of /// a new FpML document of the given <see cref="SchemaRelease"/> and /// which has the indicated message type. /// </summary> /// <param name="release">The FpML <see cref="SchemaRelease"/> to construct.</param> /// <param name="type">The document or message type to construct.</param> public Builder(SchemaRelease release, string type) : this(release) { SetAttribute ("xsi:type", type); }
/// <summary> /// Constructs a <b>Builder</b> instance attached the root element of /// a new FpML document of the given <see cref="SchemaRelease"/>. /// </summary> /// <param name="release">The FpML <see cref="SchemaRelease"/> to construct.</param> public Builder(SchemaRelease release) : base(release.NewInstance ("FpML")) { }