Validating the Song Document

D:\speaking\XMLOne Europe\schemas\examples>java sax.SAX2Count -v original_hotcop.xml
[Error] original_hotcop.xml:10:25: Datatype error: In element 'LENGTH' : Value '6:20' is not legal value for current datatype. null. original_hotcop.xml: 1583 ms (10 elems, 2 attrs, 30 spaces, 98 chars)

Here's the problem:

<?xml version="1.0"?>
<SONG xmlns:xsi=""
  <TITLE>Hot Cop</TITLE>
  <COMPOSER>Jacques Morali</COMPOSER>
  <COMPOSER>Victor Willis</COMPOSER>
  <PRODUCER>Jacques Morali</PRODUCER>
  <ARTIST>Village People</ARTIST>  

The LENGTH element not in the schema time duration format! which is ISO 8601 "PnYn MnDTnH nMnS, where nY represents the number of years, nM the number of months, nD the number of days, 'T' is the date/time separator, nH the number of hours, nM the number of minutes and nS the number of seconds. The number of seconds can include decimal digits to arbitrary precision. An optional preceding minus sign ('-') is allowed, to indicate a negative duration."

Previous | Next | Top | Cafe con Leche

Copyright 2000, 2001 Elliotte Rusty Harold
Last Modified July 23, 2001