void OnPIChange(XmlNodeChangedEventArgs e) { XmlProcessingInstruction pi = (XmlProcessingInstruction)e.Node; if (pi.Name == "xml-stylesheet") { if (e.Action == XmlNodeChangedAction.Remove) { // see if there's another! pi = (XmlProcessingInstruction)this.doc.SelectSingleNode("processing-instruction('xml-stylesheet')"); } if (pi != null) { this.xsltFilename = DomLoader.ParseXsltArgs(pi.Data); } } }
void OnPIChange(XmlNodeChangedEventArgs e) { XmlProcessingInstruction pi = (XmlProcessingInstruction)e.Node; if (pi.Name == "xml-stylesheet") { if (e.Action == XmlNodeChangedAction.Remove) { // see if there's another! pi = this._doc.SelectSingleNode("processing-instruction('xml-stylesheet')") as XmlProcessingInstruction; } if (pi != null) { this.XsltFileName = DomLoader.ParseXsltArgs(pi.Data); } else { this.XsltFileName = null; } } else if (pi.Name == "xsl-output") { if (e.Action == XmlNodeChangedAction.Remove) { // see if there's another! pi = this._doc.SelectSingleNode("processing-instruction('xsl-output')") as XmlProcessingInstruction; } if (pi != null) { this.XsltDefaultOutput = DomLoader.ParseXsltOutputArgs(pi.Data); } else { this.XsltDefaultOutput = null; } } }