Example #1
0
 /// <summary> This method selects the string representing XPath expression
 /// Usually evalXPath is called afterwards
 /// </summary>
 /// <param name="s">
 /// </param>
 /// <throws>  XPathParseException </throws>
 public void  selectXPath(System.String s)
 {
     try
     {
         com.ximpleware.xpath.parser p = new com.ximpleware.xpath.parser(new System.IO.StringReader(s));
         p.ht = ht;
         xpe  = (com.ximpleware.xpath.Expr)p.parse().value;
         ft   = true;
     }
     catch (System.Exception e)
     {
         //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.toString' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
         throw new XPathParseException(e.ToString());
     }
 }
Example #2
0
 /// <summary>
 /// declare variable references
 /// </summary>
 /// <param name="varName"></param>
 /// <param name="varExpr"></param>
 public void declareVariableExpr(String varName, String varExpr)
 {
     try
     {
         com.ximpleware.xpath.parser p = new com.ximpleware.xpath.parser(new System.IO.StringReader(varExpr));
         p.nsHash            = nsHash;
         p.symbolHash        = symbolHash;
         xpe                 = (com.ximpleware.Expr)p.parse().value;
         symbolHash[varName] = xpe;
         ft = true;
     }
     catch (XPathParseException e)
     {
         //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.toString' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
         Console.WriteLine("Syntax error after  ==>" + varExpr.Substring(0, e.getOffset()));
         throw new XPathParseException(e.ToString());
     }
     catch (System.Exception e)
     {
         Console.WriteLine("error occurred");
         throw new XPathParseException(e.ToString());
     }
 }
Example #3
0
 /// <summary> This method selects the string representing XPath expression
 /// Usually evalXPath is called afterwards
 /// </summary>
 /// <param name="s">
 /// </param>
 /// <throws>  XPathParseException </throws>
 public void  selectXPath(System.String s)
 {
     try
     {
         com.ximpleware.xpath.parser p = new com.ximpleware.xpath.parser(new System.IO.StringReader(s));
         p.nsHash     = nsHash;
         p.symbolHash = symbolHash;
         xpe          = (com.ximpleware.Expr)p.parse().value;
         ft           = true;
         if (cachingEnabled)
         {
             xpe.markCacheable();
         }
     }
     catch (XPathParseException e)
     {
         //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.toString' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
         Console.WriteLine("Syntax error after  ==>" + s.Substring(0, e.getOffset()));
         throw new XPathParseException(e.ToString());
     }
     catch (System.Exception e) {
         throw new XPathParseException(e.ToString());
     }
 }
Example #4
0
		/// <summary> This method selects the string representing XPath expression
		/// Usually evalXPath is called afterwards
		/// </summary>
		/// <param name="s">
		/// </param>
		/// <throws>  XPathParseException </throws>
		public void  selectXPath(System.String s)
		{			
			try
			{
				com.ximpleware.xpath.parser p = new com.ximpleware.xpath.parser(new System.IO.StringReader(s));
				p.nsHash = nsHash;
                p.symbolHash = symbolHash;
				xpe = (com.ximpleware.Expr) p.parse().value;
                ft = true;
                if (cachingEnabled)
                    xpe.markCacheable();
			}
			catch (XPathParseException e)
			{
				//UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.toString' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
                Console.WriteLine("Syntax error after  ==>" + s.Substring(0, e.getOffset()));
                throw new XPathParseException(e.ToString());
			}
            catch (System.Exception e){
                throw new XPathParseException(e.ToString());
            }
		}
Example #5
0
 /// <summary>
 /// declare variable references
 /// </summary>
 /// <param name="varName"></param>
 /// <param name="varExpr"></param>
 public void declareVariableExpr(String varName, String varExpr)
 {
    
     try
     {
         com.ximpleware.xpath.parser p = new com.ximpleware.xpath.parser(new System.IO.StringReader(varExpr));
         p.nsHash = nsHash;
         p.symbolHash = symbolHash;
         xpe = (com.ximpleware.Expr)p.parse().value;
         symbolHash[varName] = xpe;
         ft = true;
     }
     catch (XPathParseException e)
     {
         //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.toString' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
         Console.WriteLine("Syntax error after  ==>" + varExpr.Substring(0, e.getOffset()));
         throw new XPathParseException(e.ToString());
     }
     catch (System.Exception e)
     {
         Console.WriteLine("error occurred");
         throw new XPathParseException(e.ToString());
     }
 }
Example #6
0
		/// <summary> This method selects the string representing XPath expression
		/// Usually evalXPath is called afterwards
		/// </summary>
		/// <param name="s">
		/// </param>
		/// <throws>  XPathParseException </throws>
		public void  selectXPath(System.String s)
		{
			
			try
			{
				com.ximpleware.xpath.parser p = new com.ximpleware.xpath.parser(new System.IO.StringReader(s));
				p.ht = ht;
				xpe = (com.ximpleware.xpath.Expr) p.parse().value;
                ft = true;
			}
			catch (System.Exception e)
			{
				//UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.toString' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
				throw new XPathParseException(e.ToString());
			}
		}
Example #7
0
 /** Constructor */
 public CUP_parser_actions(parser t_parser)
 {
     this.my_parser = t_parser;
 }