Esempio n. 1
0
		public XslKey (Compiler c)
		{
			this.name = c.ParseQNameAttribute ("name");

			c.KeyCompilationMode = true;
			useExpr = c.CompileExpression (c.GetAttribute ("use"));
			if (useExpr == null)
				useExpr = c.CompileExpression (".");

			c.AssertAttribute ("match");
			string matchString = c.GetAttribute ("match");
			this.matchPattern = c.CompilePattern (matchString, c.Input);
			c.KeyCompilationMode = false;
		}
Esempio n. 2
0
 public Sort(Compiler c)
 {
     c.CheckExtraAttributes("sort", new string[]
     {
         "select",
         "lang",
         "data-type",
         "order",
         "case-order"
     });
     this.expr = c.CompileExpression(c.GetAttribute("select"));
     if (this.expr == null)
     {
         this.expr = c.CompileExpression("string(.)");
     }
     this.langAvt      = c.ParseAvtAttribute("lang");
     this.dataTypeAvt  = c.ParseAvtAttribute("data-type");
     this.orderAvt     = c.ParseAvtAttribute("order");
     this.caseOrderAvt = c.ParseAvtAttribute("case-order");
     this.lang         = this.ParseLang(XslAvt.AttemptPreCalc(ref this.langAvt));
     this.dataType     = this.ParseDataType(XslAvt.AttemptPreCalc(ref this.dataTypeAvt));
     this.order        = this.ParseOrder(XslAvt.AttemptPreCalc(ref this.orderAvt));
     this.caseOrder    = this.ParseCaseOrder(XslAvt.AttemptPreCalc(ref this.caseOrderAvt));
 }
Esempio n. 3
0
		public Sort (Compiler c)
		{
			c.CheckExtraAttributes ("sort", "select", "lang", "data-type", "order", "case-order");
			
			expr = c.CompileExpression (c.GetAttribute ("select"));
			if (expr == null)
				expr = c.CompileExpression ("string(.)");
			
			langAvt = c.ParseAvtAttribute ("lang");
			dataTypeAvt = c.ParseAvtAttribute ("data-type");
			orderAvt = c.ParseAvtAttribute ("order");
			caseOrderAvt = c.ParseAvtAttribute ("case-order");
			
			// Precalc whatever we can
			lang = ParseLang (XslAvt.AttemptPreCalc (ref langAvt));
			dataType = ParseDataType (XslAvt.AttemptPreCalc (ref dataTypeAvt));
			order = ParseOrder (XslAvt.AttemptPreCalc (ref orderAvt));
			caseOrder = ParseCaseOrder (XslAvt.AttemptPreCalc (ref caseOrderAvt));
		}