ankitp 2005/05/11 14:49:30
Modified: java/samples/jaxp DatatypeAPITest.java
Log:
update
Revision Changes Path
1.3 +5 -9 xml-xerces/java/samples/jaxp/DatatypeAPITest.java
Index: DatatypeAPITest.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/samples/jaxp/DatatypeAPITest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DatatypeAPITest.java 11 May 2005 20:52:00 -0000 1.2
+++ DatatypeAPITest.java 11 May 2005 21:49:30 -0000 1.3
@@ -30,18 +30,14 @@
Duration ymDuration = df.newDurationYearMonth("P12Y10M");
System.out.println("P12Y10M is of type: " +
ymDuration.getXMLSchemaType());
- // create a dayTimeDuration
+ // create a dayTimeDuration (supposed)
Duration dtDuration = df.newDurationDayTime("P12Y10M");
System.out.println("P12Y10M is of type: " +
dtDuration.getXMLSchemaType());
- // try to fool the factory!
- try {
- ymDuration = df.newDurationYearMonth("P12Y10M1D");
- }
- catch(IllegalArgumentException e) {
- System.out.println("'duration': P12Y10M1D is not
'yearMonthDuration'!!!");
- }
-
+ // create a dayTimeDuration (really this time)
+ dtDuration = df.newDurationDayTime("P10DT10H12M0S");
+ System.out.println("P10DT10H12M is of type: " +
dtDuration.getXMLSchemaType());
+
XMLGregorianCalendar xgc = df.newXMLGregorianCalendar();
xgc.setYear(1975);
xgc.setMonth(DatatypeConstants.AUGUST);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]