예제 #1
0
        public override bool Match(XsltDebuggerContext ctx)
        {
            XPathNavigator last_node = ctx.Session.CustomCache [CustomCacheId] as XPathNavigator;

            XmlNodeWriter w = ctx.Session.Output as XmlNodeWriter;
            XmlNode       n = w != null ? w.Document : null;

            if (n == null)
            {
                return(false);                // it is not ready for debugging.
            }
            if (exp == null)
            {
                exp = n.CreateNavigator().Compile(xpath);
            }

            exp.SetContext(ctx.Session.Debugger.NamespaceManager);
            XPathNodeIterator i = w.Current.CreateNavigator().Select(exp);
            bool next           = last_node == null;

            while (i.MoveNext())
            {
                if (next)
                {
                    ctx.Session.CustomCache [CustomCacheId] = i.Current;
                    return(true);
                }
                else if (i.Current.IsSamePosition(last_node))
                {
                    next = true;
                }
            }
            return(false);
        }
예제 #2
0
        bool Break(XsltDebuggerContext ctx)
        {
            // FIXME: support StepIn,StepNext,StepOut etc.

            foreach (XsltDebuggerBreakpoint bp in breakpoints)
            {
                if (bp.Match(ctx))
                {
                    return(true);
                }
            }
            return(false);
        }
예제 #3
0
		public override bool Match (XsltDebuggerContext ctx)
		{
			XPathNavigator s = ctx.StylesheetElement;
			IXmlLineInfo li = s as IXmlLineInfo;
			if (style != null)
				return s.IsSamePosition (style);
			if (li == null)
				return false;
			else if (base_uri != null && base_uri != s.BaseURI ||
				 line != li.LineNumber ||
				 column != 0 && column != li.LinePosition)
				return false;
			style = s;
			return true;
		}
예제 #4
0
        public override bool Match(XsltDebuggerContext ctx)
        {
            XPathNavigator s  = ctx.StylesheetElement;
            IXmlLineInfo   li = s as IXmlLineInfo;

            if (style != null)
            {
                return(s.IsSamePosition(style));
            }
            if (li == null)
            {
                return(false);
            }
            else if (base_uri != null && base_uri != s.BaseURI ||
                     line != li.LineNumber ||
                     column != 0 && column != li.LinePosition)
            {
                return(false);
            }
            style = s;
            return(true);
        }
예제 #5
0
		public abstract bool Match (XsltDebuggerContext ctx);
예제 #6
0
		public override bool Match (XsltDebuggerContext ctx)
		{
			XPathNavigator last_node = ctx.Session.CustomCache [CustomCacheId] as XPathNavigator;

			XmlNodeWriter w = ctx.Session.Output as XmlNodeWriter;
			XmlNode n = w != null ? w.Document : null;
			if (n == null)
				return false; // it is not ready for debugging.

			if (exp == null)
				exp = n.CreateNavigator ().Compile (xpath);

			exp.SetContext (ctx.Session.Debugger.NamespaceManager);
			XPathNodeIterator i = w.Current.CreateNavigator ().Select (exp);
			bool next = last_node == null;
			while (i.MoveNext ()) {
				if (next) {
					ctx.Session.CustomCache [CustomCacheId] = i.Current;
					return true;
				} else if (i.Current.IsSamePosition (last_node))
					next = true;
			}
			return false;
		}
예제 #7
0
 public abstract bool Match(XsltDebuggerContext ctx);
예제 #8
0
		public XsltExecuteEventArgs (XsltDebuggerContext ctx)
		{
			this.ctx = ctx;
		}
예제 #9
0
 public XsltExecuteEventArgs(XsltDebuggerContext ctx)
 {
     this.ctx = ctx;
 }
예제 #10
0
		bool Break (XsltDebuggerContext ctx)
		{
			// FIXME: support StepIn,StepNext,StepOut etc.

			foreach (XsltDebuggerBreakpoint bp in breakpoints)
				if (bp.Match (ctx))
					return true;
			return false;
		}