Esempio n. 1
0
        public static string GetGrid(XmlObject obj, int index)
        {
            const string tpl = @"<div class=""ui-xmldoc"" id=""object_%object.key%"">
                                    <h2><a href=""#%object.key%"">%object.index%%object.name%<span class=""key"">(%object.key%)</span></a></h2>
                                    <p class=""descript"">描述:%object.descript%</p>
                                    <p class=""prop"">
                                        <table cellspacing=""1"" cellpadding=""0"">
                                            <tr><th class=""key"">属性键:</th><th class=""name"">属性名称:</th><th class=""descript"">备注:</th></tr>
                                            %object.prop%
                                        </table>
                                    </p>
                               </div>";

            StringBuilder sb = new System.Text.StringBuilder();

            if (obj.Properties != null)
            {
                foreach (XmlObjectProperty p in obj.Properties)
                {
                    sb.Append("<tr><td class=\"key\">").Append(p.Key)
                        .Append("</td><td class=\"name\">").Append(p.Name).Append("</td><td class=\"descript\">")
                        .Append(p.Descript).Append("&nbsp;</td></tr>");
                }
            }

            return tpl.Replace("%object.key%", obj.Key)
                .Replace("%object.index%", index < 1 ? "" : index.ToString())
                .Replace("%object.name%", obj.Name)
                .Replace("%object.descript%", obj.Descript.Replace("\n", "<br />"))
                .Replace("%object.prop%", sb.ToString());
        }
Esempio n. 2
0
		///////////////////////////////////////////////////////////////////////////////////////////////////
		////////////BUILD FROM V1 SCHEMA				 //////////////////////////////////////////////////
		///////////////////////////////////////////////////////////////////////////////////////////////////
		public ItemCore(
				XmlObject createdFrom,
				SdmxStructureType structureType,
				String id,
				String uri,
				IList<Org.Sdmx.Resources.SdmxMl.Schemas.V10.Common.TextType> name,
				IList<Org.Sdmx.Resources.SdmxMl.Schemas.V10.Common.TextType> description,
				Org.Sdmx.Resources.SdmxMl.Schemas.V10.Common.AnnotationsType annotationsType,
				IIdentifiableObject parent) {
		}
Esempio n. 3
0
 public void AddInsertBeforeStep(QueryExpression selectionExpr, XmlObject type, string name, string content)
 {
     this.mod_.addInsertBeforeStep(QueryExpression.ToInternal(selectionExpr), XmlObjectToInt(type), (name == null) ? "" : name, (content == null) ? "" : content);
 }
Esempio n. 4
0
 public void AddAppendStep(QueryExpression selectionExpr, XmlObject type, string name, string content, int location)
 {
     this.mod_.addAppendStep(QueryExpression.ToInternal(selectionExpr), XmlObjectToInt(type), (name == null) ? "" : name, (content == null) ? "" : content, location);
 }
Esempio n. 5
0
        private static int XmlObjectToInt(XmlObject xo)
        {
            switch (xo)
            {
                case XmlObject.Element:
                    return XmlModify.Element;

                case XmlObject.Attribute:
                    return XmlModify.Attribute;

                case XmlObject.Text:
                    return XmlModify.Text;

                case XmlObject.ProcessingInstruction:
                    return XmlModify.ProcessingInstruction;

                case XmlObject.Comment:
                    return XmlModify.Comment;
            }
            throw new Exception("Enumeration not covered in switch: " + xo);
        }
Esempio n. 6
0
		///////////////////////////////////////////////////////////////////////////////////////////////////
		////////////BUILD FROM V2 SCHEMA				 //////////////////////////////////////////////////
		///////////////////////////////////////////////////////////////////////////////////////////////////
		public ItemCore(XmlObject createdFrom,
				SdmxStructureType structureType, String id, String uri,
				IList<TextType> name, IList<TextType> description,
				AnnotationsType annotationsType, IIdentifiableObject parent) : base(createdFrom, structureType, id, uri, name, description, annotationsType, parent) {
		}
Esempio n. 7
0
 public void AddInsertBeforeStep(QueryExpression selectionExpr, XmlObject type, string name, string content)
 {
     this.mod_.addInsertBeforeStep(QueryExpression.ToInternal(selectionExpr), XmlObjectToInt(type), (name == null) ? "" : name, (content == null) ? "" : content);
 }
Esempio n. 8
0
 public void AddAppendStep(QueryExpression selectionExpr, XmlObject type, string name, string content, int location)
 {
     this.mod_.addAppendStep(QueryExpression.ToInternal(selectionExpr), XmlObjectToInt(type), (name == null) ? "" : name, (content == null) ? "" : content, location);
 }