if ((s != null && s.intValue() != 0) || (d==0 && m==0 && h==0)) {
if (s == null) s = new Integer(0); if ((s.intValue() != 0) || (d==0 && m==0 && h==0)) {
	public String getStringValue() {		int d = duration.getDays();		int h = duration.getHours();		int m = duration.getMinutes();		Number s = duration.getField(DatatypeConstants.SECONDS);			//Copied from Saxon 8.6.1		        FastStringBuffer sb = new FastStringBuffer(32);        if (duration.getSign() < 0) {            sb.append('-');        }        sb.append('P');                if (d != 0) {            sb.append(d + "D");        }        if ( d==0 || h!=0 || m!=0 || s.intValue() != 0) {            sb.append('T');        }        if (h != 0) {            sb.append(h + "H");        }        if (m != 0) {            sb.append(m + "M");        }        if ((s != null && s.intValue() != 0) || (d==0 && m==0 && h==0)) {        	sb.append(s + "S");        	/*            if (micros == 0) {                sb.append(s + "S");            } else {                long ms = (s * 1000000) + micros;                String mss = ms + "";                if (s == 0) {                    mss = "0000000" + mss;                    mss = mss.substring(mss.length()-7);                }                sb.append(mss.substring(0, mss.length()-6));                sb.append('.');                int lastSigDigit = mss.length()-1;                while (mss.charAt(lastSigDigit) == '0') {                    lastSigDigit--;                }                sb.append(mss.substring(mss.length()-6, lastSigDigit+1));                sb.append('S');            }            */        }        //End of copy                return sb.toString();        	}