当前位置: 首页>>代码示例>>C#>>正文


C# XmlQualifiedName类代码示例

本文整理汇总了C#中XmlQualifiedName的典型用法代码示例。如果您正苦于以下问题:C# XmlQualifiedName类的具体用法?C# XmlQualifiedName怎么用?C# XmlQualifiedName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XmlQualifiedName类属于命名空间,在下文中一共展示了XmlQualifiedName类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddParam

		public void AddParam(String name, String namespaceUri, Object parameter)
		{
			XmlQualifiedName qName;

			if(namespaceUri == null)
			{
				throw new ArgumentException("namespaceUri");
			}
			if(namespaceUri == "http://www.w3.org/1999/XSL/Transform")
			{
				throw new ArgumentException("namespaceUri");
			}
			if(name == null)
			{
				throw new ArgumentException("name");
			}

			qName = new XmlQualifiedName(name, namespaceUri);
			if(parameters.Contains(qName))
			{
				throw new ArgumentException("namespaceUri");
			}
			parameter = ValidateParam(parameter);
			parameters[qName] = parameter;
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:25,代码来源:XsltArgumentList.cs

示例2: StartParsing

        internal void StartParsing(XmlReader reader, string targetNamespace, SchemaInfo schemaInfo) {
            this.reader = reader;
            positionInfo = PositionInfo.GetPositionInfo(reader);
            this.namespaceManager = reader.NamespaceManager;
            if (this.namespaceManager == null) {
                this.namespaceManager = new XmlNamespaceManager(this.nameTable);
                this.isProcessNamespaces = true;
            } 
            else {
                this.isProcessNamespaces = false;
            }
            while (this.reader.NodeType != XmlNodeType.Element && this.reader.Read()) {}

            this.markupDepth = int.MaxValue;
			this.schemaXmlDepth = reader.Depth;
            XmlQualifiedName qname = new XmlQualifiedName(this.reader.LocalName, XmlSchemaDatatype.XdrCanonizeUri(this.reader.NamespaceURI, this.nameTable, this.schemaNames));
            if (this.schemaNames.IsXDRRoot(qname)) {
                Debug.Assert(schemaInfo != null);
                schemaInfo.SchemaType = SchemaType.XDR;
                this.schema = null;
                this.builder = new XdrBuilder(reader, this.namespaceManager, schemaInfo, targetNamespace, this.nameTable, this.schemaNames, this.validationEventHandler);
            }
            else if (this.schemaNames.IsXSDRoot(qname)) {
                if (schemaInfo != null) {
                    schemaInfo.SchemaType = SchemaType.XSD;
                }
                this.schema = new XmlSchema();
                this.schema.BaseUri = reader.BaseURI;
                this.builder = new XsdBuilder(reader, this.namespaceManager, this.schema, this.nameTable, this.schemaNames, this.validationEventHandler);
            }
            else { 
                throw new XmlSchemaException(Res.Sch_SchemaRootExpected, reader.BaseURI, positionInfo.LineNumber, positionInfo.LinePosition);
            }
                
        }
开发者ID:ArildF,项目名称:masters,代码行数:35,代码来源:parser.cs

示例3: AddParam

     	/// <include file='doc\XsltArgumentList.uex' path='docs/doc[@for="XsltArgumentList.AddParam"]/*' />
     	/// <devdoc>
     	///    <para>[To be supplied.]</para>
     	/// </devdoc>
        public void AddParam(string name, string namespaceUri, object parameter) {
            CheckArgumentNull(name        , "name"        );
            CheckArgumentNull(namespaceUri, "namespaceUri");
            CheckArgumentNull(parameter   , "parameter"   );
            ValidateParamNamespace(namespaceUri);

            if (
                parameter is XPathNodeIterator ||
                parameter is XPathNavigator    ||
                parameter is Boolean           ||
                parameter is Double            ||
                parameter is String
            ) {
                // doing nothing
            }
            else if (
                parameter is Int16  || parameter is UInt16 ||
                parameter is Int32  || parameter is UInt32 ||
                parameter is Int64  || parameter is UInt64 ||
                parameter is Single || parameter is Decimal
            ) {
                parameter = XmlConvert.ToXPathDouble(parameter);
            }
            else {
                parameter = parameter.ToString();
            }
            XmlQualifiedName qname = new XmlQualifiedName(name, namespaceUri);
            qname.Verify();
            this.parameters.Add(qname, parameter);
        }
开发者ID:ArildF,项目名称:masters,代码行数:34,代码来源:xsltargumentlist.cs

示例4: RemoveParam

 public object RemoveParam(string name, string namespaceUri)
 {
     XmlQualifiedName qname = new XmlQualifiedName(name, namespaceUri);
     object parameter = _parameters[qname];
     _parameters.Remove(qname);
     return parameter;
 }
开发者ID:Corillian,项目名称:corefx,代码行数:7,代码来源:XsltArgumentList.cs

示例5: GetBuiltInSimpleType

 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public static XmlSchemaSimpleType GetBuiltInSimpleType(XmlQualifiedName qualifiedName)
 {
     if (qualifiedName == null)
     {
         throw new ArgumentNullException(nameof(qualifiedName));
     }
     return DatatypeImplementation.GetSimpleTypeFromXsdType(qualifiedName);
 }
开发者ID:geoffkizer,项目名称:corefx,代码行数:11,代码来源:XmlSchemaType.cs

示例6: XmlQualifiedName

 IDtdAttributeInfo IDtdAttributeListInfo.LookupAttribute(string prefix, string localName) {
     XmlQualifiedName qname = new XmlQualifiedName(localName, prefix);
     SchemaAttDef attDef;
     if (attdefs.TryGetValue(qname, out attDef)) {
         return attDef;
     }
     return null;
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:8,代码来源:SchemaElementDecl.cs

示例7: NameKey

 internal object this[XmlQualifiedName qname] {
     get {
         return table[new NameKey(qname.Name, qname.Namespace)];
     }
     set {
         table[new NameKey(qname.Name, qname.Namespace)] = value;
     }
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:8,代码来源:nametable.cs

示例8: SchemaDeclBase

        protected List<string> values;    // array of values for enumerated and notation types
#endif

        protected SchemaDeclBase(XmlQualifiedName name, string prefix) {
            this.name = name;
            this.prefix = prefix;
#if !SILVERLIGHT
            maxLength = -1;
            minLength = -1;
#endif
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:11,代码来源:SchemaDeclBase.cs

示例9: XmlSerializerNamespaces

 /// <include file='doc\XmlSerializerNamespaces.uex' path='docs/doc[@for="XmlSerializerNamespaces.XmlSerializerNamespaces2"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public XmlSerializerNamespaces(XmlQualifiedName[] namespaces)
 {
     for (int i = 0; i < namespaces.Length; i++)
     {
         XmlQualifiedName qname = namespaces[i];
         Add(qname.Name, qname.Namespace);
     }
 }
开发者ID:ChuangYang,项目名称:corefx,代码行数:12,代码来源:XmlSerializerNamespaces.cs

示例10: XmlSerializerNamespaces

		public XmlSerializerNamespaces(XmlQualifiedName[] namespaces)
			: this()
		{
			foreach(XmlQualifiedName qname in namespaces) 
			{
				this.namespaces.Add (qname.Name, qname);
			}
		}
开发者ID:NuGardt,项目名称:mono,代码行数:8,代码来源:XmlSerializerNamespaces.cs

示例11: BaseValidator

 public BaseValidator(XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, ValidationEventHandler eventHandler) {
     Debug.Assert(schemaCollection == null || schemaCollection.NameTable == reader.NameTable);
     this.reader = reader;
     this.schemaCollection = schemaCollection;
     this.eventHandler = eventHandler;
     nameTable = reader.NameTable;
     positionInfo = PositionInfo.GetPositionInfo(reader);
     elementName = new XmlQualifiedName();
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:9,代码来源:basevalidator.cs

示例12: AddParam

        public void AddParam(string name, string namespaceUri, object parameter) {
            CheckArgumentNull(name        , "name"        );
            CheckArgumentNull(namespaceUri, "namespaceUri");
            CheckArgumentNull(parameter   , "parameter"   );

            XmlQualifiedName qname = new XmlQualifiedName(name, namespaceUri);
            qname.Verify();
            this.parameters.Add(qname, parameter);
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:9,代码来源:XsltArgumentList.cs

示例13: ResolveVariable

        // --------------------------- XsltContext -------------------
        //                Resolving variables and functions

        public override IXsltContextVariable ResolveVariable(string prefix, string name) {
            string namespaceURI = this.LookupNamespace(prefix);
            XmlQualifiedName qname = new XmlQualifiedName(name, namespaceURI);
            IXsltContextVariable variable = this.manager.VariableScope.ResolveVariable(qname);
            if (variable == null) {
                throw XsltException.Create(Res.Xslt_InvalidVariable, qname.ToString());
            }
            return variable;
        }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:12,代码来源:XsltCompileContext.cs

示例14: Replace

 internal void Replace(XmlQualifiedName name,  XmlSchemaObject value) {
     XmlSchemaObject oldValue;
     if (table.TryGetValue(name, out oldValue)) {
         table[name] = value; //set new value
         Debug.Assert(oldValue != null);
         int matchedIndex = FindIndexByValue(oldValue);
         Debug.Assert(entries[matchedIndex].qname == name);
         entries[matchedIndex] = new XmlSchemaObjectEntry(name, value);
     }
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:10,代码来源:XmlSchemaObjectTable.cs

示例15: Init

 private void Init() {
     Debug.Assert(reader != null);
     validationStack = new HWStack(STACK_INCREMENT);
     textValue = new StringBuilder();
     name = XmlQualifiedName.Empty;
     attPresence = new Hashtable();
     schemaInfo = new SchemaInfo();
     checkDatatype = false;
     Push(name);
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:10,代码来源:DtdValidator.cs


注:本文中的XmlQualifiedName类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。