public override void Evaluate(XslTransformProcessor p) { if (p.Debugger != null) { p.Debugger.DebugExecute(p, this.DebugInput); } // Since namespace-alias might be determined after compilation // of import-ing stylesheets, this must be determined later. bool isCData = p.InsideCDataElement; p.PushElementState(prefix, localname, nsUri, true); p.Out.WriteStartElement(prefix, localname, nsUri); if (useAttributeSets != null) { foreach (XmlQualifiedName s in useAttributeSets) { p.ResolveAttributeSet(s).Evaluate(p); } } if (attrs != null) { int len = attrs.Count; for (int i = 0; i < len; i++) { ((XslLiteralAttribute)attrs [i]).Evaluate(p); } } p.OutputLiteralNamespaceUriNodes(nsDecls, null, null); if (children != null) { children.Evaluate(p); } var templateContent = children as XslTemplateContent; if (isEmptyElement || (templateContent != null && templateContent.IsEmptyElement)) { p.Out.WriteEndElement(); } else { p.Out.WriteFullEndElement(); } p.PopCDataState(isCData); }
public override void Evaluate(XslTransformProcessor p) { if (p.Debugger != null) { p.Debugger.DebugExecute(p, base.DebugInput); } bool insideCDataElement = p.InsideCDataElement; p.PushElementState(this.prefix, this.localname, this.nsUri, true); p.Out.WriteStartElement(this.prefix, this.localname, this.nsUri); if (this.useAttributeSets != null) { foreach (XmlQualifiedName name in this.useAttributeSets) { p.ResolveAttributeSet(name).Evaluate(p); } } if (this.attrs != null) { int count = this.attrs.Count; for (int j = 0; j < count; j++) { ((XslLiteralElement.XslLiteralAttribute) this.attrs[j]).Evaluate(p); } } p.OutputLiteralNamespaceUriNodes(this.nsDecls, null, null); if (this.children != null) { this.children.Evaluate(p); } if (this.isEmptyElement) { p.Out.WriteEndElement(); } else { p.Out.WriteFullEndElement(); } p.PopCDataState(insideCDataElement); }
public override void Evaluate (XslTransformProcessor p) { if (p.Debugger != null) p.Debugger.DebugExecute (p, this.DebugInput); // Since namespace-alias might be determined after compilation // of import-ing stylesheets, this must be determined later. bool isCData = p.InsideCDataElement; p.PushElementState (prefix, localname, nsUri, true); p.Out.WriteStartElement (prefix, localname, nsUri); if (useAttributeSets != null) foreach (XmlQualifiedName s in useAttributeSets) p.ResolveAttributeSet (s).Evaluate (p); if (attrs != null) { int len = attrs.Count; for (int i = 0; i < len; i++) ((XslLiteralAttribute)attrs [i]).Evaluate (p); } p.OutputLiteralNamespaceUriNodes (nsDecls, null, null); if (children != null) children.Evaluate (p); var templateContent = children as XslTemplateContent; if (isEmptyElement || (templateContent != null && templateContent.IsEmptyElement)) p.Out.WriteEndElement (); else p.Out.WriteFullEndElement (); p.PopCDataState (isCData); }