KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xalan > trace > SelectionEvent


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 /*
17  * $Id: SelectionEvent.java,v 1.9 2004/02/16 23:00:27 minchau Exp $
18  */

19 package org.apache.xalan.trace;
20
21 import org.apache.xalan.templates.ElemTemplateElement;
22 import org.apache.xalan.transformer.TransformerImpl;
23 import org.apache.xpath.XPath;
24 import org.apache.xpath.objects.XObject;
25
26 import org.w3c.dom.Node JavaDoc;
27
28 /**
29  * Event triggered by selection of a node in the style stree.
30  * @xsl.usage advanced
31  */

32 public class SelectionEvent implements java.util.EventListener JavaDoc
33 {
34
35   /**
36    * The node in the style tree where the event occurs.
37    */

38   public final ElemTemplateElement m_styleNode;
39
40   /**
41    * The XSLT processor instance.
42    */

43   public final TransformerImpl m_processor;
44
45   /**
46    * The current context node.
47    */

48   public final Node JavaDoc m_sourceNode;
49
50   /**
51    * The attribute name from which the selection is made.
52    */

53   public final String JavaDoc m_attributeName;
54
55   /**
56    * The XPath that executed the selection.
57    */

58   public final XPath m_xpath;
59
60   /**
61    * The result of the selection.
62    */

63   public final XObject m_selection;
64
65   /**
66    * Create an event originating at the given node of the style tree.
67    *
68    * @param processor The XSLT TransformerFactory.
69    * @param sourceNode The current context node.
70    * @param mode The current mode.
71    * @param styleNode node in the style tree reference for the event.
72    * Should not be null. That is not enforced.
73    * @param attributeName The attribute name from which the selection is made.
74    * @param xpath The XPath that executed the selection.
75    * @param selection The result of the selection.
76    */

77   public SelectionEvent(TransformerImpl processor, Node JavaDoc sourceNode,
78                         ElemTemplateElement styleNode, String JavaDoc attributeName,
79                         XPath xpath, XObject selection)
80   {
81
82     this.m_processor = processor;
83     this.m_sourceNode = sourceNode;
84     this.m_styleNode = styleNode;
85     this.m_attributeName = attributeName;
86     this.m_xpath = xpath;
87     this.m_selection = selection;
88   }
89 }
90
Popular Tags