1 // Copyright 2004-2007 Castle Project - http://www.castleproject.org/
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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
21 /// Allows implementation of custom processor
22 /// to be invoked by the parser
24 public interface IElementProcessor
27 /// Implementors should return true if they
28 /// can handle the Processing instruction
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);
36 /// Implementors should return true if they
37 /// can handle the element.
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
);
47 /// <param name="parser"></param>
48 /// <param name="context"></param>
49 void ProcessPI(ITemplateParser parser
, ITemplateContext context
);
54 /// <param name="parser"></param>
55 /// <param name="context"></param>
56 void ProcessElement(ITemplateParser parser
, ITemplateContext context
);