protected override void Compile (Compiler c)
		{
			if (c.Debugger != null)
				c.Debugger.DebugCompile (this.DebugInput);

			c.CheckExtraAttributes ("value-of", "select", "disable-output-escaping");

			c.AssertAttribute ("select");
			select = c.CompileExpression (c.GetAttribute ("select"));
			disableOutputEscaping = c.ParseYesNoAttribute ("disable-output-escaping", false);
			if (c.Input.MoveToFirstChild ()) {
				do {
					switch (c.Input.NodeType) {
					case XPathNodeType.Element:
						if (c.Input.NamespaceURI == XsltNamespace)
							goto case XPathNodeType.SignificantWhitespace;
						// otherwise element in external namespace -> ignore
						break;
					case XPathNodeType.Text:
					case XPathNodeType.SignificantWhitespace:
						throw new XsltCompileException ("XSLT value-of element cannot contain any child.", null, c.Input);
					}
				} while (c.Input.MoveToNext ());
			}
		}
Exemple #2
0
		protected override void Compile (Compiler c)
		{
			if (c.Debugger != null)
				c.Debugger.DebugCompile (this.DebugInput);

			c.CheckExtraAttributes ("text", "disable-output-escaping");

			this.text = c.Input.Value;
			
			if (c.Input.NodeType == XPathNodeType.Element)
				this.disableOutputEscaping = c.ParseYesNoAttribute ("disable-output-escaping", false);
		}
Exemple #3
0
		protected override void Compile (Compiler c)
		{
			if (c.Debugger != null)
				c.Debugger.DebugCompile (this.DebugInput);

			c.CheckExtraAttributes ("message", "terminate");

			terminate = c.ParseYesNoAttribute ("terminate", false);
			
			if (!c.Input.MoveToFirstChild ()) return;
			children = c.CompileTemplateContent ();
			c.Input.MoveToParent ();
		}