상속: Rhino.Xml.XMLLib
예제 #1
0
		internal void Initialize(XMLLibImpl lib, Scriptable scope, XMLObject prototype)
		{
			SetParentScope(scope);
			SetPrototype(prototype);
			prototypeFlag = (prototype == null);
			this.lib = lib;
		}
예제 #2
0
		public static void Init(Context cx, Scriptable scope, bool @sealed)
		{
			Rhino.Xmlimpl.XMLLibImpl lib = new Rhino.Xmlimpl.XMLLibImpl(scope);
			XMLLib bound = lib.BindToScope(scope);
			if (bound == lib)
			{
				lib.ExportToScope(@sealed);
			}
		}
예제 #3
0
파일: QName.cs 프로젝트: hazzik/Rhino.Net
		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;
		}
예제 #4
0
		protected internal XMLObjectImpl(XMLLibImpl lib, Scriptable scope, XMLObject prototype)
		{
			Initialize(lib, scope, prototype);
		}
예제 #5
0
		internal XMLWithScope(XMLLibImpl lib, Scriptable parent, XMLObject prototype) : base(parent, prototype)
		{
			this.lib = lib;
		}
예제 #6
0
파일: QName.cs 프로젝트: hazzik/Rhino.Net
		internal Rhino.Xmlimpl.QName CastToQName(XMLLibImpl lib, Context cx, object qnameValue)
		{
			if (qnameValue is Rhino.Xmlimpl.QName)
			{
				return (Rhino.Xmlimpl.QName)qnameValue;
			}
			return ConstructQName(lib, cx, qnameValue);
		}
예제 #7
0
파일: QName.cs 프로젝트: hazzik/Rhino.Net
		internal Rhino.Xmlimpl.QName ConstructQName(XMLLibImpl lib, Context cx, object nameValue)
		{
			return ConstructQName(lib, cx, Undefined.instance, nameValue);
		}
예제 #8
0
파일: QName.cs 프로젝트: hazzik/Rhino.Net
		//    See ECMA357 13.3.2
		internal Rhino.Xmlimpl.QName ConstructQName(XMLLibImpl lib, Context cx, object @namespace, object name)
		{
			string nameString = null;
			if (name is Rhino.Xmlimpl.QName)
			{
				if (@namespace == Undefined.instance)
				{
					return (Rhino.Xmlimpl.QName)name;
				}
				else
				{
					nameString = ((Rhino.Xmlimpl.QName)name).LocalName();
				}
			}
			if (name == Undefined.instance)
			{
				nameString = string.Empty;
			}
			else
			{
				nameString = ScriptRuntime.ToString(name);
			}
			if (@namespace == Undefined.instance)
			{
				if ("*".Equals(nameString))
				{
					@namespace = null;
				}
				else
				{
					@namespace = lib.GetDefaultNamespace(cx);
				}
			}
			Namespace namespaceNamespace = null;
			if (@namespace == null)
			{
			}
			else
			{
				//    leave as null
				if (@namespace is Namespace)
				{
					namespaceNamespace = (Namespace)@namespace;
				}
				else
				{
					namespaceNamespace = lib.NewNamespace(ScriptRuntime.ToString(@namespace));
				}
			}
			string q_localName = nameString;
			string q_uri;
			string q_prefix;
			if (@namespace == null)
			{
				q_uri = null;
				q_prefix = null;
			}
			else
			{
				//    corresponds to undefined; see QName class
				q_uri = namespaceNamespace.Uri();
				q_prefix = namespaceNamespace.Prefix();
			}
			return NewQName(lib, q_uri, q_localName, q_prefix);
		}
예제 #9
0
파일: QName.cs 프로젝트: hazzik/Rhino.Net
		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));
		}
예제 #10
0
파일: XML.cs 프로젝트: hazzik/Rhino.Net
		internal XML(XMLLibImpl lib, Scriptable scope, XMLObject prototype, Rhino.Xmlimpl.XmlNode node) : base(lib, scope, prototype)
		{
			Initialize(node);
		}
예제 #11
0
파일: XMLList.cs 프로젝트: hazzik/Rhino.Net
		internal XMLList(XMLLibImpl lib, Scriptable scope, XMLObject prototype) : base(lib, scope, prototype)
		{
			_annos = new Rhino.Xmlimpl.XmlNode.InternalList();
		}