Added CascadingAdapter to be able to chain data sources. Very useful in web situations.
[castle.git] / Experiments / IronPythonViewEngine / Castle.MonoRail.Views.IronView / IElementProcessor.cs
blobf05efe28298a350eec85aeaea6053f4e0da4329b
1 // Copyright 2004-2007 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle.MonoRail.Views.IronView
17 using System;
18 using System.Xml;
20 /// <summary>
21 /// Allows implementation of custom processor
22 /// to be invoked by the parser
23 /// </summary>
24 public interface IElementProcessor
26 /// <summary>
27 /// Implementors should return true if they
28 /// can handle the Processing instruction
29 /// </summary>
30 /// <param name="name">instruction's name</param>
31 /// <param name="value">instruction's value</param>
32 /// <returns><c>true</c> if the processor handles it</returns>
33 bool CanHandlePI(String name, String value);
35 /// <summary>
36 /// Implementors should return true if they
37 /// can handle the element.
38 /// </summary>
39 /// <param name="parser">parser instance</param>
40 /// <param name="reader">XmlReader instance</param>
41 /// <returns><c>true</c> if the processor handles it</returns>
42 bool CanHandleElement(ITemplateParser parser, XmlReader reader);
44 /// <summary>
45 /// Pendent
46 /// </summary>
47 /// <param name="parser"></param>
48 /// <param name="context"></param>
49 void ProcessPI(ITemplateParser parser, ITemplateContext context);
51 /// <summary>
52 /// Pendent
53 /// </summary>
54 /// <param name="parser"></param>
55 /// <param name="context"></param>
56 void ProcessElement(ITemplateParser parser, ITemplateContext context);