public NodeValueDuration(XSDDuration dt) { duration = dt ; if (dt.getDays() != 0 && dt.getMonths() !=0 && dt.getYears() != 0) { throw new ExprException("Illegal time: "+dt) ; } if ( dt.getTimePart() == 0 ) throw new ExprException("Illegal time: "+dt) ; }