GetXmlName() private method

private GetXmlName ( string prefix, string localName, string namespaceURI, IXmlSchemaInfo schemaInfo ) : XmlName
prefix string
localName string
namespaceURI string
schemaInfo IXmlSchemaInfo
return XmlName
示例#1
0
 /// <include file='doc\XmlElement.uex' path='docs/doc[@for="XmlElement.XmlElement1"]/*' />
 /// <internalonly/>
 /// <devdoc>
 /// </devdoc>
 protected internal XmlElement(string prefix, string localName, string namespaceURI, XmlDocument doc)
     : this(doc.GetXmlName(prefix, localName, namespaceURI), true, doc)
 {
 }
示例#2
0
 /// <include file='doc\XmlElement.uex' path='docs/doc[@for="XmlElement.XmlElement"]/*' />
 /// <internalonly/>
 /// <devdoc>
 /// </devdoc>
 internal XmlElement(string name, string namespaceURI, XmlDocument doc)
     : this(doc.GetXmlName(name, namespaceURI), true, doc)
 {
 }
示例#3
0
 /// <include file='doc\XmlElement.uex' path='docs/doc[@for="XmlElement.XmlElement1"]/*' />
 /// <internalonly/>
 /// <devdoc>
 /// </devdoc>
 protected internal XmlElement( string prefix, string localName, string namespaceURI, XmlDocument doc ) 
 : this( doc.GetXmlName( prefix, localName, namespaceURI ), true, doc ) {
 }
示例#4
0
        private void LoadDocumentType(XmlValidatingReader vr, XmlDocumentType dtNode)
        {
            SchemaInfo schInfo = vr.GetSchemaInfo();

            if (schInfo != null)
            {
                //set the schema information into the document
                doc.SchemaInformation = schInfo;

                // Notation hashtable
                if (schInfo.Notations != null)
                {
                    foreach (SchemaNotation scNot in schInfo.Notations.Values)
                    {
                        dtNode.Notations.SetNamedItem(new XmlNotation(scNot.Name.Name, scNot.Pubid, scNot.SystemLiteral, doc));
                    }
                }

                // Entity hashtables
                if (schInfo.GeneralEntities != null)
                {
                    foreach (SchemaEntity scEnt in schInfo.GeneralEntities.Values)
                    {
                        XmlEntity ent = new XmlEntity(scEnt.Name.Name, scEnt.Text, scEnt.Pubid, scEnt.Url, scEnt.NData.IsEmpty ? null : scEnt.NData.Name, doc);
                        ent.SetBaseURI(scEnt.DeclaredURI);
                        dtNode.Entities.SetNamedItem(ent);
                    }
                }

                if (schInfo.ParameterEntities != null)
                {
                    foreach (SchemaEntity scEnt in schInfo.ParameterEntities.Values)
                    {
                        XmlEntity ent = new XmlEntity(scEnt.Name.Name, scEnt.Text, scEnt.Pubid, scEnt.Url, scEnt.NData.IsEmpty ? null : scEnt.NData.Name, doc);
                        ent.SetBaseURI(scEnt.DeclaredURI);
                        dtNode.Entities.SetNamedItem(ent);
                    }
                }
                doc.Entities = dtNode.Entities;

                //extract the elements which has attribute defined as ID from the element declarations
                IDictionaryEnumerator elementDecls = schInfo.ElementDecls.GetEnumerator();
                if (elementDecls != null)
                {
                    elementDecls.Reset();
                    while (elementDecls.MoveNext())
                    {
                        SchemaElementDecl elementDecl = (SchemaElementDecl)elementDecls.Value;
                        if (elementDecl.AttDefs != null)
                        {
                            IDictionaryEnumerator attDefs = elementDecl.AttDefs.GetEnumerator();
                            while (attDefs.MoveNext())
                            {
                                SchemaAttDef attdef = (SchemaAttDef)attDefs.Value;
                                if (attdef.Datatype.TokenizedType == XmlTokenizedType.ID)
                                {
                                    doc.AddIdInfo(
                                        doc.GetXmlName(elementDecl.Name.Name, elementDecl.Name.Namespace),
                                        doc.GetXmlName(attdef.Name.Name, attdef.Name.Namespace));
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
示例#5
0
 /// <include file='doc\XmlElement.uex' path='docs/doc[@for="XmlElement.XmlElement"]/*' />
 /// <internalonly/>
 /// <devdoc>
 /// </devdoc>
 internal XmlElement( string name, string namespaceURI, XmlDocument doc )
 : this( doc.GetXmlName( name, namespaceURI ), true, doc ) {
 }