Inheritance: Rhino.IdScriptableObject
Exemplo n.º 1
0
		internal static Rhino.Xmlimpl.QName Create(XMLLibImpl lib, Scriptable scope, Rhino.Xmlimpl.QName prototype, Rhino.Xmlimpl.XmlNode.QName delegate_)
		{
			Rhino.Xmlimpl.QName rv = new Rhino.Xmlimpl.QName();
			rv.lib = lib;
			rv.SetParentScope(scope);
			rv.prototype = prototype;
			rv.SetPrototype(prototype);
			rv.delegate_ = delegate_;
			return rv;
		}
Exemplo n.º 2
0
		internal Rhino.Xmlimpl.QName NewQName(XMLLibImpl lib, string q_uri, string q_localName, string q_prefix)
		{
			Rhino.Xmlimpl.QName prototype = this.prototype;
			if (prototype == null)
			{
				prototype = this;
			}
			Rhino.Xmlimpl.XmlNode.Namespace ns = null;
			if (q_prefix != null)
			{
				ns = Rhino.Xmlimpl.XmlNode.Namespace.Create(q_prefix, q_uri);
			}
			else
			{
				if (q_uri != null)
				{
					ns = Rhino.Xmlimpl.XmlNode.Namespace.Create(q_uri);
				}
				else
				{
					ns = null;
				}
			}
			if (q_localName != null && q_localName.Equals("*"))
			{
				q_localName = null;
			}
			return Create(lib, this.GetParentScope(), prototype, Rhino.Xmlimpl.XmlNode.QName.Create(ns, q_localName));
		}
Exemplo n.º 3
0
		private void ExportToScope(bool @sealed)
		{
			xmlPrototype = NewXML(Rhino.Xmlimpl.XmlNode.CreateText(options, string.Empty));
			xmlListPrototype = NewXMLList();
			namespacePrototype = Namespace.Create(this.globalScope, null, Rhino.Xmlimpl.XmlNode.Namespace.GLOBAL);
			qnamePrototype = QName.Create(this, this.globalScope, null, Rhino.Xmlimpl.XmlNode.QName.Create(Rhino.Xmlimpl.XmlNode.Namespace.Create(string.Empty), string.Empty));
			xmlPrototype.ExportAsJSClass(@sealed);
			xmlListPrototype.ExportAsJSClass(@sealed);
			namespacePrototype.ExportAsJSClass(@sealed);
			qnamePrototype.ExportAsJSClass(@sealed);
		}
Exemplo n.º 4
0
		internal virtual void SetName(QName name)
		{
			//    See ECMA357 13.4.4.35
			if (IsText() || IsComment())
			{
				return;
			}
			if (IsProcessingInstruction())
			{
				//    Spec says set the name URI to empty string and then set the [[Name]] property, but I understand this to do the same
				//    thing, unless we allow colons in processing instruction targets, which I think we do not.
				this.node.SetLocalName(name.LocalName());
				return;
			}
			node.RenameNode(name.GetDelegate());
		}