public void Add(XslTemplate template)
        {
            if (template.Name != XmlQualifiedName.Empty)
            {
                if (namedTemplates [template.Name] != null)
                {
                    throw new InvalidOperationException("Named template " + template.Name + " is already registered.");
                }

                namedTemplates [template.Name] = template;
            }

            if (template.Match == null)
            {
                return;
            }

            XslModedTemplateTable tbl = this [template.Mode];

            if (tbl == null)
            {
                tbl = new XslModedTemplateTable(template.Mode);
                Add(tbl);
            }

            tbl.Add(template);
        }
 public void Add(XslModedTemplateTable table)
 {
     if (this [table.Mode] != null)
     {
         throw new InvalidOperationException("Mode " + table.Mode + " is already registered.");
     }
     templateTables.Add(table.Mode, table);
 }
Exemple #3
0
		public void Add (XslModedTemplateTable table)
		{
			if (this [table.Mode] != null)
				throw new InvalidOperationException ("Mode " + table.Mode + " is already registered.");
			templateTables.Add (table.Mode, table);
		}
Exemple #4
0
		public void Add (XslTemplate template)
		{
			if (template.Name != XmlQualifiedName.Empty) {
				if (namedTemplates [template.Name] != null)
					throw new InvalidOperationException ("Named template " + template.Name + " is already registered.");
				
				namedTemplates [template.Name] = template;
			}
			
			if (template.Match == null) return;
			
			XslModedTemplateTable tbl = this [template.Mode];
			if (tbl == null) {
				tbl = new XslModedTemplateTable (template.Mode);
				Add (tbl);
			}

			tbl.Add (template);
		}