Example #1
0
 public static void SetXsiTypeAttr(InternalPrintTicket pt,
                                   XmlElement valueElement,
                                   string xsiType)
 {
     // the attribute is in the format like: xsi:type="xsd:integer"
     valueElement.SetAttribute("type",
                               PrintSchemaNamespaces.xsi,
                               XmlDocQName.GetQName(pt.XmlDoc, PrintSchemaNamespaces.xsd, xsiType));
 }
Example #2
0
        public static XmlElement AddSchemaElementWithNameAttr(InternalPrintTicket pt,
                                                              XmlElement parent,
                                                              string schemaTag,
                                                              string nameAttr)
        {
            string prefix = pt.XmlDoc.DocumentElement.GetPrefixOfNamespace(PrintSchemaNamespaces.Framework);

            XmlElement newNode = pt.XmlDoc.CreateElement(prefix, schemaTag, PrintSchemaNamespaces.Framework);

            if (nameAttr != null)
            {
                newNode.SetAttribute(PrintSchemaTags.Framework.NameAttr,
                                     PrintSchemaNamespaces.FrameworkAttrForXmlDOM,
                                     XmlDocQName.GetQName(pt.XmlDoc, PrintSchemaNamespaces.StandardKeywordSet, nameAttr));
            }

            return((XmlElement)parent.AppendChild(newNode));
        }