Inheritance: Rhino.IdScriptableObject
Ejemplo n.º 1
0
		internal void Initialize(XMLLibImpl lib, Scriptable scope, XMLObject prototype)
		{
			SetParentScope(scope);
			SetPrototype(prototype);
			prototypeFlag = (prototype == null);
			this.lib = lib;
		}
Ejemplo n.º 2
0
		internal void InitAsDotQuery()
		{
			XMLObject prototype = (XMLObject)GetPrototype();
			// XMLWithScope also handles the .(xxx) DotQuery for XML
			// basically DotQuery is a for/in/with statement and in
			// the following 3 statements we setup to signal it's
			// DotQuery,
			// the index and the object being looped over.  The
			// xws.setPrototype is the scope of the object which is
			// is a element of the lhs (XMLList).
			_currIndex = 0;
			_dqPrototype = prototype;
			if (prototype is XMLList)
			{
				XMLList xl = (XMLList)prototype;
				if (xl.Length() > 0)
				{
					SetPrototype((Scriptable)(xl.Get(0, null)));
				}
			}
			// Always return the outer-most type of XML lValue of
			// XML to left of dotQuery.
			_xmlList = lib.NewXMLList();
		}
Ejemplo n.º 3
0
		protected internal XMLObjectImpl(XMLLibImpl lib, Scriptable scope, XMLObject prototype)
		{
			Initialize(lib, scope, prototype);
		}
Ejemplo n.º 4
0
		internal XMLWithScope(XMLLibImpl lib, Scriptable parent, XMLObject prototype) : base(parent, prototype)
		{
			this.lib = lib;
		}
Ejemplo n.º 5
0
		internal object AddXMLObjects(Context cx, XMLObject obj1, XMLObject obj2)
		{
			XMLList listToAdd = NewXMLList();
			if (obj1 is XMLList)
			{
				XMLList list1 = (XMLList)obj1;
				if (list1.Length() == 1)
				{
					listToAdd.AddToList(list1.Item(0));
				}
				else
				{
					// Might be xmlFragment + xmlFragment + xmlFragment + ...;
					// then the result will be an XMLList which we want to be an
					// rValue and allow it to be assigned to an lvalue.
					listToAdd = NewXMLListFrom(obj1);
				}
			}
			else
			{
				listToAdd.AddToList(obj1);
			}
			if (obj2 is XMLList)
			{
				XMLList list2 = (XMLList)obj2;
				for (int i = 0; i < list2.Length(); i++)
				{
					listToAdd.AddToList(list2.Item(i));
				}
			}
			else
			{
				if (obj2 is XML)
				{
					listToAdd.AddToList(obj2);
				}
			}
			return listToAdd;
		}
Ejemplo n.º 6
0
		internal XML(XMLLibImpl lib, Scriptable scope, XMLObject prototype, Rhino.Xmlimpl.XmlNode node) : base(lib, scope, prototype)
		{
			Initialize(node);
		}
Ejemplo n.º 7
0
		internal XMLList(XMLLibImpl lib, Scriptable scope, XMLObject prototype) : base(lib, scope, prototype)
		{
			_annos = new Rhino.Xmlimpl.XmlNode.InternalList();
		}