org.inria.ns.reflex.processor.xcl
Class IfAttr

java.lang.Object
  extended by org.inria.ns.reflex.processor.ForeignAttribute.Impl
      extended by org.inria.ns.reflex.processor.xcl.IfAttr
All Implemented Interfaces:
Comparable, ForeignAttribute

public class IfAttr
extends ForeignAttribute.Impl

@xcl:if is a shortcut usage of <xcl:if> when a condition is needed without using an "else" statement.

Author:
Philippe Poulard
See Also:
IfAction

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.inria.ns.reflex.processor.ForeignAttribute
ForeignAttribute.Impl, ForeignAttribute.Marker
 
Constructor Summary
IfAttr()
           
 
Method Summary
 AbstractAction apply(AbstractAction parent, Element element, SortedList foreignAttrs)
          Create a new abstract action that wraps the action to unmarshal.
 int getPriority()
          Return the priority of this foreign attribute, that is 100.
 
Methods inherited from class org.inria.ns.reflex.processor.ForeignAttribute.Impl
compareTo, getName, getValue, setName, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IfAttr

public IfAttr()
Method Detail

apply

public AbstractAction apply(AbstractAction parent,
                            Element element,
                            SortedList foreignAttrs)
                     throws XPathFunctionException
Create a new abstract action that wraps the action to unmarshal. This foreign attribute applied when unmarshalling only.

Parameters:
parent - The action depending from.
element - The XML element that contains the foreign attribute.
foreignAttrs - The other foreign attributes found within the element that hosts the attribute. Not used.
Returns:
The parent action, which is the wrapper action used for applying this foreign attribute.
Throws:
XPathFunctionException - When the expression is incorrect.

getPriority

public int getPriority()
Return the priority of this foreign attribute, that is 100.

Returns:
100 = the priority level of this foreign attribute.