The SchemaRelease adds FpML specific knowledge to the base HandCoded.Meta.SchemaRelease. It ensures that the FpML element is automatically assigned the correct version identifier and holds a reference to a schemes description for the release.
Inheritance: HandCoded.Meta.SchemaRelease, ISchemeAccess
        /// <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);
        }
Ejemplo n.º 2
0
        /// <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);
            }
        }
Ejemplo n.º 3
0
 /// <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);
 }
Ejemplo n.º 4
0
 /// <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"))
 {
 }