werken.xpath-0.9.4.orig/ 0042755 0001750 0001750 00000000000 07330705446 015373 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/src/ 0042755 0001750 0001750 00000000000 07330702744 016160 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/src/com/ 0042755 0001750 0001750 00000000000 07330702744 016736 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/src/com/werken/ 0042755 0001750 0001750 00000000000 07330702744 020231 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/src/com/werken/xpath/ 0042755 0001750 0001750 00000000000 07330702744 021355 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/ 0042755 0001750 0001750 00000000000 07330702744 022316 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/OpNodeSetNodeSet.java 0100644 0001750 0001750 00000002551 07175201160 026272 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Collections;
class OpNodeSetNodeSet extends Operator
{
static Object evaluate(Context context,
Op op,
Object lhsValue,
Object rhsValue)
{
Object result = null;
// We should *know* absolutely that these are both Lists.
List lhs = (List) lhsValue;
List rhs = (List) rhsValue;
List lhsStrList = new ArrayList(lhs.size());
String tmpValue = null;
Iterator itemIter = lhs.iterator();
while ( itemIter.hasNext() )
{
lhsStrList.add( convertToString( itemIter.next() ) );
}
Collections.sort(lhsStrList);
itemIter = rhs.iterator();
int index = -1;
while ( itemIter.hasNext() )
{
tmpValue = convertToString( itemIter.next() );
index = Collections.binarySearch(lhsStrList,
tmpValue);
if ( op == Op.EQUAL )
{
// We found one, equality achieved
if (index >= 0)
{
return Boolean.TRUE;
}
}
else if ( op == Op.NOT_EQUAL )
{
// We didn't find one
if (index < 0)
{
return Boolean.TRUE;
}
}
}
return Boolean.FALSE;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/OpNodeSetAny.java 0100644 0001750 0001750 00000001635 07175702143 025471 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import java.util.List;
import java.util.Iterator;
class OpNodeSetAny
{
static Object evaluate(Context context,
Op op,
Object lhsValue,
Object rhsValue)
{
Object result = null;
List nodeSet = null;
Object other = null;
if (lhsValue instanceof List)
{
nodeSet = (List) lhsValue;
other = rhsValue;
}
else
{
nodeSet = (List) rhsValue;
other = lhsValue;
}
Iterator nodeIter = nodeSet.iterator();
while ( nodeIter.hasNext() )
{
result = Operator.evaluate(context,
op,
nodeIter.next(),
other);
if (Boolean.TRUE.equals(result))
{
break;
}
}
return result;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/Operator.java 0100644 0001750 0001750 00000010074 07177624723 024762 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import org.jdom.Element;
import org.jdom.Attribute;
import java.util.List;
class Operator
{
static Object evaluate(Context context,
Op op,
Object lhsValue,
Object rhsValue)
{
Object result = null;
if ( op == Op.OR )
{
}
else if ( op == Op.AND )
{
}
else
{
// This cascading-if implments section 3.4 ("Booleans") of
// the XPath-REC spec, for all operators which do not perform
// short-circuit evaluation (meaning everything except AND and OR);
if (Operator.bothAreNodeSets(lhsValue,
rhsValue))
{
// result = opNodeSetNodeSet();
result = OpNodeSetNodeSet.evaluate(context,
op,
lhsValue,
rhsValue);
}
else if (Operator.eitherIsNodeSet(lhsValue,
rhsValue))
{
result = OpNodeSetAny.evaluate(context,
op,
lhsValue,
rhsValue);
}
else if (Operator.eitherIsBoolean(lhsValue,
rhsValue))
{
result = OpBooleanAny.evaluate(context,
op,
lhsValue,
rhsValue);
}
else if (Operator.eitherIsNumber(lhsValue,
rhsValue))
{
result = OpNumberAny.evaluate(context,
op,
lhsValue,
rhsValue);
}
else if (Operator.eitherIsString(lhsValue,
rhsValue))
{
result = OpStringAny.evaluate(context,
op,
lhsValue,
rhsValue);
}
}
//return Collections.EMPTY_LIST;
return result;
}
protected static boolean eitherIsNodeSet(Object lhs,
Object rhs)
{
return ( (lhs instanceof List) || (rhs instanceof List) );
}
protected static boolean bothAreNodeSets(Object lhs,
Object rhs)
{
return ( (lhs instanceof List) && (rhs instanceof List) );
}
protected static boolean eitherIsNumber(Object lhs,
Object rhs)
{
return ( (lhs instanceof Number) || (rhs instanceof Number) );
}
protected static boolean eitherIsString(Object lhs,
Object rhs )
{
return ( (lhs instanceof String) || (rhs instanceof String) );
}
protected static boolean eitherIsBoolean(Object lhs,
Object rhs)
{
return ( (lhs instanceof Boolean) || (rhs instanceof Boolean) );
}
protected static String convertToString(Object obj)
{
String result = null;
if (obj instanceof String)
{
result = (String) obj;
}
else if (obj instanceof Attribute)
{
result = ((Attribute)obj).getValue();
}
else if (obj instanceof Element)
{
result = ((Element)obj).getText();
}
else
{
result = obj.toString();
}
return result;
}
protected static Double convertToNumber(Object obj)
{
Double result = null;
if (obj instanceof Double)
{
result = (Double) obj;
}
else
{
result = Double.valueOf( convertToString(obj) );
}
return result;
}
protected static Boolean convertToBoolean(Object obj)
{
Boolean result = null;
if (obj instanceof Boolean)
{
result = (Boolean) obj;
}
else
{
result = Boolean.valueOf( convertToString(obj) );
}
return result;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/Op.java 0100644 0001750 0001750 00000001602 07152056703 023530 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
public class Op {
private String _name = "";
private Op (String name) { _name = name; }
public String toString() { return _name; }
public final static Op UNION = new Op("|");
public final static Op OR = new Op("or");
public final static Op AND = new Op("and");
public final static Op EQUAL = new Op("==");
public final static Op NOT_EQUAL = new Op("!=");
public final static Op LT = new Op("<");
public final static Op GT = new Op(">");
public final static Op LT_EQUAL = new Op("<=");
public final static Op GT_EQUAL = new Op(">=");
public final static Op MOD = new Op("%");;
public final static Op DIV = new Op("/");
public final static Op PLUS = new Op("+");
public final static Op MINUS = new Op("-");
public final static Op MULTIPLY = new Op("*");
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/StringExpr.java 0100644 0001750 0001750 00000000527 07175201204 025255 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import org.jdom.Element;
public class StringExpr extends Expr
{
private String _text = null;
public StringExpr(String text)
{
_text = text;
}
public String toString()
{
return ("[(StringExpr) " + _text + "]");
}
public Object evaluate(Context context)
{
return _text;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/FunctionExpr.java 0100644 0001750 0001750 00000002153 07175201136 025575 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import com.werken.xpath.function.Function;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
public class FunctionExpr extends Expr
{
private String _name = null;
private List _args = null;
public FunctionExpr(String name,
List args)
{
_name = name;
_args = args;
}
public Object evaluate(Context context)
{
Function func = context.getContextSupport().getFunction(_name);
if (func == null)
{
// FIXME: toss an exception
return null;
}
List resolvedArgs = resolveArgs( context );
return func.call( context, resolvedArgs );
}
private List resolveArgs(Context context)
{
if ( (_args == null) || (_args.size() == 0) )
{
return Collections.EMPTY_LIST;
}
List resolved = new ArrayList(_args.size());
Iterator exprIter = _args.iterator();
Expr each = null;
while (exprIter.hasNext())
{
each = (Expr) exprIter.next();
resolved.add( each.evaluate( context ) );
}
return resolved;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/OpNumberAny.java 0100644 0001750 0001750 00000002150 07175702151 025350 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
class OpNumberAny extends Operator
{
static Object evaluate(Context context,
Op op,
Object lhsValue,
Object rhsValue)
{
Double lhs = convertToNumber(lhsValue);
Double rhs = convertToNumber(rhsValue);
if ( (op == Op.EQUAL)
|| (op == Op.LT_EQUAL)
|| (op == Op.GT_EQUAL) )
{
return ( ( lhs.equals(rhs) )
? Boolean.TRUE
: Boolean.FALSE
);
}
else if ( op == Op.NOT_EQUAL )
{
return ( ( ! lhs.equals(rhs) )
? Boolean.TRUE
: Boolean.FALSE
);
}
else if ( (op == Op.LT)
|| (op == Op.LT_EQUAL) )
{
return ( ( lhs.compareTo(rhs) < 0 )
? Boolean.TRUE
: Boolean.FALSE
);
}
else if ( (op == Op.GT)
|| (op == Op.GT_EQUAL ) )
{
return ( ( lhs.compareTo(rhs) > 0 )
? Boolean.TRUE
: Boolean.FALSE
);
}
return null;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/Predicate.java 0100644 0001750 0001750 00000003061 07177625560 025065 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import com.werken.xpath.ContextSupport;
import com.werken.xpath.function.BooleanFunction;
import org.jdom.Element;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Collections;
public class Predicate
{
private Expr _expr = null;
public Predicate(Expr expr)
{
_expr = expr;
}
public List evaluateOn(List nodeSet,
ContextSupport support,
String axis)
{
Context context = new Context( nodeSet,
support );
Context duplicateContext = null;
List results = new ArrayList();
int position = 1;
int max = context.getSize();
while ( position <= max )
{
duplicateContext = context.duplicate();
duplicateContext.setPosition( position );
if ( evaluateOnNode( duplicateContext,
axis ) )
{
results.add( context.getNode( position ) );
}
++position;
}
return results;
}
public boolean evaluateOnNode(Context context,
String axis)
{
boolean result = false;
Object exprResult = _expr.evaluate( context );
//System.err.println("pred-expr == " + _expr);
if ( exprResult instanceof Double )
{
if ( ((Double)exprResult).equals( new Double( context.getPosition() ) ) )
{
result = true;
}
} else {
result = BooleanFunction.evaluate(exprResult).booleanValue();
}
return result;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/BinaryExpr.java 0100644 0001750 0001750 00000003564 07177625547 025265 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import com.werken.xpath.ContextSupport;
import com.werken.xpath.function.BooleanFunction;
import org.jdom.Element;
import org.jdom.Attribute;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Collections;
public class BinaryExpr extends Expr
{
private Op _op = null;
private Expr _lhs = null;
private Expr _rhs = null;
public BinaryExpr(Op op,
Expr lhs, Expr rhs)
{
_op = op;
_lhs = lhs;
_rhs = rhs;
}
public Object evaluate(Context context)
{
//System.err.println( _op + " " + _lhs + " " + _rhs );
Context duplicateContext = context.duplicate();
Object result = null;
Object lhsValue = _lhs.evaluate( context );
Object rhsValue = null;
// Short-circuit the boolean AND and OR operators
// returning early if LHS is all that is needed
// to determine truthfulness.
if ( _op == Op.OR )
{
if (BooleanFunction.evaluate(lhsValue).booleanValue())
{
return Boolean.TRUE;
}
rhsValue = _rhs.evaluate( duplicateContext );
if (BooleanFunction.evaluate(rhsValue).booleanValue())
{
return Boolean.TRUE;
}
return Boolean.FALSE;
}
else if ( _op == Op.AND )
{
if ( ! BooleanFunction.evaluate(lhsValue).booleanValue())
{
return Boolean.FALSE;
}
rhsValue = _rhs.evaluate( duplicateContext );
if ( ! BooleanFunction.evaluate(rhsValue).booleanValue())
{
return Boolean.FALSE;
}
return Boolean.TRUE;
}
else
{
rhsValue = _rhs.evaluate( duplicateContext );
result = Operator.evaluate(duplicateContext,
_op,
lhsValue,
rhsValue);
}
return result;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/OpBooleanAny.java 0100644 0001750 0001750 00000001336 07175702133 025504 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import com.werken.xpath.function.BooleanFunction;
class OpBooleanAny extends Operator
{
static Object evaluate(Context context,
Op op,
Object lhsValue,
Object rhsValue)
{
Boolean lhs = BooleanFunction.evaluate(lhsValue);
Boolean rhs = BooleanFunction.evaluate(rhsValue);
if ( op == Op.EQUAL )
{
return ( ( lhs.equals(rhs) )
? Boolean.TRUE
: Boolean.FALSE
);
}
else if ( op == Op.NOT_EQUAL )
{
return ( ( ! lhs.equals(rhs) )
? Boolean.TRUE
: Boolean.FALSE
);
}
return null;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/NegativeExpr.java 0100644 0001750 0001750 00000000402 07175201147 025547 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import java.util.List;
public class NegativeExpr extends Expr
{
private Expr _expr = null;
public NegativeExpr(Expr expr)
{
_expr = expr;
}
public Object evaluate(Context context)
{
return null;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/OpStringAny.java 0100644 0001750 0001750 00000001225 07175702157 025376 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
class OpStringAny extends Operator
{
static Object evaluate(Context context,
Op op,
Object lhsValue,
Object rhsValue)
{
String lhs = convertToString(lhsValue);
String rhs = convertToString(rhsValue);
if ( op == Op.EQUAL )
{
return ( ( lhs.equals(rhs) )
? Boolean.TRUE
: Boolean.FALSE
);
}
else if ( op == Op.NOT_EQUAL )
{
return ( ( ! lhs.equals(rhs) )
? Boolean.TRUE
: Boolean.FALSE
);
}
return null;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/UnAbbrStep.java 0100644 0001750 0001750 00000022223 07177624650 025172 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import com.werken.xpath.ContextSupport;
import com.werken.xpath.util.Partition;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.Attribute;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
public abstract class UnAbbrStep extends Step
{
private String _axis = null;
private List _predicates = null;
public UnAbbrStep(String axis)
{
_axis = axis;
}
public String getAxis()
{
return _axis;
}
public Step addPredicate(Predicate pred)
{
if ( _predicates == null )
{
_predicates = new ArrayList();
}
_predicates.add(pred);
return this;
}
public List getPredicates()
{
if ( _predicates == null )
{
return Collections.EMPTY_LIST;
}
return _predicates;
}
public Context applyTo(Context context)
{
if ( context.isEmpty() )
{
return context;
}
List results = applyTo(context.getNodeSet(),
context.getContextSupport(),
getAxis(),
true);
context.setNodeSet(results);
return context;
}
public List applyTo(List nodeSet,
ContextSupport support,
String axis)
{
return applyTo(nodeSet,
support,
axis,
false);
}
public List applyTo(List nodeSet,
ContextSupport support,
String axis,
boolean doPreds)
{
List aggregateResults = new ArrayList();
List results = null;
Iterator nodeIter = nodeSet.iterator();
Object each = null;
while ( nodeIter.hasNext() )
{
each = nodeIter.next();
if ( "self".equals(axis) )
{
results = applyToSelf( each,
support );
}
else if ( "ancestor".equals(axis) )
{
results = applyToAncestor( each,
support );
}
else if ( "ancestor-or-self".equals(axis) )
{
results = applyToAncestorOrSelf( each,
support );
}
else if ( "attribute".equals(axis) )
{
results = applyToAttribute( each,
support );
}
else if ( "child".equals(axis) )
{
results = applyToChild( each,
support );
}
else if ( "descendant".equals(axis) )
{
results = applyToDescendant( each,
support );
}
else if ( "descendant-or-self".equals(axis) )
{
results = applyToDescendantOrSelf( each,
support );
}
else if ( "following".equals(axis) )
{
results = applyToFollowing( each,
support );
}
else if ( "following-sibling".equals(axis) )
{
results = applyToFollowingSibling( each,
support );
}
else if ( "namespace".equals(axis) )
{
// FIXME
}
else if ( "parent".equals(axis) )
{
results = applyToParent( each,
support );
}
else if ( "preceeding".equals(axis) )
{
results = applyToPreceeding( each,
support );
}
else if ( "preceeding-sibling".equals(axis) )
{
results = applyToPreceedingSibling( each,
support );
}
else
{
results = Collections.EMPTY_LIST;
}
if ( doPreds ) {
aggregateResults.addAll( applyPredicates( results,
support) );
}
else
{
aggregateResults.addAll( results );
}
}
return aggregateResults;;
}
private List applyPredicates(List nodeSet,
ContextSupport support)
{
List results = nodeSet;
if ( _predicates == null )
{
return nodeSet;
}
Iterator predIter = _predicates.iterator();
Predicate eachPred = null;
while ( predIter.hasNext() )
{
eachPred = (Predicate) predIter.next();
results = eachPred.evaluateOn(results,
support,
_axis );
}
return results;
}
public List applyToSelf(Object node,
ContextSupport support)
{
return Collections.EMPTY_LIST;
}
public List applyToChild(Object node,
ContextSupport support)
{
return Collections.EMPTY_LIST;
}
public List applyToDescendant(Object node,
ContextSupport support)
{
List results = new ArrayList();
results.addAll( applyToChild( node,
support ) );
if ( node instanceof Element )
{
List children = ((Element)node).getMixedContent();
results.addAll( applyTo( children,
support,
"descendant" ) );
}
else if ( node instanceof Document )
{
List children = ((Document)node).getMixedContent();
results.addAll( applyTo( children,
support,
"descendant" ) );
}
return results;
}
public List applyToDescendantOrSelf(Object node,
ContextSupport support)
{
List results = new ArrayList();
results.addAll( applyToSelf( node,
support ) );
if ( node instanceof Element )
{
List children = ((Element)node).getMixedContent();
results.addAll( applyTo( children,
support,
"descendant-or-self" ) );
}
else if ( node instanceof Document )
{
List children = ((Document)node).getMixedContent();
results.addAll( applyTo( children,
support,
"descendant-or-self" ) );
}
return results;
}
public List applyToParent(Object node,
ContextSupport support)
{
Object parent = ParentStep.findParent(node);
List results = new ArrayList();
results.addAll( applyToSelf( parent,
support ) );
return results;
}
public List applyToAncestor(Object node,
ContextSupport support)
{
List results = new ArrayList();
results.addAll( applyToParent( node,
support ) );
Object parent = ParentStep.findParent( node );
if ( parent != null )
{
results.addAll( applyToAncestor( parent,
support ) );
}
return results;
}
public List applyToAncestorOrSelf(Object node,
ContextSupport support)
{
List results = new ArrayList();
results.addAll( applyToSelf( node,
support ) );
results.addAll( applyToAncestor( node,
support ) );
return results;
}
public List applyToAttribute(Object node,
ContextSupport support)
{
return Collections.EMPTY_LIST;
}
public List applyToPreceeding(Object node,
ContextSupport support)
{
List results = new ArrayList();
if ( node instanceof Element)
{
List preceeding = Partition.preceeding( (Element)node );
results.addAll( applyTo( preceeding,
support,
"self" ) );
}
return results;
}
public List applyToFollowing(Object node,
ContextSupport support)
{
List results = new ArrayList();
if ( node instanceof Element) {
List following = Partition.following( (Element)node );
results.addAll( applyTo( following,
support,
"self" ) );
}
return results;
}
public List applyToPreceedingSibling(Object node,
ContextSupport support)
{
List results = new ArrayList();
if ( node instanceof Element) {
List preceedingSiblings = Partition.preceedingSiblings( (Element)node );
results.addAll( applyTo( preceedingSiblings,
support,
"self") );
}
return results;
}
public List applyToFollowingSibling(Object node,
ContextSupport support)
{
List results = new ArrayList();
if ( node instanceof Element) {
List followingSiblings = Partition.followingSiblings( (Element)node );
results.addAll( applyTo( followingSiblings,
support,
"self" ) );
}
return results;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/NodeTypeStep.java 0100644 0001750 0001750 00000004150 07175702125 025537 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import com.werken.xpath.ContextSupport;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.Comment;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Collections;
public class NodeTypeStep extends UnAbbrStep
{
private String _nodeType = null;
public NodeTypeStep(String axis,
String nodeType)
{
super(axis);
_nodeType = nodeType;
}
protected boolean matches(Object node)
{
List results = null;
if ( "node".equals( _nodeType ) )
{
return true;
}
results = new ArrayList();
if ( "text".equals( _nodeType ) && ( node instanceof String ) )
{
return true;
}
else if ( "comment".equals( _nodeType ) && ( node instanceof Comment ) )
{
return true;
}
return false;
}
public List applyToNode(Object node)
{
List nodeSet = new ArrayList(1);
nodeSet.add( node );
return applyToNodes( nodeSet );
}
public List applyToNodes(List nodeSet)
{
List results = new ArrayList();
Iterator nodeIter = nodeSet.iterator();
Object each = null;
while ( nodeIter.hasNext() )
{
each = nodeIter.next();
if ( matches( each ) )
{
results.add( each );
}
}
return results;
}
public List applyToChild(Object node,
ContextSupport support)
{
List results = new ArrayList();
if ( node instanceof Element )
{
if ( isAbsolute() )
{
results.addAll( applyToNodes( ((Element)node).getDocument().getMixedContent() ) );
}
else
{
results.addAll( applyToNodes( ((Element)node).getMixedContent() ) );
}
}
else if ( node instanceof Document )
{
results.addAll( applyToNodes( ((Document)node).getMixedContent() ) );
}
return results;
}
public List applyToSelf(Object node,
ContextSupport support)
{
return applyToNode( node );
}
public String toString()
{
return "[NodeTypeStep [" + _nodeType + "]]";
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/NumberExpr.java 0100644 0001750 0001750 00000000561 07175344204 025245 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import org.jdom.Element;
public class NumberExpr extends Expr
{
private Double _number = null;
public NumberExpr(String number)
{
_number = new Double( number );
}
public String toString()
{
return ("[(NumberExpr) " + _number + "]");
}
public Object evaluate(Context context)
{
return _number;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/VariableExpr.java 0100644 0001750 0001750 00000000411 07175201212 025523 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
public class VariableExpr extends Expr
{
private String _name = null;
public VariableExpr(String name)
{
_name = name;
}
public Object evaluate(Context context)
{
return context.getVariableValue(_name);
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/PIStep.java 0100644 0001750 0001750 00000001347 07175441621 024326 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.ProcessingInstruction;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Collections;
public class PIStep extends NodeTypeStep
{
private String _target = null;
public PIStep(String axis,
String target)
{
super(axis, null);
_target = target;
}
protected boolean matches(Object node)
{
if ( node instanceof ProcessingInstruction )
{
if ( _target == null )
{
return true;
}
else if ( _target.equals( ((ProcessingInstruction)node).getTarget() ) )
{
return true;
}
}
return false;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/ParentStep.java 0100644 0001750 0001750 00000002315 07175441444 025246 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import org.jdom.Element;
import java.util.Set;
import java.util.HashSet;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
public class ParentStep extends AbbrStep
{
public ParentStep()
{
}
public Context applyTo(Context context)
{
context.setNodeSet( ParentStep.findParents( context.getNodeSet() ) );
return context;
}
static public Object findParent(Object node)
{
if ( node instanceof Element )
{
return ((Element)node).getParent();
}
return null;
}
static public List findParents(List nodeSet)
{
// FIXME: Unable to find parents of anything
// except Element at this point.
Set results = new HashSet();
Iterator elemIter = nodeSet.iterator();
Object each = null;
Element parent = null;
while (elemIter.hasNext())
{
each = elemIter.next();
if ( each instanceof Element )
{
parent = ((Element)each).getParent();
if (parent != null)
{
results.add(parent);
}
}
}
return ( results.isEmpty() ? Collections.EMPTY_LIST : new ArrayList(results) );
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/NameTestStep.java 0100644 0001750 0001750 00000007777 07175702114 025550 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import com.werken.xpath.ContextSupport;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.Attribute;
import org.jdom.Namespace;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Collections;
public class NameTestStep extends UnAbbrStep
{
private String _namespacePrefix = null;
private String _localName = null;
public NameTestStep(String axis,
String namespacePrefix,
String localName)
{
super(axis);
_namespacePrefix = namespacePrefix;
_localName = localName;
}
public List applyToSelf(Object node,
ContextSupport support)
{
List results = new ArrayList();
if ( node instanceof Element )
{
if ( ( "*".equals( _localName ) || ((Element)node).getName().equals(_localName) )
&&
((Element)node).getNamespaceURI().equals( support.translateNamespacePrefix( _namespacePrefix ) ) )
{
results.add( node );
}
}
else if ( node instanceof Attribute )
{
if ( ((Attribute)node).getName().equals(_localName)
&&
((Attribute)node).getNamespaceURI().equals( support.translateNamespacePrefix( _namespacePrefix ) ) )
{
results.add( node );
}
}
return results;
}
public List applyToAttribute(Object node,
ContextSupport support)
{
List results = new ArrayList();
Attribute attr = null;
Namespace ns = null;
String nsURI = null;
if ( node instanceof Element )
{
if ( "*".equals( _localName ) )
{
results.addAll( ((Element)node).getAttributes() );
}
else
{
attr = null;
if ( "".equals( _namespacePrefix ) )
{
attr = ((Element)node).getAttribute( _localName );
}
else
{
nsURI = support.translateNamespacePrefix( _namespacePrefix );
ns = Namespace.getNamespace(nsURI);
attr = ((Element)node).getAttribute( _localName,
ns );
}
if ( attr != null )
{
results.add( attr );
}
}
}
return results;
}
public List applyToChild(Object node,
ContextSupport support)
{
List results = new ArrayList();
String nsURI = null;
Namespace ns = null;
if ( _namespacePrefix != null )
{
nsURI = support.translateNamespacePrefix( _namespacePrefix );
}
if ( node instanceof Document )
{
Element child = ((Document)node).getRootElement();
if ( child.getName().equals( _localName ) )
{
if ( nsURI == null )
{
results.add( child );
}
else if ( nsURI.equals( child.getNamespaceURI() ) )
{
results.add( child );
}
}
}
else if ( node instanceof Element )
{
if ( "*".equals( _localName ) )
{
List children = ((Element)node).getChildren();
if ( nsURI == null )
{
results.addAll( children );
}
else
{
Iterator childIter = children.iterator();
Element nodeChild = null;
while ( childIter.hasNext() )
{
nodeChild = (Element) childIter.next();
if ( nsURI.equals( nodeChild.getNamespaceURI() ) )
{
results.add( nodeChild );
}
}
}
}
else
{
ns = Namespace.getNamespace( nsURI );
results.addAll( ((Element)node).getChildren( _localName,
ns ) );
}
}
return results;
}
public String toString()
{
return "[NameTestStep [" + _namespacePrefix + ":" + _localName + "]]";
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/AbbrStep.java 0100644 0001750 0001750 00000000123 07151605300 024641 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
public abstract class AbbrStep extends Step
{
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/SelfStep.java 0100644 0001750 0001750 00000001076 07177622603 024711 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import com.werken.xpath.ContextSupport;
import org.jdom.Element;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
public class SelfStep extends AbbrStep
{
public SelfStep()
{
}
/*
public Context applyTo(Context context)
{
return context;
}
*/
public List applyToSelf(Object node,
ContextSupport support)
{
System.err.println("SelfStep.applyToSelf(" + node + ")");
List results = new ArrayList(1);
results.add(node);
return results;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/FilterExpr.java 0100644 0001750 0001750 00000001215 07175702062 025237 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import java.util.List;
import java.util.ArrayList;
public class FilterExpr extends PathExpr
{
private Expr _expr = null;
private List _predicates = null;
private LocationPath _path = null;
public FilterExpr(Expr expr)
{
_expr = expr;
}
public void addPredicate(Predicate pred)
{
if ( _predicates == null )
{
_predicates = new ArrayList();
}
_predicates.add(pred);
}
public void setLocationPath(LocationPath path)
{
_path = path;
_path.setIsAbsolute(false);
}
public Object evaluate(Context context)
{
return _expr.evaluate( context );
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/Context.java 0100644 0001750 0001750 00000005151 07175702037 024604 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import com.werken.xpath.ContextSupport;
import com.werken.xpath.function.Function;
import org.jdom.Document;
import org.jdom.Element;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Collections;
public class Context implements Cloneable
{
private ContextSupport _contextSupport = null;
private List _nodeSet = null;
private int _position = 0;
public Context(Document doc,
ContextSupport contextSupport)
{
_nodeSet = new ArrayList(1);
_nodeSet.add(doc);
_contextSupport = contextSupport;
}
public Context(Element elem,
ContextSupport contextSupport)
{
_nodeSet = new ArrayList(1);
_nodeSet.add(elem);
_contextSupport = contextSupport;
}
public Context(List nodeSet,
ContextSupport contextSupport)
{
_nodeSet = nodeSet;
_contextSupport = contextSupport;
}
public List getNodeSet()
{
if ( _position == 0 )
{
return _nodeSet;
}
List nodeOnly = new ArrayList(1);
nodeOnly.add( getContextNode() );
return nodeOnly;
}
public int getSize()
{
return _nodeSet.size();
}
public boolean isEmpty()
{
return _nodeSet.isEmpty();
}
public int getPosition()
{
return _position;
}
public void setPosition(int position)
{
_position = position;
}
public Object getContextNode()
{
return getNode( _position );
}
public Object getNode(int index)
{
return _nodeSet.get( index - 1 );
}
public void setNodeSet(List nodeSet)
{
if ( nodeSet.isEmpty() )
{
_nodeSet = Collections.EMPTY_LIST;
}
else
{
_nodeSet = nodeSet;
}
_position = 0;
}
public ContextSupport getContextSupport()
{
return _contextSupport;
}
public Iterator iterator()
{
return _nodeSet.iterator();
}
public String translateNamespacePrefix(String prefix)
{
return _contextSupport.translateNamespacePrefix( prefix );
}
public Object getVariableValue(String variableName)
{
return _contextSupport.getVariableValue( variableName );
}
public Function getFunction(String name)
{
return _contextSupport.getFunction( name );
}
public Context duplicate()
{
Context dupe = null;
try
{
dupe = (Context) this.clone();
dupe._nodeSet = (ArrayList) ((ArrayList)this._nodeSet).clone();
}
catch (CloneNotSupportedException e)
{
dupe = null;
}
return dupe;
}
public String toString()
{
return ("[Context " + _nodeSet + "]");
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/PathExpr.java 0100644 0001750 0001750 00000000122 07151362631 024700 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
public abstract class PathExpr extends Expr
{
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/Expr.java 0100644 0001750 0001750 00000000214 07175201131 024056 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import java.util.List;
public abstract class Expr
{
abstract public Object evaluate(Context context);
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/Step.java 0100644 0001750 0001750 00000001251 07175201201 024053 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import org.jdom.Element;
import org.jdom.Attribute;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.Set;
import java.util.HashSet;
public abstract class Step extends Expr
{
private boolean _isAbsolute = false;
public void setIsAbsolute(boolean isAbsolute)
{
_isAbsolute = isAbsolute;
}
public boolean isAbsolute()
{
return _isAbsolute;
}
public Object evaluate(Context context)
{
return applyTo( context );
}
public Context applyTo(Context context)
{
context.setNodeSet( Collections.EMPTY_LIST );
return context;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/LocationPath.java 0100644 0001750 0001750 00000004246 07177623251 025553 0 ustar tokamoto tokamoto
package com.werken.xpath.impl;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.Attribute;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
public class LocationPath extends PathExpr
{
private boolean _isAbsolute = false;
private List _steps = null;
public LocationPath()
{
}
public void setIsAbsolute(boolean isAbsolute)
{
_isAbsolute = isAbsolute;
}
public boolean isAbsolute()
{
return _isAbsolute;
}
public LocationPath addStep(Step step)
{
if ( _steps == null )
{
_steps = new ArrayList();
}
_steps.add(step);
return this;
}
public List getSteps()
{
if ( _steps == null )
{
return Collections.EMPTY_LIST;
}
return _steps;
}
public Object evaluate(Context context)
{
return applyTo(context);
}
public Object applyTo(Context context)
{
if ( getSteps().isEmpty() )
{
if ( isAbsolute() )
{
Iterator nodeIter = context.getNodeSet().iterator();
Object each = null;
while ( nodeIter.hasNext() )
{
each = nodeIter.next();
if ( each instanceof Document )
{
List results = new ArrayList(1);
results.add( each );
return results;
}
else if ( each instanceof Element )
{
List results = new ArrayList(1);
results.add( ((Element)each).getDocument() );
return results;
}
}
}
else
{
return Collections.EMPTY_LIST;
}
}
Iterator stepIter = getSteps().iterator();
Step eachStep = null;
Object results = context;
boolean stepped = false;
while ( stepIter.hasNext() )
{
eachStep = (Step) stepIter.next();
//System.err.println("STEP: " + eachStep);
if ( (!stepped) && isAbsolute() )
{
eachStep.setIsAbsolute(true);
}
stepped = true;
context = eachStep.applyTo( context );
}
if (stepped)
{
return context.getNodeSet();
}
return Collections.EMPTY_LIST;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/impl/package.html 0100644 0001750 0001750 00000000252 07160040106 024555 0 ustar tokamoto tokamoto
com.werken.xpath.impl :: package.html
Contains implementation classes for evaluating XPath components
werken.xpath-0.9.4.orig/src/com/werken/xpath/util/ 0042755 0001750 0001750 00000000000 07330702744 022332 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/src/com/werken/xpath/util/DocumentOrderComparator.java 0100644 0001750 0001750 00000002756 07164153345 030006 0 ustar tokamoto tokamoto
package com.werken.xpath.util;
import org.jdom.Document;
import org.jdom.Element;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Collections;
import java.io.Serializable;
public class DocumentOrderComparator implements Serializable
{
private Map _orderings = null;
public DocumentOrderComparator(Document document)
{
Element rootElement = document.getRootElement();
if (rootElement != null)
{
List orderedElements = Partition.documentOrderDescendants( rootElement );
_orderings = new HashMap(orderedElements.size() + 1);
_orderings.put(rootElement, new Integer(0));
Iterator elemIter = orderedElements.iterator();
int counter = 1;
while (elemIter.hasNext())
{
_orderings.put( elemIter.next(),
new Integer(counter) );
++counter;
}
}
else
{
_orderings = Collections.EMPTY_MAP;
}
}
public int compare(Object lhsIn,
Object rhsIn)
throws ClassCastException
{
Element lhs = (Element) lhsIn;
Element rhs = (Element) rhsIn;
if (lhs.equals(rhs))
{
return 0;
}
int lhsIndex = ((Integer)_orderings.get(lhs)).intValue();
int rhsIndex = ((Integer)_orderings.get(rhs)).intValue();
if (lhsIndex < rhsIndex)
{
return -1;
}
else if (lhsIndex > rhsIndex)
{
return 1;
}
return 0;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/util/Partition.java 0100644 0001750 0001750 00000006770 07177561631 025162 0 ustar tokamoto tokamoto
package com.werken.xpath.util;
import org.jdom.Element;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Collections;
public class Partition
{
public static List descendants(Element node)
{
List results = new ArrayList();
List children = node.getChildren();
results.addAll(children);
Iterator childIter = children.iterator();
while (childIter.hasNext())
{
results.addAll( Partition.descendants( (Element) childIter.next() ) );
}
if (results.isEmpty())
{
return Collections.EMPTY_LIST;
}
return results;
}
public static List documentOrderDescendants(Element node)
{
List results = new ArrayList();
List children = node.getChildren();
if (children.isEmpty())
{
return Collections.EMPTY_LIST;
}
Iterator childIter = children.iterator();
Element each = null;
while (childIter.hasNext())
{
each = (Element) childIter.next();
results.add(each);
results.addAll( documentOrderDescendants( each ) );
}
if (results.isEmpty())
{
return Collections.EMPTY_LIST;
}
return results;
}
public static List followingSiblings(Element node)
{
Element parent = node.getParent();
if (parent == null)
{
return Collections.EMPTY_LIST;
}
List siblings = parent.getChildren();
int selfIndex = siblings.indexOf(node);
if (selfIndex < 0)
{
return Collections.EMPTY_LIST;
}
int total = siblings.size();
if (selfIndex == (total - 1))
{
return Collections.EMPTY_LIST;
}
return new ArrayList( siblings.subList( (selfIndex + 1),
siblings.size() ) );
}
public static List preceedingSiblings(Element node)
{
Element parent = node.getParent();
if (parent == null)
{
return Collections.EMPTY_LIST;
}
List siblings = parent.getChildren();
int selfIndex = siblings.indexOf(node);
if ( (selfIndex < 1) || (siblings.size() == 1) )
{
return Collections.EMPTY_LIST;
}
List results = new ArrayList();
results = siblings.subList(0,
selfIndex);
return results;
}
public static List following(Element node)
{
List results = new ArrayList();
List followingSiblings = Partition.followingSiblings(node);
results.addAll(followingSiblings);
Iterator sibIter = followingSiblings.iterator();
Element each = null;
while (sibIter.hasNext())
{
each = (Element) sibIter.next();
results.addAll( Partition.descendants( each ) );
}
Element parent = node.getParent();
if (parent != null)
{
results.addAll( Partition.following( parent ) );
}
if (results.isEmpty())
{
return Collections.EMPTY_LIST;
}
return results;
}
public static List preceeding(Element node)
{
List results = new ArrayList();
List preceedingSiblings = Partition.preceedingSiblings(node);
results.addAll(preceedingSiblings);
Iterator sibIter = preceedingSiblings.iterator();
Element each = null;
while (sibIter.hasNext())
{
each = (Element) sibIter.next();
results.addAll( Partition.descendants( each ) );
}
Element parent = node.getParent();
if (parent != null)
{
results.addAll( Partition.preceeding( parent ) );
}
if (results.isEmpty())
{
return Collections.EMPTY_LIST;
}
return results;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/util/ReverseDocumentOrderComparator.java 0100644 0001750 0001750 00000002774 07164153512 031336 0 ustar tokamoto tokamoto
package com.werken.xpath.util;
import org.jdom.Document;
import org.jdom.Element;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Collections;
import java.io.Serializable;
public class ReverseDocumentOrderComparator implements Serializable
{
private Map _orderings = null;
public ReverseDocumentOrderComparator(Document document)
{
Element rootElement = document.getRootElement();
if (rootElement != null)
{
List orderedElements = Partition.documentOrderDescendants( rootElement );
_orderings = new HashMap(orderedElements.size() + 1);
_orderings.put(rootElement, new Integer(0));
Iterator elemIter = orderedElements.iterator();
int counter = 1;
while (elemIter.hasNext())
{
_orderings.put( elemIter.next(),
new Integer(counter) );
++counter;
}
}
else
{
_orderings = Collections.EMPTY_MAP;
}
}
public int compare(Object lhsIn,
Object rhsIn)
throws ClassCastException
{
Element lhs = (Element) lhsIn;
Element rhs = (Element) rhsIn;
if (lhs.equals(rhs))
{
return 0;
}
int lhsIndex = ((Integer)_orderings.get(lhs)).intValue();
int rhsIndex = ((Integer)_orderings.get(rhs)).intValue();
if (lhsIndex < rhsIndex)
{
return 1;
}
else if (lhsIndex > rhsIndex)
{
return -1;
}
return 0;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/XPath.java 0100644 0001750 0001750 00000007607 07202560770 023250 0 ustar tokamoto tokamoto
package com.werken.xpath;
import com.werken.xpath.parser.XPathLexer;
import com.werken.xpath.parser.XPathRecognizer;
import com.werken.xpath.impl.Context;
import com.werken.xpath.impl.Expr;
import org.jdom.Document;
import org.jdom.Element;
import antlr.CharBuffer;
import antlr.*;
import java.io.StringReader;
import java.util.List;
import java.util.ArrayList;
/**
Main run-time interface into the XPath functionality
*
*
The XPath object embodies a textual XPath as described by
* the W3C XPath specification. It can be applied against a
* context node (or nodeset) along with context-helpers to
* produce the result of walking the XPath.
*
*
Example usage:
*
*
*
*
* // Create a new XPath
* XPath xpath = new XPath("a/b/c/../d/.[@name="foo"]);
*
* // Create the ContextSupport
* ContextSupport helper = new ContextSupport();
*
* // Use the XPathFunctionContext instance as the implement
* // for function resolution.
* helper.setFunctionContext( XPathFunctionContext.getInstance() );
*
* // Apply the XPath to your root context.
* Object results = xpath.applyTo(helper, myContext);
*
*
*
*
*
* @see com.werken.xpath.ContextSupport
* @see com.werken.xpath.NamespaceContext
* @see com.werken.xpath.VariableContext
* @see com.werken.xpath.FunctionContext
* @see com.werken.xpath.XPathFunctionContext
*
* @author bob mcwhirter (bob @ werken.com)
*/
public class XPath
{
private String _xpath = "";
private Expr _expr = null;
/** Construct an XPath
*/
public XPath(String xpath) {
_xpath = xpath;
parse();
}
public String toString()
{
return "[XPath: " + _xpath + " " + _expr + "]";
}
/** Retrieve the textual XPath string used to initialize this Object
*
* @return The XPath string
*/
public String getString()
{
return _xpath;
}
private void parse() {
StringReader reader = new StringReader(_xpath);
InputBuffer buf = new CharBuffer(reader);
XPathLexer lexer = new XPathLexer(buf);
XPathRecognizer recog = new XPathRecognizer(lexer);
try
{
_expr = recog.xpath();
}
catch (RecognitionException e)
{
e.printStackTrace();
}
catch (TokenStreamException e)
{
e.printStackTrace();
}
}
public List applyTo(Document doc)
{
return applyTo( ContextSupport.BASIC_CONTEXT_SUPPORT,
doc );
}
public List applyTo(List nodes)
{
return applyTo( ContextSupport.BASIC_CONTEXT_SUPPORT,
nodes );
}
public List applyTo(Element node)
{
return applyTo( ContextSupport.BASIC_CONTEXT_SUPPORT,
node );
}
public List applyTo(ContextSupport contextSupport,
Document doc)
{
return (List) _expr.evaluate( new Context( doc,
contextSupport ) );
}
/** Apply this XPath to a list of nodes
*
* @param contextSupport Walk-assisting state
* @param nodes Root NodeSet context
*/
public List applyTo(ContextSupport contextSupport,
List nodes)
{
return (List) _expr.evaluate( new Context( nodes,
contextSupport ) );
}
/** Apply this XPath to a single root node
*
* @param contextSupport Walk-assisting state
* @param node The root context node
*/
public List applyTo(ContextSupport contextSupport,
Element node)
{
return (List) _expr.evaluate( new Context( node,
contextSupport ) );
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/ 0042755 0001750 0001750 00000000000 07330702744 023202 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/src/com/werken/xpath/function/NamespaceUriFunction.java 0100644 0001750 0001750 00000001672 07175201041 030117 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import org.jdom.Attribute;
import org.jdom.Element;
import java.util.List;
/**
4.1string namespace-uri(node-set?)
@author bob mcwhirter (bob @ werken.com)
*/
public class NamespaceUriFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 0)
{
return evaluate( context );
}
// FIXME: Toss exception
return null;
}
public static String evaluate(Context context)
{
List list = context.getNodeSet();
if ( ! list.isEmpty() )
{
Object first = list.get(0);
if (first instanceof Element)
{
return ((Element)first).getNamespaceURI();
}
else if (first instanceof Attribute)
{
return ((Attribute)first).getNamespaceURI();
}
}
return "";
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/SubstringFunction.java 0100644 0001750 0001750 00000002731 07175201104 027520 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.2string substring(string,number,number?)
@author bob mcwhirter (bob @ werken.com)
*/
public class SubstringFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 2)
{
return evaluate( args.get(0),
args.get(1) );
}
else if (args.size() == 3)
{
return evaluate( args.get(0),
args.get(1),
args.get(2) );
}
// FIXME: Toss exception
return null;
}
public static String evaluate(Object strArg,
Object startArg)
{
String str = StringFunction.evaluate(strArg);
int start = RoundFunction.evaluate( NumberFunction.evaluate(startArg) ).intValue();
start += 1;
return str.substring(start);
}
public static String evaluate(Object strArg,
Object startArg,
Object lenArg)
{
String str = StringFunction.evaluate(strArg);
int start = RoundFunction.evaluate(
NumberFunction.evaluate(startArg) ).intValue();
int len = RoundFunction.evaluate(
NumberFunction.evaluate(lenArg) ).intValue();
start += 1;
int end = start + len;
return str.substring(start,
end);
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/StartsWithFunction.java 0100644 0001750 0001750 00000001500 07175201064 027652 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.2boolean starts-with(string,string)
@author bob mcwhirter (bob @ werken.com)
*/
public class StartsWithFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 2)
{
return evaluate(args.get(0), args.get(1));
}
// FIXME: Toss exception
return null;
}
public static Boolean evaluate(Object strArg,
Object matchArg)
{
String str = StringFunction.evaluate(strArg);
String match = StringFunction.evaluate(matchArg);
return ( str.startsWith(match)
? Boolean.TRUE
: Boolean.FALSE
);
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/CeilingFunction.java 0100644 0001750 0001750 00000001341 07175200763 027120 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.4number ceiling(number)
@author bob mcwhirter (bob @ werken.com)
*/
public class CeilingFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 1)
{
return evaluate(args.get(1));
}
// FIXME: Toss exception
return null;
}
public static Double evaluate(Object obj)
{
Double num = NumberFunction.evaluate(obj);
int possibly = num.intValue();
if ( possibly < num.doubleValue())
{
return new Double(possibly + 1);
}
return new Double( possibly);
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/BooleanFunction.java 0100644 0001750 0001750 00000002154 07175200776 027134 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.3boolean boolean(object)
@author bob mcwhirter (bob @ werken.com)
*/
public class BooleanFunction implements Function
{
public Object call(Context context,
List args)
{
if ( args.size() == 1 )
{
return evaluate( args.get(0) );
}
// FIXME: Toss an exception
return null;
}
public static Boolean evaluate(Object obj)
{
boolean result = false;
if (obj instanceof Boolean)
{
return (Boolean) obj;
//result = obj.booleanValue();
}
else if (obj instanceof Double)
{
if ( ! ( ((Double)obj).isNaN() )
&& ( ((Double)obj).doubleValue() != 0) )
{
result = true;
}
}
else if (obj instanceof List)
{
result = ( ((List)obj).size() > 0 );
}
else if (obj instanceof String)
{
result = ( ((String)obj).length() > 0 );
}
return (result
? Boolean.TRUE
: Boolean.FALSE
);
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/Function.java 0100644 0001750 0001750 00000000770 07175201440 025623 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
Interface for Function objects to conform to,
* for extensible function libraries.
*/
public interface Function
{
/** Call the function object.
*
* @param context The current context the function operates upon
* @param args The argument list to the function.
*
* @return The result from calling the function.
*/
Object call(Context context,
List args);
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/RoundFunction.java 0100644 0001750 0001750 00000001444 07175201060 026630 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.4number round(number)
@author bob mcwhirter (bob @ werken.com)
*/
public class RoundFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 1)
{
return evaluate(args.get(1));
}
// FIXME: Toss exception
return null;
}
public static Double evaluate(Object obj)
{
Double num = NumberFunction.evaluate(obj);
if (num.isNaN())
{
return num;
}
int rounded = (int) (num.doubleValue() + 0.5);
// FIXME take care of that wacky -0 rounding thing
// for values between -0.5 and 0.
return new Double(rounded);
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/ConcatFunction.java 0100644 0001750 0001750 00000001414 07175201007 026746 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
import java.util.Iterator;
/**
4.2boolean concat(string,string,string*)
@author bob mcwhirter (bob @ werken.com)
*/
public class ConcatFunction implements Function
{
public Object call(Context context,
List args)
{
if ( args.size() >= 2 ) {
return evaluate(args);
}
return null;
}
public static String evaluate(List list)
{
StringBuffer result = new StringBuffer();
Iterator argIter = list.iterator();
while ( argIter.hasNext() )
{
result.append( StringFunction.evaluate( argIter.next() ) );
}
return result.toString();
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/CountFunction.java 0100644 0001750 0001750 00000001174 07175201020 026625 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.1number count(node-set)
@author bob mcwhirter (bob @ werken.com)
*/
public class CountFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 1)
{
return evaluate( args.get(0) );
}
// FIXME: Toss exception
return null;
}
public static Double evaluate(Object obj)
{
if (obj instanceof List)
{
return new Double( ((List)obj).size() );
}
return null;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/NameFunction.java 0100644 0001750 0001750 00000001653 07175201046 026427 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import org.jdom.Attribute;
import org.jdom.Element;
import java.util.List;
/**
4.1string name(node-set?)
@author bob mcwhirter (bob @ werken.com)
*/
public class NameFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 0)
{
return evaluate( context );
}
// FIXME: Toss exception
return null;
}
public static String evaluate(Context context)
{
List list = context.getNodeSet();
if ( ! list.isEmpty() )
{
Object first = list.get(0);
if (first instanceof Element)
{
return ((Element)first).getQualifiedName();
}
else if (first instanceof Attribute)
{
return ((Attribute)first).getQualifiedName();
}
}
return "";
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/LastFunction.java 0100644 0001750 0001750 00000001111 07175201032 026432 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
import java.util.Iterator;
/**
4.1number last()
@author bob mcwhirter (bob @ werken.com)
*/
public class LastFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 0)
{
return evaluate( context );
}
// FIXME: Toss exception
return null;
}
public static Double evaluate(Context context)
{
return new Double( context.getSize() );
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/TrueFunction.java 0100644 0001750 0001750 00000001005 07175201112 026447 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.3boolean true()
@author bob mcwhirter (bob @ werken.com)
*/
public class TrueFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 0)
{
return evaluate();
}
// FIXME: Toss exception
return null;
}
public static Boolean evaluate()
{
return Boolean.TRUE;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/SumFunction.java 0100644 0001750 0001750 00000001510 07175201107 026301 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
import java.util.Iterator;
/**
4.4number sum(node-set)
@author bob mcwhirter (bob @ werken.com)
*/
public class SumFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 1)
{
return evaluate(args.get(1));
}
// FIXME: Toss exception
return null;
}
public static Double evaluate(Object obj)
{
Double result = null;
double sum = 0;
if (obj instanceof List)
{
Iterator nodeIter = ((List)obj).iterator();
while (nodeIter.hasNext())
{
sum += NumberFunction.evaluate(nodeIter.next()).doubleValue();
}
}
return new Double(sum);
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/FloorFunction.java 0100644 0001750 0001750 00000001120 07175201025 026612 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.4number floor(number)
@author bob mcwhirter (bob @ werken.com)
*/
public class FloorFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 1)
{
return evaluate(args.get(1));
}
// FIXME: Toss exception
return null;
}
public static Double evaluate(Object obj)
{
return new Double( NumberFunction.evaluate(obj).intValue() );
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/StringFunction.java 0100644 0001750 0001750 00000003455 07175201070 027014 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import org.jdom.Attribute;
import org.jdom.Element;
import java.util.List;
import java.util.Iterator;
/**
4.2string string(object)
@author bob mcwhirter (bob @ werken.com)
*/
public class StringFunction implements Function
{
public Object call(Context context,
List args)
{
if ( args.size() == 0 )
{
return evaluate( context );
}
if ( args.size() == 1 )
{
return evaluate( args.get(0) );
}
// FIXME: Toss an exception
return null;
}
public static String evaluate(Object obj)
{
String result = null;
if (obj instanceof String)
{
result = (String) obj;
}
else if (obj instanceof Attribute)
{
result = ((Attribute)obj).getValue();
}
else if (obj instanceof Element)
{
result = evaluate( (Element)obj );
}
else if (obj instanceof List)
{
if ( ((List)obj).size() == 0 )
{
result = "";
}
else
{
result = evaluate( ((List)obj).get(0) );
}
}
else
{
result = obj.toString();
}
// FIXME should handle List case!
return result;
}
public static String evaluate(Element elem)
{
List content = elem.getMixedContent();
Iterator contentIter = content.iterator();
Object each = null;
StringBuffer stringValue = new StringBuffer();
while (contentIter.hasNext())
{
each = contentIter.next();
if (each instanceof String)
{
stringValue.append( (String) each );
}
else if (each instanceof Element)
{
stringValue.append( StringFunction.evaluate( (Element)each ) );
}
}
return stringValue.toString();
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/NumberFunction.java 0100644 0001750 0001750 00000001334 07175201055 026773 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.4number number(object)
@author bob mcwhirter (bob @ werken.com)
*/
public class NumberFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 1)
{
return evaluate(args.get(1));
}
// FIXME: Toss exception
return null;
}
public static Double evaluate(Object obj)
{
Double result = null;
if (obj instanceof Double)
{
result = (Double) obj;
}
else
{
result = Double.valueOf( StringFunction.evaluate(obj) );
}
return result;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/NotFunction.java 0100644 0001750 0001750 00000001226 07175201052 026300 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.3boolean not(boolean)
@author bob mcwhirter (bob @ werken.com)
*/
public class NotFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 1)
{
return evaluate( args.get(0) );
}
// FIXME: Toss exception
return null;
}
public static Boolean evaluate(Object obj)
{
return ( ( BooleanFunction.evaluate(obj).booleanValue() )
? Boolean.FALSE
: Boolean.TRUE
);
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/SubstringBeforeFunction.java 0100644 0001750 0001750 00000001522 07175201101 030635 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.2string substring-before(string,string)
@author bob mcwhirter (bob @ werken.com)
*/
public class SubstringBeforeFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 2)
{
return evaluate(args.get(0), args.get(1));
}
// FIXME: Toss exception
return null;
}
public static String evaluate(Object strArg,
Object matchArg)
{
String str = StringFunction.evaluate(strArg);
String match = StringFunction.evaluate(matchArg);
int loc = str.indexOf(match);
if ( loc < 0 )
{
return "";
}
return str.substring(0, loc);
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/LocalNameFunction.java 0100644 0001750 0001750 00000001644 07175201036 027401 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import org.jdom.Attribute;
import org.jdom.Element;
import java.util.List;
/**
4.1string local-name(node-set?)
@author bob mcwhirter (bob @ werken.com)
*/
public class LocalNameFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 0)
{
return evaluate( context );
}
// FIXME: Toss exception
return null;
}
public static String evaluate(Context context)
{
List list = context.getNodeSet();
if ( ! list.isEmpty() )
{
Object first = list.get(0);
if (first instanceof Element)
{
return ((Element)first).getName();
}
else if (first instanceof Attribute)
{
return ((Attribute)first).getName();
}
}
return "";
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/ContainsFunction.java 0100644 0001750 0001750 00000001500 07175201013 027306 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.2boolean contains(string,string)
@author bob mcwhirter (bob @ werken.com)
*/
public class ContainsFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 2)
{
return evaluate(args.get(0), args.get(1));
}
// FIXME: Toss exception
return null;
}
public static Boolean evaluate(Object strArg,
Object matchArg)
{
String str = StringFunction.evaluate(strArg);
String match = StringFunction.evaluate(matchArg);
return ( ( str.indexOf(match) >= 0)
? Boolean.TRUE
: Boolean.FALSE
);
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/StringLengthFunction.java 0100644 0001750 0001750 00000001273 07175201073 030155 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.2number string-length(string)
@author bob mcwhirter (bob @ werken.com)
*/
public class StringLengthFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 0)
{
return evaluate(context);
}
else if (args.size() == 1)
{
return evaluate(args.get(0));
}
// FIXME: Toss exception
return null;
}
public static Double evaluate(Object obj)
{
String str = StringFunction.evaluate(obj);
return new Double(str.length());
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/SubstringAfterFunction.java 0100644 0001750 0001750 00000001523 07175201076 030510 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.2string substring-after(string,string)
@author bob mcwhirter (bob @ werken.com)
*/
public class SubstringAfterFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 2)
{
return evaluate(args.get(0), args.get(1));
}
// FIXME: Toss exception
return null;
}
public static String evaluate(Object strArg,
Object matchArg)
{
String str = StringFunction.evaluate(strArg);
String match = StringFunction.evaluate(matchArg);
int loc = str.indexOf(match);
if ( loc < 0 )
{
return "";
}
return str.substring(loc+1);
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/FalseFunction.java 0100644 0001750 0001750 00000001010 07175201023 026557 0 ustar tokamoto tokamoto
package com.werken.xpath.function;
import com.werken.xpath.impl.Context;
import java.util.List;
/**
4.3boolean false()
@author bob mcwhirter (bob @ werken.com)
*/
public class FalseFunction implements Function
{
public Object call(Context context,
List args)
{
if (args.size() == 0)
{
return evaluate();
}
// FIXME: Toss exception
return null;
}
public static Boolean evaluate()
{
return Boolean.FALSE;
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/function/package.html 0100644 0001750 0001750 00000001533 07160037745 025463 0 ustar tokamoto tokamoto
com.werken.xpath.function :: package.html
Provides implementations for the core XPath Function Library
4.1number position()
@author bob mcwhirter (bob @ werken.com)
*/
public class PositionFunction implements Function
{
public Object call(Context context,
List args)
{
System.err.println("*******************************");
System.err.println("position(" + context + ", " + args + ")");
if (args.size() == 0)
{
return evaluate( context );
}
// FIXME: Toss exception
return null;
}
public static Double evaluate(Context context)
{
return new Double( context.getPosition() );
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/FunctionContext.java 0100644 0001750 0001750 00000001302 07174622725 025347 0 ustar tokamoto tokamoto
package com.werken.xpath;
import com.werken.xpath.function.Function;
/**
Specification of the interface required by
* {@link com.werken.xpath.ContextSupport} for delegation
* of function resolution.
*
* @author bob mcwhirter (bob @ werken.com)
*/
public interface FunctionContext
{
/** Retrieve a named function
*
*
Retrieve the named function object, or null
* if no such function exists.
*
* @param name The name of the function sought.
*
* @return The {@link com.werken.xpath.function.Function}
* matching the specified name.
*
* @see com.werken.xpath.ContextSupport#setFunctionContext
*/
Function getFunction(String name);
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/overview.html 0100644 0001750 0001750 00000000725 07160037344 024106 0 ustar tokamoto tokamoto
The werken.xpath implementation is built upon JDOM, which is available
at www.jdom.org.
werken.xpath attempts to be a fully-compliant implementation of the
W3C XPath specification.
Currently, it's not.
The homepage for the werken.xpath project is
http://code.werken.com/xpath.
werken.xpath-0.9.4.orig/src/com/werken/xpath/Test.java 0100644 0001750 0001750 00000003072 07175202734 023135 0 ustar tokamoto tokamoto
package com.werken.xpath;
import org.jdom.*;
import org.jdom.input.SAXBuilder;
import org.jdom.output.XMLOutputter;
import java.util.List;
import java.util.Iterator;
import java.io.File;
import java.io.IOException;
/** Example Test driver for werken.xpath
*
* @author bob mcwhirter (bob @ werken.com)
*/
public class Test
{
public static void main(String[] args)
{
System.out.println("werken xpath -- test driver\n");
if ( args.length != 2 ) {
System.err.println("Usage: java ...TestDriver ");
System.exit(1);
}
SAXBuilder builder = new SAXBuilder();
File inFile = new File(args[0]);
String xpathExpr = args[1];
try
{
Document doc = builder.build(inFile);
XPath xpath = new XPath(xpathExpr);
System.err.println("XPath :: " + xpath.getString());
ContextSupport contextSupport = new ContextSupport();
DefaultVariableContext vc = new DefaultVariableContext();
vc.setVariableValue("foo", "cheese burgers");
System.err.println("Context :: " + doc);
NamespaceContext nc = new ElementNamespaceContext( doc.getRootElement() );
contextSupport.setFunctionContext( XPathFunctionContext.getInstance() );
contextSupport.setVariableContext( vc );
contextSupport.setNamespaceContext( nc );
Object results = xpath.applyTo(contextSupport,
doc);
System.err.println("Results :: " + results);
}
catch (JDOMException jde)
{
jde.printStackTrace(System.err);
}
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/NamespaceContext.java 0100644 0001750 0001750 00000001204 07174622737 025462 0 ustar tokamoto tokamoto
package com.werken.xpath;
/**
Specification of the interface required by
* {@link com.werken.xpath.ContextSupport} for delegation
* of namespace prefix binding resolution.
*
* @autho bob mcwhirter (bob @ werken.com)
*/
public interface NamespaceContext
{
/** Translate a namespace prefix into a URI
*
* Translate the prefix used in a component of an XPath
* into its expanded namespace URI.
A {@link com.werken.xpath.NamespaceContext} which gets it's mappings
* from an Element in a JDOM tree.
*
*
It currently DOES NOT WORK
*
* @author bob mcwhirter (bob @ werken.com)
*/
public class ElementNamespaceContext implements NamespaceContext
{
private Element _element = null;
private Map _namespaceMapping = null;
/** Construct the NamespaceContext from a JDOM Element
*
* @param element The JDOM element to use for prefix->nsURI mapping
*/
public ElementNamespaceContext(Element element)
{
_element = element;
}
/** Translate a namespace prefix into a URI
*
* Translate the prefix used in a component of an XPath
* into its expanded namespace URI.
*
* @param prefix The namespace prefix
*
* @return The URI matching the prefix
*
* @see com.werken.xpath.ContextSupport#setNamespaceContext
*/
public String translateNamespacePrefix(String prefix)
{
// Initialize the prefix->URI mapping upon the first
// call to this method. Traverse from the <>
// to the current Element, accumulating namespace
// declarations.
if ( prefix == null || "".equals( prefix ) )
{
return "";
}
if ( _namespaceMapping == null )
{
_namespaceMapping = new HashMap();
Stack lineage = new Stack();
lineage.push(_element);
Element elem = _element.getParent();
while (elem != null)
{
lineage.push(elem);
elem = elem.getParent();
}
List nsList = null;
Iterator nsIter = null;
Namespace eachNS = null;
while ( ! lineage.isEmpty() )
{
elem = (Element) lineage.pop();
nsList = elem.getAdditionalNamespaces();
if ( ! nsList.isEmpty() )
{
nsIter = nsList.iterator();
while (nsIter.hasNext())
{
eachNS = (Namespace) nsIter.next();
_namespaceMapping.put( eachNS.getPrefix(),
eachNS.getURI() );
}
}
}
}
return (String) _namespaceMapping.get( prefix );
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/VariableContext.java 0100644 0001750 0001750 00000001302 07174622764 025312 0 ustar tokamoto tokamoto
package com.werken.xpath;
/**
Specification of the interface required by
* {@link com.werken.xpath.ContextSupport} for delegation
* of variable resolution.
*
* @author bob mcwhirter (bob @ werken.com)
*/
public interface VariableContext
{
/** Resolve a variable binding
*
*
Retrieve the currently bound value of the named
* variable, or null if no such binding exists.
*
* @param name The name of the variable sought.
*
* @return The currently bound value of the variable, or null.
*
* @see com.werken.xpath.ContextSupport#getVariableValue
* @see com.werken.xpath.ContextSupport#setVariableContext
*/
Object getVariableValue(String name);
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/DefaultVariableContext.java 0100644 0001750 0001750 00000002324 07174622705 026617 0 ustar tokamoto tokamoto
package com.werken.xpath;
import java.util.Map;
import java.util.HashMap;
/**
A {@link com.werken.xpath.VariableContext}
* implementation based upon a java.util.HashMap for simple
* name-value mappings.
*
* @author bob mcwhirter (bob @ werken.com)
*/
public class DefaultVariableContext implements VariableContext
{
private Map _variables = new HashMap();
/** Resolve a variable binding
*
*
Retrieve the currently bound value of the named
* variable, or null if no such binding exists.
*
* @param name The name of the variable sought.
*
* @return The currently bound value of the variable, or null.
*
* @see com.werken.xpath.ContextSupport#getVariableValue
* @see com.werken.xpath.ContextSupport#setVariableContext
*/
public Object getVariableValue(String name)
{
return _variables.get(name);
}
/** Set a variable finding
*
*
Set the value of a named variable.
*
* @param name The name of the variable to bind to the value
* @param value The value to bind to the variable name.
*/
public void setVariableValue(String name,
Object value)
{
_variables.put(name,
value);
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/XPathFunctionContext.java 0100644 0001750 0001750 00000010576 07175343333 026325 0 ustar tokamoto tokamoto
package com.werken.xpath;
import com.werken.xpath.function.*;
import java.util.Map;
import java.util.HashMap;
/**
Implementation of {@link com.werken.xpath.FunctionContext} which
* matches the core function library as described by the W3C XPath
* Specification.
*
*
May be directly instantiated or subclassed. A Singleton is
* provided for ease-of-use in the default case of bare XPaths.
*
* @author bob mcwhirter (bob @ werken.com)
*/
public class XPathFunctionContext implements FunctionContext
{
/** Lock for Singleton creation and double-checked locking */
private final static Object _instanceLock = new Object();
/** Singleton instance */
private static XPathFunctionContext _instance = null;
/** Actual map of name-to-function. */
private final Map _functions = new HashMap();
/** Get the XPathFunctionContext singleton.
*
* @return The global, immutable FunctionContext which matches
* the functions as described by the W3C XPath specification.
*/
public static XPathFunctionContext getInstance()
{
if (_instance == null)
{
synchronized (_instanceLock)
{
if (_instance == null)
{
_instance = new XPathFunctionContext();
}
}
}
return _instance;
}
public XPathFunctionContext()
{
// ----------------------------------------
// Node-set Functions
//
// Section 4.1
// ----------------------------------------
addFunction( "last",
new LastFunction() );
addFunction( "position",
new PositionFunction() );
addFunction( "count",
new CountFunction() );
addFunction( "local-name",
new LocalNameFunction() );
addFunction( "namespace-uri",
new NamespaceUriFunction() );
addFunction( "name",
new NameFunction() );
// ----------------------------------------
// String Functions
//
// Section 4.2
// ----------------------------------------
addFunction( "string",
new StringFunction() );
addFunction( "concat",
new ConcatFunction() );
addFunction( "starts-with",
new StartsWithFunction() );
addFunction( "contains",
new ContainsFunction() );
addFunction( "substring-before",
new SubstringBeforeFunction() );
addFunction( "substring-after",
new SubstringAfterFunction() );
addFunction( "substring",
new SubstringFunction() );
addFunction( "string-length",
new StringLengthFunction() );
// ----------------------------------------
// Boolean Functions
//
// Section 4.3
// ----------------------------------------
addFunction( "boolean",
new BooleanFunction() );
addFunction( "not",
new NotFunction() );
addFunction( "true",
new TrueFunction() );
addFunction( "false",
new FalseFunction() );
// ----------------------------------------
// Number Functions
//
// Section 4.4
// ----------------------------------------
addFunction( "number",
new NumberFunction());
addFunction( "sum",
new SumFunction());
addFunction( "floor",
new FloorFunction());
addFunction( "ceiling",
new CeilingFunction());
addFunction( "round",
new RoundFunction());
}
/** Add a function to this FunctionContext
*
* @param name The name of the function.
* @param func The implementing Function Object.
*/
protected void addFunction(String name,
Function func)
{
_functions.put(name,
func);
}
/** Retrieve a named function
*
*
Retrieve the named function object, or null
* if no such function exists.
*
* @param name The name of the function sought.
*
* @return The {@link com.werken.xpath.function.Function}
* matching the specified name.
*
* @see com.werken.xpath.ContextHelper#setFunctionContext
*/
public Function getFunction(String name)
{
return (Function) _functions.get(name);
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/parser/ 0042755 0001750 0001750 00000000000 07330702744 022651 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/src/com/werken/xpath/parser/xpath.g 0100644 0001750 0001750 00000023523 07177626225 024155 0 ustar tokamoto tokamoto /*
This is an antlr (www.antlr.org) grammar specifying
a recognizer/parser/lexer group compliant with the
W3C Recommendation known as:
XML Path Language (XPath)
Version 1.0
W3C Recommendation 16 November 1999
http://www.w3c.org/TR/1999/REC-xpath-19991116
It is annotated with both implementation comments,
and references to the XPath standard's production
rules for recognizing parts of an xpath.
author: bob mcwhirter (bob@werken.com)
license: Apache Software Foundation
copyright: bob mcwhirter AND Werken & Sons Company
*/
header
{
package com.werken.xpath.parser;
import com.werken.xpath.XPath;
import com.werken.xpath.impl.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
/** Generated by antlr parser-generator */
}
class XPathRecognizer extends Parser;
options
{
k = 2;
exportVocab=XPath;
}
// ----------------------------------------
// Helpful methods
{
private Expr makeBinaryExpr(Op op, Expr lhs, Expr rhs)
{
if ( op == null ) {
return lhs;
}
return new BinaryExpr(op, lhs, rhs);
}
}
xpath returns [Expr expr]
{
expr = null;
}
:
expr=union_expr
;
location_path returns [LocationPath path]
{
path = null;
}
:
path=absolute_location_path
| path=relative_location_path
;
absolute_location_path returns [LocationPath path]
{
path = new LocationPath();
}
:
( SLASH^
| DOUBLE_SLASH^
{
path.addStep( new NodeTypeStep("descendant-or-self", "node") );
}
)
( (AT|STAR|IDENTIFIER)=>
path=i_relative_location_path[path]
|
)
{
path.setIsAbsolute(true);
}
;
relative_location_path returns [LocationPath path]
{
path = null;
}
:
path=i_relative_location_path[path]
;
i_relative_location_path[LocationPath in_path] returns [LocationPath path]
{
if (in_path == null) {
path = new LocationPath();
} else {
path = in_path;
}
Step step = null;
}
:
step=step
{
path.addStep(step);
}
( ( SLASH^
| DOUBLE_SLASH^
{
path.addStep( new NodeTypeStep("descendant-or-self", "node") );
}
) step=step
{
path.addStep(step);
}
)*
;
step returns [Step step]
{
step = null;
String axis = "child";
String localName = null;
String prefix = null;
String nodeType = null;
Predicate pred = null;
}
:
(
// If it has an axis
( (IDENTIFIER DOUBLE_COLON | AT)=> axis=axis
|
)
(
(
(
( ns:IDENTIFIER COLON
{
prefix = ns.getText();
}
)?
( id:IDENTIFIER
{
localName = id.getText();
}
| STAR
{
localName = "*";
}
)
)
{
step = new NameTestStep(axis, prefix, localName);
}
)
|
step=special_step[axis]
)
(
pred=predicate
{
((UnAbbrStep)step).addPredicate(pred);
}
)*
)
| step=abbr_step
(
pred=predicate
{
((UnAbbrStep)step).addPredicate(pred);
}
)*
;
special_step[String axis] returns [Step step]
{
step = null;
String piTarget = null;
}
:
{
LT(1).getText().equals("processing-instruction")
}?
IDENTIFIER LEFT_PAREN
( target:IDENTIFIER
{
piTarget = target.getText();
}
)?
RIGHT_PAREN
{
step = new PIStep(axis, piTarget);
}
|
{
LT(1).getText().equals("comment")
||
LT(1).getText().equals("text")
||
LT(1).getText().equals("node")
}?
nodeType:IDENTIFIER LEFT_PAREN RIGHT_PAREN
{
step = new NodeTypeStep(axis, nodeType.getText());
}
;
axis returns [String axisName]
{
axisName = null;
}
:
( id:IDENTIFIER DOUBLE_COLON^
{
axisName = id.getText();
}
| AT
{
axisName = "attribute";
}
)
;
// ----------------------------------------
// Section 2.4
// Predicates
// ----------------------------------------
// .... production [8] ....
//
predicate returns [Predicate pred]
{
pred = null;
}
:
LEFT_BRACKET^ pred=predicate_expr RIGHT_BRACKET!
;
// .... production [9] ....
//
predicate_expr returns [Predicate pred]
{
pred = null;
Expr expr = null;
}
:
expr=expr
{
pred = new Predicate(expr);
}
;
// .... production [12] ....
//
abbr_step returns [Step step]
{
step = null;
}
:
DOT
{
step = new NodeTypeStep("self", "node");
}
| DOT_DOT
{
step = new ParentStep();
}
;
// .... production [13] ....
//
abbr_axis_specifier
:
( AT )?
;
// ----------------------------------------
// Section 3
// Expressions
// ----------------------------------------
// ----------------------------------------
// Section 3.1
// Basics
// ----------------------------------------
// .... production [14] ....
//
expr returns [Expr expr]
{
expr = null;
}
:
expr=or_expr
;
// .... production [15] ....
//
primary_expr returns [Expr expr]
{
expr = null;
}
:
expr=variable_reference
| LEFT_PAREN! expr=expr RIGHT_PAREN!
| expr=literal
| expr=number
| expr=function_call
;
literal returns [Expr expr]
{
expr = null;
}
:
lit:LITERAL^
{
expr = new StringExpr(lit.getText());
}
;
number returns [Expr expr]
{
expr = null;
}
:
num:NUMBER^
{
expr = new NumberExpr(num.getText());
}
;
variable_reference returns [VariableExpr expr]
{
expr = null;
}
:
DOLLAR_SIGN^ id:IDENTIFIER
{
expr = new VariableExpr(id.getText());
}
;
// ----------------------------------------
// Section 3.2
// Function Calls
// ----------------------------------------
// .... production [16] ....
//
function_call returns [FunctionExpr expr]
{
expr = null;
List args = null;
}
:
id:IDENTIFIER LEFT_PAREN^ ( args=arg_list )? RIGHT_PAREN!
{
expr = new FunctionExpr(id.getText(), args);
}
;
// .... production [16.1] ....
//
arg_list returns [List args]
{
args = new ArrayList();
Expr expr = null;
}
:
expr=argument
{
args.add(expr);
}
( COMMA expr=argument
{
args.add(expr);
}
)*
;
// .... production [17] ....
//
argument returns [Expr expr]
{
expr = null;
}
:
expr=expr
;
// ----------------------------------------
// Section 3.3
// Node-sets
// ----------------------------------------
// .... production [18] ....
//
union_expr returns [Expr expr]
{
expr = null;
Expr lhs = null;
Expr rhs = null;
Op op = null;
}
:
lhs=path_expr
( PIPE! { op=Op.UNION; }
rhs=path_expr
)*
{
expr = makeBinaryExpr(op, lhs, rhs);
}
;
// .... production [19] ....
//
path_expr returns [PathExpr expr]
{
expr = null;
LocationPath path = null;
}
:
// This is here to differentiate between the
// special case of the first step being a NodeTypeTest
// or just a normal filter-expr function call.
// Is it a special nodeType 'function name'
(IDENTIFIER LEFT_PAREN)=>{
LT(1).getText().equals("processing-instruction")
||
LT(1).getText().equals("comment")
||
LT(1).getText().equals("text")
||
LT(1).getText().equals("node")
}?
expr=location_path
|
(IDENTIFIER LEFT_PAREN)=>
expr=filter_expr
( path=absolute_location_path
{
((FilterExpr)expr).setLocationPath(path);
}
)?
|
(DOT|DOT_DOT|SLASH|DOUBLE_SLASH|IDENTIFIER|AT)=>
expr=location_path
|
expr=filter_expr
( path=absolute_location_path
{
((FilterExpr)expr).setLocationPath(path);
}
)?
;
// .... production [20] ....
//
filter_expr returns [ FilterExpr expr ]
{
expr = null;
Predicate pred = null;
Expr filterExpr = null;
}
:
filterExpr=primary_expr
{
expr = new FilterExpr(filterExpr);
}
( pred=predicate
{
expr.addPredicate(pred);
}
)*
;
// ----------------------------------------
// Section 3.4
// Booleans
// ----------------------------------------
// .... production [21] ....
//
or_expr returns [Expr expr]
{
expr = null;
Expr lhs = null;
Expr rhs = null;
Op op = null;
}
:
expr=and_expr ( KW_OR^ { op = Op.OR; }
rhs=and_expr
{
expr = makeBinaryExpr(op, expr, rhs);
}
)*
;
// .... production [22] ....
//
and_expr returns [Expr expr]
{
expr = null;
Expr lhs = null;
Expr rhs = null;
Op op = null;
}
:
lhs=equality_expr ( KW_AND^ { op = Op.AND; }
rhs=equality_expr )?
{
expr = makeBinaryExpr(op, lhs, rhs);
}
;
// .... production [23] ....
//
equality_expr returns [Expr expr]
{
expr = null;
Expr lhs = null;
Expr rhs = null;
Op op = null;
}
:
lhs=relational_expr ( ( EQUALS^ { op = Op.EQUAL; }
| NOT_EQUALS^ { op = Op.NOT_EQUAL; }
)
rhs=relational_expr
)?
{
expr = makeBinaryExpr(op, lhs, rhs);
}
;
// .... production [24] ....
//
relational_expr returns [Expr expr]
{
expr = null;
Expr lhs = null;
Expr rhs = null;
Op op = null;
}
:
lhs=additive_expr ( ( LT^ { op = Op.LT; }
| GT^ { op = Op.GT; }
| LTE^ { op = Op.LT_EQUAL; }
| GTE^ { op = Op.GT_EQUAL; }
)
rhs=additive_expr
)?
{
expr = makeBinaryExpr(op, lhs, rhs);
}
;
// ----------------------------------------
// Section 3.5
// Numbers
// ----------------------------------------
// .... production [25] ....
//
additive_expr returns [Expr expr]
{
expr = null;
Expr lhs = null;
Expr rhs = null;
Op op = null;
}
:
lhs=mult_expr ( ( PLUS^ { op = Op.PLUS; }
| MINUS^ { op = Op.MINUS; }
)
rhs=mult_expr
)?
{
expr = makeBinaryExpr(op, lhs, rhs);
}
;
// .... production [26] ....
//
mult_expr returns [Expr expr]
{
expr = null;
Expr lhs = null;
Expr rhs = null;
Op op = null;
}
:
lhs=unary_expr ( ( STAR^ { op = Op.MULTIPLY; }
| DIV^ { op = Op.DIV; }
| MOD^ { op = Op.MOD; }
)
rhs=unary_expr
)?
{
expr = makeBinaryExpr(op, lhs, rhs);
}
;
// .... production [27] ....
//
unary_expr returns [Expr expr]
{
expr = null;
}
:
expr=union_expr
|
MINUS expr=unary_expr
{
expr = new NegativeExpr(expr);
}
;
werken.xpath-0.9.4.orig/src/com/werken/xpath/parser/xpath_lexer.g 0100644 0001750 0001750 00000002227 07204257645 025347 0 ustar tokamoto tokamoto
header
{
package com.werken.xpath.parser;
/** Generated by antlr parser-generator */
}
class XPathLexer extends Lexer;
options
{
k = 3;
importVocab=XPath;
}
tokens
{
KW_OR = "or";
KW_AND = "and";
}
WS
:
('\n' | ' ' | '\t' | '\r')+
{
$setType(Token.SKIP);
}
;
protected
DIGIT
:
('0'..'9')
;
protected
SINGLE_QUOTE_STRING
:
'\''! (~('\''))* '\''!
;
protected
DOUBLE_QUOTE_STRING
:
'"'! (~('"'))* '"'!
;
LITERAL
:
SINGLE_QUOTE_STRING | DOUBLE_QUOTE_STRING
;
NUMBER
:
(DIGIT)+ ('.' (DIGIT)+)?
;
IDENTIFIER
options
{
testLiterals=true;
}
:
('\241'..'\377'|'a'..'z'|'A'..'Z'|'_') ('\241'..'\377'|'a'..'z'|'A'..'Z'|'-'|'_'|'0'..'9'|'.')*
;
LEFT_PAREN
: '(' ;
RIGHT_PAREN
: ')' ;
LEFT_BRACKET
: '[' ;
RIGHT_BRACKET
: ']' ;
PIPE
: '|' ;
DOT
: '.' ;
DOT_DOT
: ".." ;
AT
: '@' ;
COMMA
: ',' ;
DOUBLE_COLON
: "::" ;
COLON
: ":" ;
SLASH
: '/' ;
DOUBLE_SLASH
: '/' '/' ;
DOLLAR_SIGN
: '$' ;
PLUS
: '+' ;
MINUS
: '-' ;
EQUALS
: '=' ;
NOT_EQUALS
: "!=" ;
LT
: '<' ;
LTE
: "<=" ;
GT
: '>' ;
GTE
: ">=" ;
STAR
: '*' ;
werken.xpath-0.9.4.orig/src/com/werken/xpath/parser/package.html 0100644 0001750 0001750 00000000310 07160040050 025101 0 ustar tokamoto tokamoto
ContextSupport maintains information to aid in the
* execution of the XPath against a context node.
*
*
It separates the knowledge of functions, variables
* and namespace-bindings from the context node to
* be walked.
*
* @author bob mcwhirter (bob @ werken.com)
*/
public class ContextSupport
{
static final ContextSupport BASIC_CONTEXT_SUPPORT = new ContextSupport();
private NamespaceContext _nsContext = null;
private FunctionContext _functionContext = XPathFunctionContext.getInstance();
private VariableContext _variableContext = null;
/** Construct a semantically empty ContextSupport
*/
public ContextSupport()
{
// intentionally left blank
}
/** Construct a semantically initialized ContextSupport
*
* @param nsContext The NamespaceContext implementation
* @param functionContext The FunctionContext implementation
* @param variableContext The VariableContext implementation
*/
public ContextSupport(NamespaceContext nsContext,
FunctionContext functionContext,
VariableContext variableContext)
{
_nsContext = nsContext;
_functionContext = functionContext;
_variableContext = variableContext;
}
/** Set the NamespaceContext implementation
*
* @param nsContext The NamespaceContext implementation
*/
public void setNamespaceContext(NamespaceContext nsContext)
{
_nsContext = nsContext;
}
/** Set the FunctionContext implementation
*
* @param functionContext The FunctionContext implementation
*/
public void setFunctionContext(FunctionContext functionContext)
{
_functionContext = functionContext;
}
/** Set the VariableContext implementation
*
* @param variableContext The FunctionContext implementation
*/
public void setVariableContext(VariableContext variableContext)
{
_variableContext = variableContext;
}
/** Translate a namespace prefix into a URI
*
*
Using the {@link com.werken.xpath.NamespaceContext}
* implementation, translate the prefix used in a component of an XPath
* into its expanded namespace URI.
*
* @param prefix The namespace prefix
*
* @return The URI matching the prefix
*
* @see #setNamespaceContext
*/
public String translateNamespacePrefix(String prefix)
{
if (_nsContext == null)
{
return null;
}
return _nsContext.translateNamespacePrefix(prefix);
}
/** Retrieve a named function
*
*
Retrieve the named function object, or null
* if no such function exists. Delegates to the
* {@link com.werken.xpath.FunctionContext} implementation
* provided, if any.
*
* @param name The name of the function sought.
*
* @return The {@link com.werken.xpath.function.Function}
* matching the specified name.
*
* @see #setFunctionContext
*/
public Function getFunction(String name)
{
return _functionContext.getFunction(name);
}
/** Resolve a variable binding
*
*
Retrieve the currently bound value of the named
* variable, or null if no such binding exists. Delegates
* to the {@link com.werken.xpath.VariableContext} implementation
* provided, if any.
*
* @param name The name of the variable sought.
*
* @return The currently bound value of the variable, or null.
*
* @see #setVariableContext
*/
public Object getVariableValue(String name)
{
if ( _variableContext == null )
{
return null;
}
return _variableContext.getVariableValue(name);
}
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/Context.java 0100644 0001750 0001750 00000000726 07175200641 023640 0 ustar tokamoto tokamoto
package com.werken.xpath;
import com.werken.xpath.function.Function;
import java.util.List;
public interface Context
{
List getNodeSet();
Object getContextNode();
int getPosition();
int getSize();
boolean isEmpty();
String translateNamespacePrefix(String prefix);
Object getVariableValue(String name);
Function getFunction(String name);
ContextSupport getContextSupport();
void setNodeSet(List nodeSet);
Context duplicate();
}
werken.xpath-0.9.4.orig/src/com/werken/xpath/package.html 0100644 0001750 0001750 00000000221 07160040002 023603 0 ustar tokamoto tokamoto
com.werken.xpath :: package.html
Provides the core tools needed to use XPath
werken.xpath-0.9.4.orig/TODO 0100644 0001750 0001750 00000000315 07220152147 016045 0 ustar tokamoto tokamoto
* Renamed ContextHelper to ContextSupport
* Maintain Namespace parent information (wrap?)
* Maintain Attribute parent information (hashmap?)
* Document Order!!
* Replace my testcase stuff with JUnit.
werken.xpath-0.9.4.orig/test/ 0042755 0001750 0001750 00000000000 07330702746 016352 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/test/src/ 0042755 0001750 0001750 00000000000 07330702746 017141 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/test/src/com/ 0042755 0001750 0001750 00000000000 07330702746 017717 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/test/src/com/werken/ 0042755 0001750 0001750 00000000000 07330702746 021212 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/test/src/com/werken/xpath/ 0042755 0001750 0001750 00000000000 07330702746 022336 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/test/src/com/werken/xpath/test/ 0042755 0001750 0001750 00000000000 07330702746 023315 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/test/src/com/werken/xpath/test/Driver.java 0100644 0001750 0001750 00000027310 07202561102 025374 0 ustar tokamoto tokamoto
package com.werken.xpath.test;
import com.werken.xpath.XPath;
import com.werken.xpath.ContextSupport;
import com.werken.xpath.XPathFunctionContext;
import com.werken.xpath.DefaultVariableContext;
import com.werken.xpath.ElementNamespaceContext;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;
import org.jdom.output.XMLOutputter;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Vector;
public class Driver
{
public static void main(String[] args)
{
System.err.println("werken.xpath test-driver");
if ( args.length != 1 )
{
System.err.println("Usage:");
System.err.println("java com.werken.xpath.test.Driver ");
System.exit(1);
}
File driverXML = new File( args[0] );
if ( ! driverXML.exists() )
{
System.err.println("error: " + driverXML + " does not exist");
System.exit(1);
}
System.out.println("Using test-cases in [" + args[0] + "]");
File dataDir = driverXML.getParentFile();
Driver driver = new Driver(dataDir,
driverXML);
driver.run();
}
private File _dataDirectory = null;
private File _driverXML = null;
private Map _testDocuments = new HashMap();
private ContextSupport _support = null;
private Vector _failed = new Vector();
private int _passed = 0;
public Driver(File dataDirectory,
File driverXML)
{
_dataDirectory = dataDirectory;
_driverXML = driverXML;
_support = new ContextSupport();
}
public void run()
{
SAXBuilder builder = new SAXBuilder();
try
{
Document doc = builder.build( _driverXML );
Element root = doc.getRootElement();
List testCases = root.getChildren("testcase");
Iterator testIter = testCases.iterator();
while ( testIter.hasNext() )
{
doTestCase( (Element) testIter.next() );
}
}
catch (JDOMException e)
{
e.printStackTrace();
}
System.out.println("================================================================================");
System.out.println("TEST SUMMARY");
System.out.println(" PASSED: " + _passed);
System.out.println(" FAILED: " + _failed.size());
if ( _failed.size() > 0 )
{
System.out.println("----------------------------------------------");
System.out.println("FAILURES");
System.out.println("----------------------------------------------");
Iterator failedIter = _failed.iterator();
Element eachFailure = null;
while (failedIter.hasNext())
{
eachFailure = (Element) failedIter.next();
System.out.println(" " + eachFailure.getAttributeValue("caseID"));
System.out.println(" " + eachFailure.getChildTextTrim("description"));
System.out.println(" " + eachFailure.getAttributeValue("xpath"));
System.out.println("----------------------------------------------");
}
}
System.out.println("================================================================================");
}
private Document getTestDocument(String identifier)
{
Document doc = (Document) _testDocuments.get(identifier);
if (doc == null)
{
File testDoc = new File(_dataDirectory,
identifier);
if ( ! testDoc.exists() )
{
System.err.println("error: test document [" + identifier + "] does not exist");
return null;
}
try
{
SAXBuilder builder = new SAXBuilder();
doc = builder.build(testDoc);
}
catch (JDOMException e)
{
e.printStackTrace();
}
if ( doc != null )
{
_testDocuments.put(identifier,
doc);
}
}
return doc;
}
private void doTestCase(Element testCase)
{
String caseID = testCase.getAttributeValue("caseID");
String desc = testCase.getChildTextTrim("description");
String testDoc = testCase.getAttributeValue("document");
String startNode = testCase.getAttributeValue("start");
String xpathStr = testCase.getAttributeValue("xpath");
System.out.println( "--------------------------------------------------------------------------------" );
System.out.println( " " + caseID + " :: " + desc);
System.out.println( " document :: " + testDoc );
System.out.println( " start :: " + startNode );
System.out.println( " xpath :: " + xpathStr );
boolean success = false;
Document doc = getTestDocument( testDoc );
Document resultDoc = null;
Element expectedResults = testCase.getChild("results");
if ( doc != null )
{
XPath xpath = new XPath(xpathStr);
_support.setNamespaceContext( new ElementNamespaceContext( testCase ) );
Object results = xpath.applyTo( _support, doc );
resultDoc = xmlizeResults( results );
expectedResults = testCase.getChild("results");
success = compareResults( resultDoc.getRootElement(),
expectedResults );
}
System.out.println( " results :: " + ( success ? "PASSED" : "FAILED" ));
if ( success )
{
++_passed;
}
else
{
_failed.add(testCase);
}
if ( !success )
{
if ( doc == null )
{
System.out.println(" !! unable to locate test document !!");
}
else
{
XMLOutputter outputter = new XMLOutputter(" ", true);
try
{
System.out.println( "selected :: ");
outputter.output(resultDoc,
System.out);
Element expectedElem = new Element("results");
Document expectedDoc = new Document( expectedElem );
Iterator expectedIter = expectedResults.getChildren().iterator();
while (expectedIter.hasNext())
{
expectedElem.addContent( (Element) ((Element)expectedIter.next()).clone() );
}
System.out.println( "expected :: ");
outputter.output(expectedDoc,
System.out);
}
catch (IOException ioe)
{
ioe.printStackTrace();
}
}
}
}
private boolean compareResults(Element results,
Element expected)
{
List expectedChildren = expected.getChildren();
int expectedSize = expectedChildren.size();
HashSet seen = new HashSet();
if ( results.getChildren().size() != expectedSize )
{
return false;
}
Iterator expectedIter = expectedChildren.iterator();
Element eachExpected = null;
while ( expectedIter.hasNext() )
{
eachExpected = (Element) expectedIter.next();
if ( ! findInResults( results,
eachExpected,
seen ) )
{
return false;
}
}
return true;
}
private boolean findInResults(Element results,
Element expected,
Set seen)
{
if (expected.getName().equals("element"))
{
return findElementInResults(results,
expected,
seen);
}
if (expected.getName().equals("root"))
{
return findRootInResults(results,
seen);
}
return false;
}
private boolean findRootInResults(Element results,
Set seen)
{
List rootElems = results.getChildren("root");
Iterator rootIter = rootElems.iterator();
Element eachRoot = null;
while (rootIter.hasNext())
{
eachRoot = (Element) rootIter.next();
if ( ! seen.contains( eachRoot ) )
{
seen.add( eachRoot );
return true;
}
}
return false;
}
private boolean findElementInResults(Element results,
Element expected,
Set seen)
{
Element expectedElem = (Element) expected.getChildren().get(0);
List resultElems = results.getChildren();
Iterator resultIter = resultElems.iterator();
Element eachResult = null;
Element resultElem = null;
List resultList = null;
while (resultIter.hasNext())
{
eachResult = (Element) resultIter.next();
if ( ! seen.contains( eachResult ) )
{
resultList = eachResult.getChildren();
if ( ! resultList.isEmpty())
{
resultElem = (Element) resultList.get(0);
if (resultElem.getName().equals( expectedElem.getName() ) )
{
if ( resultElem.getAttributeValue("id").equals( expectedElem.getAttributeValue("id")) )
{
seen.add(resultElem);
return true;
}
}
}
}
}
return false;
}
private Document xmlizeResults(Object results)
{
if (results instanceof List)
{
return xmlizeResults( (List) results );
}
return null;
}
private Document xmlizeResults(List nodeSet)
{
Element results = new Element("results");
Document doc = new Document(results);
Iterator nodeIter = nodeSet.iterator();
Object each = null;
Element resultNode = null;
Element node = null;
String elemID = null;
while ( nodeIter.hasNext() )
{
each = nodeIter.next();
if ( each instanceof Element )
{
node = new Element( "element" );
resultNode = new Element( ((Element)each).getName() );
elemID = ((Element)each).getAttributeValue("id");
if (elemID == null)
{
elemID = "";
}
resultNode.addAttribute("id", elemID);
node.addContent( resultNode );
results.addContent( node );
}
else if ( each instanceof Document )
{
resultNode = new Element( "root" );
results.addContent( resultNode );
}
}
return doc;
}
}
werken.xpath-0.9.4.orig/test/data/ 0042755 0001750 0001750 00000000000 07330702746 017263 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/test/data/abbr_tests.xml 0100644 0001750 0001750 00000030510 07204610140 022111 0 ustar tokamoto tokamoto
Selects the root element (the JDOM Document)
Selects the document element (<book>)
Selects the book title element (<title>)
Selects the chapter elements (<chapter>)
Selects the chapter title elements (<title>)
Selects the all title elements (<title>)
Selects the title of chapter 2 (<title>)
Selects the title of the 2nd chapter (<title>)
Selects last chapter (<chapter>)
Selects the book (<book>)
Selects all chapters (<chapter>)
Selects all chapters with author=bob (<chapter>)
Selects all chapters with author=bob (<chapter>)
Selects all chapters with author=bob (<chapter>)
Selects all chapters with author=rebecca (<chapter>)
Selects all chapters with author=bob or author=rebecca (<chapter>)
Selects all chapters with author=bob or author=rebecca or authorjames(<chapter>)
Selects all chapters with author!=bob (<chapter>)
Selects all chapters with author!=bob AND author!=rebecca (<chapter>)
Selects all chapters with authors
Selects all chapters without authors
Selects all children a book
Selects all children of book which have a title
Selects all children of book which have a title, and are written by james
Selects all children of book which have or are a title
Selects all elements which are parents of a title
Selects all elements which have a title
werken.xpath-0.9.4.orig/test/data/iso_latin_1_tests.xml 0100644 0001750 0001750 00000024316 07204610140 023413 0 ustar tokamoto tokamoto
Selects the root element (the JDOM Document)
Selects the Data_Model element (<Data_Model>)
Selects the Data_Model Databases Database element (<Database>)
Selects the Table elements (<Table>)
Selects the Fields Field elements (<Field>)
Selects the all Field elements (<Field>)
Selects the Field of Flurst. Nr. (Zähler) (<Field>)
Selects the Fields of the 2nd Table (<Fields>)
Selects last Field (<Field>)
Selects the Data_Model (<Data_Model>)
Selects all Databases with int_name=gis (<Database>)
Selects all Database with int_name=gis (<Database>)
Selects all Tables with ext_name=001 Flurstück (<Table>)
Selects all Tables (<Table>)
Selects all Fields with int_name=folie or int_name=flurstueck
or int_name=flst_nr_nenner(<Field>)
Selects all Tables with int_name!=alk_flurstueck_ausg (<Table>)
Selects all Tables with extern names
Selects all Fields where type!=char
Selects all children of Data_Model
Selects all elements which are parents of a Fields
Selects all elements which have a Tables-Element
werken.xpath-0.9.4.orig/test/data/abbr_doc.xml 0100644 0001750 0001750 00000001447 07204610140 021523 0 ustar tokamoto tokamoto
How to Test Some XPath ImplementationThis is chapter OneThis is chapter TwoThis is chapter ThreeThis is chapter FourThis is chapter FiveThis is chapter Six
werken.xpath-0.9.4.orig/test/data/iso_latin_1_doc.xml 0100644 0001750 0001750 00000003212 07204611567 023024 0 ustar tokamoto tokamoto
werken.xpath-0.9.4.orig/LICENSE 0100644 0001750 0001750 00000004275 07156316127 016403 0 ustar tokamoto tokamoto /*--
Copyright (C) 2000 bob mcwhirter and The Werken & Sons Company
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the disclaimer that follows
these conditions in the documentation and/or other materials
provided with the distribution.
3. The name "werken.xpath" must not be used to endorse or promote
products derived from this software without prior written permission.
For written permission, please contact bob@werken.com
4. Products derived from this software may not be called "werken.xpath",
nor may "werken.xpath" appear in their name, without prior written
permission from the Werken & Sons Company (bob@werken.com).
In addition, we request (but do not require) that you include in the
end-user documentation provided with the redistribution and/or in the
software itself an acknowledgement equivalent to the following:
"This product includes software developed by
The Werken & Sons Company (http://www.werken.com/)."
Alternatively, the acknowledgment may be graphical using the logos
available at http://www.werken.com/pix/werken-digital.gif
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
werken.xpath-0.9.4.orig/README 0100644 0001750 0001750 00000006052 07157564171 016256 0 ustar tokamoto tokamoto ------------------------------------------------------------------------
werken.xpath :: Werken JDOM XPath Engine :: README.txt
------------------------------------------------------------------------
----------------------------------------
INTRODUCTION
----------------------------------------
This is the Werken JDOM XPath Engine (werken.xpath), created by the
Werken & Sons Company. It's available at .
It's not overly useful by itself, but rather needs an (currently in
development) implementation of XPointer, XSLT, or other XPath-based
specification. werken.xpath is merely an engine which can parse XPaths,
and walk JDOM trees.
----------------------------------------
REQUIREMENTS
----------------------------------------
* A modern Java2 platform ::
I'm using Sun's official JSDK 1.3 for Linux. Others should work
without much trouble also.
* The JDOM package.
This was written against the CVS tree, so it might not work with
whatever milestone source drop you're using. Hopefully a stable
release of JDOM will appear, and we can nail down a specific minimum
version.
* ANTLR Parser-Generator 2.7.x
Once again, I'm using a pre-release candidate, which has special
new features to play friendly with jakarta-ant (which is included).
The version of ANTLR we're using is (and always will be) included
in the distribution of werken.xpath. If you wish, you may always obtain
your own copy, with full documentation. *Everything* is simply a
parsing problem, after all.
----------------------------------------
DOCUMENTATION
----------------------------------------
Generated javadoc documentation will appear in the build/apidocs/
directory.
----------------------------------------
LICENSE
----------------------------------------
werken.xpath is licensed under the Apache Software Foundation
license. Please see for more information.
Basically, do what ever you wish, as long as you mention "Werken &
Sons Company" some where in your documentation, colophon, or 'about'
box. Just some place, give credit where credit is due.
----------------------------------------
ACKNOWLEDGEMENTS
----------------------------------------
* bob mcwhirter (bob@werken.com) -- Implementor of the initial code
base of werken.xpath.
* Michael Hinchy -- Originally started the JDOM XPath project, but
I forked, with 100% original code. Still, he motivated the work.
* Terence Parr (parrt@jguru.com) -- Let me hack on ANTLR for my own
evil purposes. Also, he originally wrote ANTLR, and we'd like to
give him credit for the wonderful tool he's graciouslly given to
the community.
* Jason Hunter (jhunter@collab.net) -- One of the JDOM guys (sorry,
but I've never dealt with Brett). Lively banter back'n'forth
regarding JDOM, XPath, ant && antlr.
werken.xpath-0.9.4.orig/runtests.sh 0100644 0001750 0001750 00000000517 07177636251 017622 0 ustar tokamoto tokamoto #!/bin/sh
TESTS_XML=./test/data/abbr_tests.xml
TEST_DRIVER=com.werken.xpath.test.Driver
ANTLR_CP=./lib/antlr-runtime.jar
JDOM_CP=./lib/jdom.jar
XERCES_CP=./lib/xerces.jar
XPATH_CP=./build/werken.xpath.jar
TEST_CP=./build/test/classes/
CP=$ANTLR_CP:$JDOM_CP:$XPATH_CP:$TEST_CP:$XERCES_CP
java -classpath $CP $TEST_DRIVER $TESTS_XML
werken.xpath-0.9.4.orig/LIMITATIONS 0100644 0001750 0001750 00000000537 07172362075 017113 0 ustar tokamoto tokamoto
Things that DO NOT WORK, and we already know about them:
1) Anything that is a peer of the root node of the document (comments, PIs).
2) Some functions:
position()
id(object)
normalize-space(string?)
translate(string,string,string)
lang(string)
3) Positional predicates
All else *should* be working (all axes, filter-exprs, predicates, etc)
werken.xpath-0.9.4.orig/build.bat 0100644 0001750 0001750 00000001444 07204610150 017143 0 ustar tokamoto tokamoto @echo off
echo Werken.XPath Build System
echo -------------------------
if "%JAVA_HOME%" == "" goto error
set JAVA_CP=%JAVA_HOME%/lib/tools.jar;%JAVA_HOME%/lib/dev.jar
set JDOM_CP=./lib/jdom.jar
set ANTLR_CP=./lib/antlr-all.jar
set XERCES_CP=./lib/xerces.jar
set ANT_CP=./lib/ant.jar
set ANT_HOME=./lib
set CP=%JAVA_CP%;%JDOM_CP%;%ANTLR_CP%;%XERCES_CP%;%ANT_CP%
echo Building with classpath %CP%
echo
echo Starting Ant...
echo
%JAVA_HOME%\bin\java.exe -Dant.home="%ANT_HOME%" -classpath %CP% org.apache.tools.ant.Main %1 %2 %3 %4 %5
goto end
:error
echo "ERROR: JAVA_HOME not found in your environment."
echo
echo "Please, set the JAVA_HOME variable in your environment to match the"
echo "location of the Java Virtual Machine you want to use."
:end werken.xpath-0.9.4.orig/build.xml 0100644 0001750 0001750 00000026172 07206110074 017204 0 ustar tokamoto tokamoto
werken.xpath-0.9.4.orig/build.sh 0100644 0001750 0001750 00000001377 07204067403 017023 0 ustar tokamoto tokamoto #!/bin/sh
echo
echo "Building..."
echo
if [ "$JAVA_HOME" = "" ] ; then
echo "ERROR: JAVA_HOME not found in your environment."
echo
echo "Please, set the JAVA_HOME variable in your environment to match the"
echo "location of the Java Virtual Machine you want to use."
exit 1
fi
JAVA_CP=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dev.jar
JDOM_CP=./lib/jdom.jar
ANTLR_CP=./lib/antlr-all.jar
XERCES_CP=./lib/xerces.jar
ANT_CP=./lib/ant.jar
ANT_HOME=./lib
CP=$JAVA_CP:$JDOM_CP:$ANTLR_CP:$XERCES_CP:$ANT_CP
echo Building with classpath $CP
echo
echo Starting Ant...
echo
#strace $JAVA_HOME/bin/java -Dant.home=$ANT_HOME -classpath $CP org.apache.tools.ant.Main $*
$JAVA_HOME/bin/java -Dant.home=$ANT_HOME -classpath $CP org.apache.tools.ant.Main $*
werken.xpath-0.9.4.orig/apidocs/ 0042755 0001750 0001750 00000000000 07330705437 017015 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/apidocs/com/ 0042755 0001750 0001750 00000000000 07330705437 017573 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/apidocs/com/werken/ 0042755 0001750 0001750 00000000000 07330705437 021066 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/ 0042755 0001750 0001750 00000000000 07330705437 022212 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/ 0042755 0001750 0001750 00000000000 07330705437 023153 5 ustar tokamoto tokamoto werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/Op.html 0100644 0001750 0001750 00000036446 07330705437 024427 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ Op
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/StringExpr.html 0100644 0001750 0001750 00000023042 07330705437 026142 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ StringExpr
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/FunctionExpr.html 0100644 0001750 0001750 00000022211 07330705437 026456 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ FunctionExpr
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/Predicate.html 0100644 0001750 0001750 00000023431 07330705437 025737 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ Predicate
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/BinaryExpr.html 0100644 0001750 0001750 00000023026 07330705437 026122 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ BinaryExpr
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/package-use.html 0100644 0001750 0001750 00000027430 07330705437 026227 0 ustar tokamoto tokamoto
werken.xpath API: ¥Ñ¥Ã¥±¡¼¥¸ com.werken.xpath.impl ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/NegativeExpr.html 0100644 0001750 0001750 00000022210 07330705437 026432 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ NegativeExpr
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/package-frame.html 0100644 0001750 0001750 00000004024 07330705437 026517 0 ustar tokamoto tokamoto
werken.xpath API: ¥Ñ¥Ã¥±¡¼¥¸ com.werken.xpath.impl
com.werken.xpath.impl
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/NodeTypeStep.html 0100644 0001750 0001750 00000040643 07330705437 026426 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ NodeTypeStep
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/NumberExpr.html 0100644 0001750 0001750 00000023046 07330705437 026130 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ NumberExpr
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/VariableExpr.html 0100644 0001750 0001750 00000021602 07330705437 026421 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ VariableExpr
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/PIStep.html 0100644 0001750 0001750 00000033226 07330705437 025206 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ PIStep
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/ParentStep.html 0100644 0001750 0001750 00000026054 07330705437 026130 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ ParentStep
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/package-tree.html 0100644 0001750 0001750 00000016570 07330705437 026375 0 ustar tokamoto tokamoto
werken.xpath API: com.werken.xpath.impl ¥¯¥é¥¹³¬ÁØ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/NameTestStep.html 0100644 0001750 0001750 00000037531 07330705437 026421 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ NameTestStep
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/StringExpr.html 0100644 0001750 0001750 00000011120 07330705437 030033 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.StringExpr ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/FunctionExpr.html 0100644 0001750 0001750 00000014375 07330705437 030371 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.FunctionExpr ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/Predicate.html 0100644 0001750 0001750 00000021131 07330705437 027631 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.Predicate ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/BinaryExpr.html 0100644 0001750 0001750 00000011120 07330705437 030011 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.BinaryExpr ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/NegativeExpr.html 0100644 0001750 0001750 00000011136 07330705437 030336 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.NegativeExpr ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/UnAbbrStep.html 0100644 0001750 0001750 00000015306 07330705437 027745 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.UnAbbrStep ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/NodeTypeStep.html 0100644 0001750 0001750 00000014114 07330705437 030317 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.NodeTypeStep ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/NumberExpr.html 0100644 0001750 0001750 00000011120 07330705437 030015 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.NumberExpr ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/VariableExpr.html 0100644 0001750 0001750 00000014407 07330705437 030325 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.VariableExpr ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/PIStep.html 0100644 0001750 0001750 00000011064 07330705437 027101 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.PIStep ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/ParentStep.html 0100644 0001750 0001750 00000011120 07330705437 030013 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.ParentStep ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/NameTestStep.html 0100644 0001750 0001750 00000011136 07330705437 030311 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.NameTestStep ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/AbbrStep.html 0100644 0001750 0001750 00000014545 07330705437 027446 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.AbbrStep ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/SelfStep.html 0100644 0001750 0001750 00000011102 07330705437 027453 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.SelfStep ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/FilterExpr.html 0100644 0001750 0001750 00000014335 07330705437 030025 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.FilterExpr ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/Context.html 0100644 0001750 0001750 00000077341 07330705437 027373 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.Context ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/PathExpr.html 0100644 0001750 0001750 00000017420 07330705437 027472 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.PathExpr ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/Expr.html 0100644 0001750 0001750 00000047471 07330705437 026666 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.Expr ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/Step.html 0100644 0001750 0001750 00000027606 07330705437 026661 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.Step ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/class-use/LocationPath.html 0100644 0001750 0001750 00000026051 07330705437 030324 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.impl.LocationPath ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/AbbrStep.html 0100644 0001750 0001750 00000020776 07330705437 025552 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ AbbrStep
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/SelfStep.html 0100644 0001750 0001750 00000023512 07330705437 025564 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ SelfStep
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/FilterExpr.html 0100644 0001750 0001750 00000025143 07330705437 026125 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ FilterExpr
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/Context.html 0100644 0001750 0001750 00000043313 07330705437 025464 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ Context
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/PathExpr.html 0100644 0001750 0001750 00000020371 07330705437 025572 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ PathExpr
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/Expr.html 0100644 0001750 0001750 00000022121 07330705437 024750 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ Expr
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/package-summary.html 0100644 0001750 0001750 00000017616 07330705437 027135 0 ustar tokamoto tokamoto
werken.xpath API: ¥Ñ¥Ã¥±¡¼¥¸ com.werken.xpath.impl
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/Step.html 0100644 0001750 0001750 00000025357 07330705437 024763 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ Step
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/impl/LocationPath.html 0100644 0001750 0001750 00000027666 07330705437 026442 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ LocationPath
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/util/package-frame.html 0100644 0001750 0001750 00000001734 07330705437 026540 0 ustar tokamoto tokamoto
werken.xpath API: ¥Ñ¥Ã¥±¡¼¥¸ com.werken.xpath.util
com.werken.xpath.util
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/util/Partition.html 0100644 0001750 0001750 00000026557 07330705437 026040 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ Partition
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/util/package-tree.html 0100644 0001750 0001750 00000012076 07330705437 026406 0 ustar tokamoto tokamoto
werken.xpath API: com.werken.xpath.util ¥¯¥é¥¹³¬ÁØ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/util/class-use/Partition.html 0100644 0001750 0001750 00000011111 07330705437 027713 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.util.Partition ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/util/class-use/ReverseDocumentOrderComparator.html 0100644 0001750 0001750 00000011334 07330705437 034107 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.util.ReverseDocumentOrderComparator ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/util/ReverseDocumentOrderComparator.html 0100644 0001750 0001750 00000022043 07330705437 032207 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ ReverseDocumentOrderComparator
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/util/package-summary.html 0100644 0001750 0001750 00000012177 07330705437 027146 0 ustar tokamoto tokamoto
werken.xpath API: ¥Ñ¥Ã¥±¡¼¥¸ com.werken.xpath.util
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/XPath.html 0100644 0001750 0001750 00000035315 07330705437 024126 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ XPath
Main run-time interface into the XPath functionality
The XPath object embodies a textual XPath as described by
the W3C XPath specification. It can be applied against a
context node (or nodeset) along with context-helpers to
produce the result of walking the XPath.
Example usage:
// Create a new XPath
XPath xpath = new XPath("a/b/c/../d/.[@name="foo"]);
// Create the ContextSupport
ContextSupport helper = new ContextSupport();
// Use the XPathFunctionContext instance as the implement
// for function resolution.
helper.setFunctionContext( XPathFunctionContext.getInstance() );
// Apply the XPath to your root context.
Object results = xpath.applyTo(helper, myContext);
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/SubstringFunction.html 0100644 0001750 0001750 00000027025 07330705437 030414 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ SubstringFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/StartsWithFunction.html 0100644 0001750 0001750 00000025220 07330705437 030543 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ StartsWithFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/package-use.html 0100644 0001750 0001750 00000016166 07330705437 027117 0 ustar tokamoto tokamoto
werken.xpath API: ¥Ñ¥Ã¥±¡¼¥¸ com.werken.xpath.function ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/CeilingFunction.html 0100644 0001750 0001750 00000024663 07330705437 030013 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ CeilingFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/BooleanFunction.html 0100644 0001750 0001750 00000024430 07330705437 030010 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ BooleanFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/Function.html 0100644 0001750 0001750 00000022474 07330705437 026516 0 ustar tokamoto tokamoto
werken.xpath API: ¥¤¥ó¥¿¥Õ¥§¡¼¥¹ Function
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/RoundFunction.html 0100644 0001750 0001750 00000024633 07330705437 027525 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ RoundFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/ConcatFunction.html 0100644 0001750 0001750 00000024676 07330705437 027654 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ ConcatFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/package-frame.html 0100644 0001750 0001750 00000005267 07330705437 027415 0 ustar tokamoto tokamoto
werken.xpath API: ¥Ñ¥Ã¥±¡¼¥¸ com.werken.xpath.function
com.werken.xpath.function
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/NameFunction.html 0100644 0001750 0001750 00000025035 07330705437 027313 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ NameFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/LastFunction.html 0100644 0001750 0001750 00000024777 07330705437 027352 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ LastFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/TrueFunction.html 0100644 0001750 0001750 00000024176 07330705437 027357 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ TrueFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/SumFunction.html 0100644 0001750 0001750 00000024561 07330705437 027202 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ SumFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/FloorFunction.html 0100644 0001750 0001750 00000024611 07330705437 027513 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ FloorFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/StringFunction.html 0100644 0001750 0001750 00000026005 07330705437 027677 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ StringFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/NumberFunction.html 0100644 0001750 0001750 00000024636 07330705437 027671 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ NumberFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/NotFunction.html 0100644 0001750 0001750 00000024575 07330705437 027203 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ NotFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/SubstringBeforeFunction.html 0100644 0001750 0001750 00000025371 07330705437 031541 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ SubstringBeforeFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/LocalNameFunction.html 0100644 0001750 0001750 00000025131 07330705437 030263 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ LocalNameFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/package-tree.html 0100644 0001750 0001750 00000025337 07330705437 027262 0 ustar tokamoto tokamoto
werken.xpath API: com.werken.xpath.function ¥¯¥é¥¹³¬ÁØ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/ContainsFunction.html 0100644 0001750 0001750 00000025155 07330705437 030214 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ ContainsFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/SubstringFunction.html 0100644 0001750 0001750 00000011225 07330705437 032306 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.SubstringFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/StartsWithFunction.html 0100644 0001750 0001750 00000011234 07330705437 032442 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.StartsWithFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/CeilingFunction.html 0100644 0001750 0001750 00000011207 07330705437 031700 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.CeilingFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/BooleanFunction.html 0100644 0001750 0001750 00000011207 07330705437 031705 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.BooleanFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/Function.html 0100644 0001750 0001750 00000051274 07330705437 030415 0 ustar tokamoto tokamoto
werken.xpath API: ¥¤¥ó¥¿¥Õ¥§¡¼¥¹ com.werken.xpath.function.Function ¤Î»ÈÍÑ
XPathFunctionContext.getFunction(java.lang.String name)
Retrieve a named function
Retrieve the named function object, or null
if no such function exists.
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/RoundFunction.html 0100644 0001750 0001750 00000011171 07330705437 031415 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.RoundFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/ConcatFunction.html 0100644 0001750 0001750 00000011200 07330705437 031526 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.ConcatFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/CountFunction.html 0100644 0001750 0001750 00000011171 07330705437 031416 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.CountFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/NameFunction.html 0100644 0001750 0001750 00000011162 07330705437 031206 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.NameFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/LastFunction.html 0100644 0001750 0001750 00000011162 07330705437 031231 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.LastFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/TrueFunction.html 0100644 0001750 0001750 00000011162 07330705437 031245 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.TrueFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/SumFunction.html 0100644 0001750 0001750 00000011153 07330705437 031072 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.SumFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/FloorFunction.html 0100644 0001750 0001750 00000011171 07330705437 031407 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.FloorFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/StringFunction.html 0100644 0001750 0001750 00000011200 07330705437 031565 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.StringFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/NumberFunction.html 0100644 0001750 0001750 00000011200 07330705437 031547 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.NumberFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/NotFunction.html 0100644 0001750 0001750 00000011153 07330705437 031066 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.NotFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/SubstringBeforeFunction.html 0100644 0001750 0001750 00000011277 07330705437 033440 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.SubstringBeforeFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/LocalNameFunction.html 0100644 0001750 0001750 00000011225 07330705437 032161 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.LocalNameFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/ContainsFunction.html 0100644 0001750 0001750 00000011216 07330705437 032104 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.ContainsFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/StringLengthFunction.html 0100644 0001750 0001750 00000011252 07330705437 032736 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.StringLengthFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/SubstringAfterFunction.html 0100644 0001750 0001750 00000011270 07330705437 033270 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.SubstringAfterFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/FalseFunction.html 0100644 0001750 0001750 00000011171 07330705437 031360 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.FalseFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/class-use/PositionFunction.html 0100644 0001750 0001750 00000011216 07330705437 032132 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.function.PositionFunction ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/StringLengthFunction.html 0100644 0001750 0001750 00000025027 07330705437 031044 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ StringLengthFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/SubstringAfterFunction.html 0100644 0001750 0001750 00000025360 07330705437 031376 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ SubstringAfterFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/FalseFunction.html 0100644 0001750 0001750 00000024457 07330705437 027474 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ FalseFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/package-summary.html 0100644 0001750 0001750 00000026607 07330705437 030021 0 ustar tokamoto tokamoto
werken.xpath API: ¥Ñ¥Ã¥±¡¼¥¸ com.werken.xpath.function
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/function/PositionFunction.html 0100644 0001750 0001750 00000025075 07330705437 030243 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ PositionFunction
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/FunctionContext.html 0100644 0001750 0001750 00000020066 07330705437 026231 0 ustar tokamoto tokamoto
werken.xpath API: ¥¤¥ó¥¿¥Õ¥§¡¼¥¹ FunctionContext
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/package-use.html 0100644 0001750 0001750 00000021107 07330705437 025261 0 ustar tokamoto tokamoto
werken.xpath API: ¥Ñ¥Ã¥±¡¼¥¸ com.werken.xpath ¤Î»ÈÍÑ
ContextSupport
ContextSupport maintains information to aid in the
execution of the XPath against a context node.
It separates the knowledge of functions, variables
and namespace-bindings from the context node to
be walked.
XPathFunctionContext
Implementation of FunctionContext which
matches the core function library as described by the W3C XPath
Specification.
May be directly instantiated or subclassed.
ContextSupport
ContextSupport maintains information to aid in the
execution of the XPath against a context node.
It separates the knowledge of functions, variables
and namespace-bindings from the context node to
be walked.
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/package-frame.html 0100644 0001750 0001750 00000003163 07330705437 025561 0 ustar tokamoto tokamoto
werken.xpath API: ¥Ñ¥Ã¥±¡¼¥¸ com.werken.xpath
com.werken.xpath
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/NamespaceContext.html 0100644 0001750 0001750 00000017677 07330705437 026356 0 ustar tokamoto tokamoto
werken.xpath API: ¥¤¥ó¥¿¥Õ¥§¡¼¥¹ NamespaceContext
Specification of the interface required by
ContextSupport for delegation
of namespace prefix binding resolution.
¥á¥½¥Ã¥É¤Î³µÍ×
java.lang.String
translateNamespacePrefix(java.lang.String prefix)
Translate a namespace prefix into a URI
Translate the prefix used in a component of an XPath
into its expanded namespace URI.
¥á¥½¥Ã¥É¤Î¾ÜºÙ
translateNamespacePrefix
public java.lang.String translateNamespacePrefix(java.lang.String prefix)
Translate a namespace prefix into a URI
Translate the prefix used in a component of an XPath
into its expanded namespace URI.
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/ElementNamespaceContext.html 0100644 0001750 0001750 00000024416 07330705437 027655 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ ElementNamespaceContext
A NamespaceContext which gets it's mappings
from an Element in a JDOM tree.
It currently DOES NOT WORK
ºîÀ®¼Ô:
bob mcwhirter (bob @ werken.com)
¥³¥ó¥¹¥È¥é¥¯¥¿¤Î³µÍ×
ElementNamespaceContext(org.jdom.Element element)
Construct the NamespaceContext from a JDOM Element
¥á¥½¥Ã¥É¤Î³µÍ×
java.lang.String
translateNamespacePrefix(java.lang.String prefix)
Translate a namespace prefix into a URI
Translate the prefix used in a component of an XPath
into its expanded namespace URI.
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/VariableContext.html 0100644 0001750 0001750 00000017755 07330705437 026204 0 ustar tokamoto tokamoto
werken.xpath API: ¥¤¥ó¥¿¥Õ¥§¡¼¥¹ VariableContext
Specification of the interface required by
ContextSupport for delegation
of variable resolution.
ºîÀ®¼Ô:
bob mcwhirter (bob @ werken.com)
¥á¥½¥Ã¥É¤Î³µÍ×
java.lang.Object
getVariableValue(java.lang.String name)
Resolve a variable binding
Retrieve the currently bound value of the named
variable, or null if no such binding exists.
¥á¥½¥Ã¥É¤Î¾ÜºÙ
getVariableValue
public java.lang.Object getVariableValue(java.lang.String name)
Resolve a variable binding
Retrieve the currently bound value of the named
variable, or null if no such binding exists.
¥Ñ¥é¥á¡¼¥¿:
name - The name of the variable sought.
Ìá¤êÃÍ:
The currently bound value of the variable, or null.
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/DefaultVariableContext.html 0100644 0001750 0001750 00000026076 07330705437 027505 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ DefaultVariableContext
getVariableValue(java.lang.String name)
Resolve a variable binding
Retrieve the currently bound value of the named
variable, or null if no such binding exists.
void
setVariableValue(java.lang.String name,
java.lang.Object value)
Set a variable finding
Set the value of a named variable.
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/XPathFunctionContext.html 0100644 0001750 0001750 00000027414 07330705437 027202 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ XPathFunctionContext
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/parser/XPathTokenTypes.html 0100644 0001750 0001750 00000051222 07330705437 027443 0 ustar tokamoto tokamoto
werken.xpath API: ¥¤¥ó¥¿¥Õ¥§¡¼¥¹ XPathTokenTypes
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/parser/package-use.html 0100644 0001750 0001750 00000013672 07330705437 026565 0 ustar tokamoto tokamoto
werken.xpath API: ¥Ñ¥Ã¥±¡¼¥¸ com.werken.xpath.parser ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/parser/package-frame.html 0100644 0001750 0001750 00000002312 07330705437 027050 0 ustar tokamoto tokamoto
werken.xpath API: ¥Ñ¥Ã¥±¡¼¥¸ com.werken.xpath.parser
com.werken.xpath.parser
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/parser/package-tree.html 0100644 0001750 0001750 00000013376 07330705437 026731 0 ustar tokamoto tokamoto
werken.xpath API: com.werken.xpath.parser ¥¯¥é¥¹³¬ÁØ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/parser/class-use/XPathTokenTypes.html 0100644 0001750 0001750 00000014322 07330705437 031342 0 ustar tokamoto tokamoto
werken.xpath API: ¥¤¥ó¥¿¥Õ¥§¡¼¥¹ com.werken.xpath.parser.XPathTokenTypes ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/parser/class-use/XPathLexer.html 0100644 0001750 0001750 00000011132 07330705437 030310 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.parser.XPathLexer ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/parser/class-use/XPathRecognizer.html 0100644 0001750 0001750 00000011175 07330705437 031347 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.parser.XPathRecognizer ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/parser/XPathRecognizer.html 0100644 0001750 0001750 00000145502 07330705437 027452 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ XPathRecognizer
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/parser/package-summary.html 0100644 0001750 0001750 00000014222 07330705437 027456 0 ustar tokamoto tokamoto
werken.xpath API: ¥Ñ¥Ã¥±¡¼¥¸ com.werken.xpath.parser
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/package-tree.html 0100644 0001750 0001750 00000014120 07330705437 025421 0 ustar tokamoto tokamoto
werken.xpath API: com.werken.xpath ¥¯¥é¥¹³¬ÁØ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/class-use/FunctionContext.html 0100644 0001750 0001750 00000020303 07330705437 030122 0 ustar tokamoto tokamoto
werken.xpath API: ¥¤¥ó¥¿¥Õ¥§¡¼¥¹ com.werken.xpath.FunctionContext ¤Î»ÈÍÑ
XPathFunctionContext
Implementation of FunctionContext which
matches the core function library as described by the W3C XPath
Specification.
May be directly instantiated or subclassed.
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/class-use/Test.html 0100644 0001750 0001750 00000010746 07330705437 025721 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.Test ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/class-use/NamespaceContext.html 0100644 0001750 0001750 00000020241 07330705437 030232 0 ustar tokamoto tokamoto
werken.xpath API: ¥¤¥ó¥¿¥Õ¥§¡¼¥¹ com.werken.xpath.NamespaceContext ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/class-use/ElementNamespaceContext.html 0100644 0001750 0001750 00000011153 07330705437 031546 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.ElementNamespaceContext ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/class-use/VariableContext.html 0100644 0001750 0001750 00000020177 07330705437 030073 0 ustar tokamoto tokamoto
werken.xpath API: ¥¤¥ó¥¿¥Õ¥§¡¼¥¹ com.werken.xpath.VariableContext ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/class-use/DefaultVariableContext.html 0100644 0001750 0001750 00000011144 07330705437 031372 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.DefaultVariableContext ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/class-use/XPathFunctionContext.html 0100644 0001750 0001750 00000014316 07330705437 031076 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.XPathFunctionContext ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/class-use/ContextSupport.html 0100644 0001750 0001750 00000055667 07330705437 030036 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ com.werken.xpath.ContextSupport ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/class-use/Context.html 0100644 0001750 0001750 00000013743 07330705437 026426 0 ustar tokamoto tokamoto
werken.xpath API: ¥¤¥ó¥¿¥Õ¥§¡¼¥¹ com.werken.xpath.Context ¤Î»ÈÍÑ
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/ContextSupport.html 0100644 0001750 0001750 00000041122 07330705437 026114 0 ustar tokamoto tokamoto
werken.xpath API: ¥¯¥é¥¹ ContextSupport
getFunction(java.lang.String name)
Retrieve a named function
Retrieve the named function object, or null
if no such function exists.
java.lang.Object
getVariableValue(java.lang.String name)
Resolve a variable binding
Retrieve the currently bound value of the named
variable, or null if no such binding exists.
translateNamespacePrefix(java.lang.String prefix)
Translate a namespace prefix into a URI
Using the NamespaceContext
implementation, translate the prefix used in a component of an XPath
into its expanded namespace URI.
public java.lang.Object getVariableValue(java.lang.String name)
Resolve a variable binding
Retrieve the currently bound value of the named
variable, or null if no such binding exists. Delegates
to the VariableContext implementation
provided, if any.
¥Ñ¥é¥á¡¼¥¿:
name - The name of the variable sought.
Ìá¤êÃÍ:
The currently bound value of the variable, or null.
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/Context.html 0100644 0001750 0001750 00000027544 07330705437 024533 0 ustar tokamoto tokamoto
werken.xpath API: ¥¤¥ó¥¿¥Õ¥§¡¼¥¹ Context
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/com/werken/xpath/package-summary.html 0100644 0001750 0001750 00000020020 07330705437 026153 0 ustar tokamoto tokamoto
werken.xpath API: ¥Ñ¥Ã¥±¡¼¥¸ com.werken.xpath
ContextSupport maintains information to aid in the
execution of the XPath against a context node.
It separates the knowledge of functions, variables
and namespace-bindings from the context node to
be walked.
Implementation of FunctionContext which
matches the core function library as described by the W3C XPath
Specification.
May be directly instantiated or subclassed.
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/serialized-form.html 0100644 0001750 0001750 00000013304 07330705437 022773 0 ustar tokamoto tokamoto
ľÎ󲽤µ¤ì¤¿·Á¼°
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/packages.html 0100644 0001750 0001750 00000001256 07330705437 021460 0 ustar tokamoto tokamoto
werken.xpath API
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/overview-summary.html 0100644 0001750 0001750 00000015141 07330705437 023241 0 ustar tokamoto tokamoto
werken.xpath API: ³µÍ×
Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.
werken.xpath-0.9.4.orig/apidocs/index.html 0100644 0001750 0001750 00000001375 07330705437 021013 0 ustar tokamoto tokamoto
¥Õ¥ì¡¼¥à´ØÏ¢¤Î·Ù¹ð
¤³¤Î¥É¥¥å¥á¥ó¥È¤Ï¥Õ¥ì¡¼¥àµ¡Ç½¤ò»È¤Ã¤ÆÉ½¼¨¤¹¤ë¤è¤¦¤Ëºî¤é¤ì¤Æ¤¤¤Þ¤¹¡£¥Õ¥ì¡¼¥à¤òɽ¼¨¤Ç¤¤Ê¤¤ Web ¥¯¥é¥¤¥¢¥ó¥È¤Î¾ì¹ç¤Ë¤³¤Î¥á¥Ã¥»¡¼¥¸¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£
¥ê¥ó¥¯Àè¥Õ¥ì¡¼¥à¤Ê¤·¤Î¥Ð¡¼¥¸¥ç¥ó