Using latest Saxon HE with the following xpath:
declare namespace xs="http://www.w3.org/2001/XMLSchema";
/pojo:Element[pojo:fromTimeStamp gt xs:dateTime(\"2010-07-08T16:38:00.478+02:00\")]
The fromTimeStamp element is a xs:dateTime and what I am doing is parsing the Saxon expression into my own "expression" representation that is simplified
to map the individual steps (in an xpath) to a Hibernate query. If I don't earmark the literal with the "xs:dateTime" function the literal is a StringValue type. This bombs since in my Hibernate code I do a restriction off the Java object (which unfortunately
is a String rather than a Date).
value = Value.convertToJava(literal.asItem());
Using the "xs:dateTime" function casts a warning:
Warning: Comparison of xs:untypedAtomic? to xs:dateTime will fail unless the first operand is empty
Plus the literal is wrapped inside a TraceExpression. Anyway to write the xpath
expression without wrapping the literal (ie. it is automatically transformed by Saxon into a DateTimeValue)?
thanks in advance / matthew