diff --git a/Opc.Ua.ModelCompiler/NodeSetToModelDesign.cs b/Opc.Ua.ModelCompiler/NodeSetToModelDesign.cs index ef1874f..347c9e4 100644 --- a/Opc.Ua.ModelCompiler/NodeSetToModelDesign.cs +++ b/Opc.Ua.ModelCompiler/NodeSetToModelDesign.cs @@ -202,8 +202,8 @@ private static Namespace CreateNamespace(ModelTableEntry model) PublicationDate = model.PublicationDate.ToString("yyyy-MM-ddT00:00:00Z"), Version = model.Version }; - ns.XmlPrefix = ns.Name; - ns.Name = ns.Name.Replace(".", " "); + ns.XmlPrefix = ns.Prefix = ns.Name; + ns.Name = ns.Name.Replace(".", ""); } if (ns.Value == Namespaces.OpcUa) @@ -1181,6 +1181,7 @@ private NodeDesign ImportNode(NodeSet.UANode input) output.SymbolicId = m_symbolicIds[input.NodeId]; output.SymbolicName = ImportSymbolicName(input); + output.Extensions = input.Extensions; if (input is UAType) { diff --git a/Opc.Ua.ModelCompiler/UA Model Design.cs b/Opc.Ua.ModelCompiler/UA Model Design.cs index 2f0d185..c2fd2b2 100644 --- a/Opc.Ua.ModelCompiler/UA Model Design.cs +++ b/Opc.Ua.ModelCompiler/UA Model Design.cs @@ -31,6 +31,8 @@ public partial class ModelDesign { private NodeDesign[] itemsField; + private System.Xml.XmlElement[] extensionsField; + private string targetNamespaceField; private string targetVersionField; @@ -91,6 +93,17 @@ public NodeDesign[] Items { } } + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Extension", IsNullable=false)] + public System.Xml.XmlElement[] Extensions { + get { + return this.extensionsField; + } + set { + this.extensionsField = value; + } + } + /// [System.Xml.Serialization.XmlAttributeAttribute()] public string TargetNamespace { @@ -932,6 +945,8 @@ public partial class NodeDesign { private bool defaultAccessRestrictionsFieldSpecified; + private System.Xml.XmlElement[] extensionsField; + private System.Xml.XmlQualifiedName symbolicNameField; private System.Xml.XmlQualifiedName symbolicIdField; @@ -1082,6 +1097,17 @@ public bool DefaultAccessRestrictionsSpecified { } } + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Extension", IsNullable=false)] + public System.Xml.XmlElement[] Extensions { + get { + return this.extensionsField; + } + set { + this.extensionsField = value; + } + } + /// [System.Xml.Serialization.XmlAttributeAttribute()] public System.Xml.XmlQualifiedName SymbolicName { diff --git a/Opc.Ua.ModelCompiler/UA Model Design.xsd b/Opc.Ua.ModelCompiler/UA Model Design.xsd index ac1c8ee..bada756 100644 --- a/Opc.Ua.ModelCompiler/UA Model Design.xsd +++ b/Opc.Ua.ModelCompiler/UA Model Design.xsd @@ -50,6 +50,7 @@ + @@ -148,6 +149,18 @@ + + + + + + + + + + + + @@ -250,6 +263,7 @@ +