GeeCON Prague 2014*
The moose likes XML and Related Technologies and the fly likes DTD Validation error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "DTD Validation error" Watch "DTD Validation error" New topic
Author

DTD Validation error

AnandAwasthi
Greenhorn

Joined: Jan 25, 2001
Posts: 2
Hi,
I am using following DTD in my java program. whe i run program , i get following error:
error:
The constraint is required after the element type "maxInclusive" in the element type declaration.

DTD is as followed:

<!-- DTD for XML Schemas: Part 2: Datatypes -->
<!-- $Id: datatypes.dtd,v 1.27 2000/04/02 22:51:26 aqw Exp $ -->
<!-- Note this DTD is NOT the normative datatypes DTD - - the
prose copy in the datatypes REC is the normative version (which
shouldn't differ from this one except for this comment and entity
expansions, but just in case -->
<!-- can be overriden in the internal subset of a
schema document to establish a namespace prefix -->
<!-- Define all the element names, with optional prefix -->
<!ENTITY % p ''>
<!ENTITY % simpleType "%p;simpleType">
<!ENTITY % maxExclusive "%p;maxExclusive">
<!ENTITY % minExclusive "%p;minExclusive">
<!ENTITY % maxInclusive "%p;maxInclusive">
<!ENTITY % minInclusive "%p;minInclusive">
<!ENTITY % precision "%p;precision">
<!ENTITY % scale "%p;scale">
<!ENTITY % length "%p;length">
<!ENTITY % minLength "%p;minLength">
<!ENTITY % maxLength "%p;maxLength">
<!ENTITY % enumeration "%p;enumeration">
<!ENTITY % pattern "%p;pattern">
<!ENTITY % encoding "%p;encoding">
<!ENTITY % period "%p;period">
<!ENTITY % duration "%p;duration">
<!-- Customisation entities for the ATTLIST of each element type.
Define one of these if your schema takes advantage of the
anyAttribute='##other' in the schema for schemas -->
<!ENTITY % simpleTypeAttrs ''>
<!ENTITY % maxExclusiveAttrs ''>
<!ENTITY % minExclusiveAttrs ''>
<!ENTITY % maxInclusiveAttrs ''>
<!ENTITY % minInclusiveAttrs ''>
<!ENTITY % precisionAttrs ''>
<!ENTITY % scaleAttrs ''>
<!ENTITY % lengthAttrs ''>
<!ENTITY % minLengthAttrs ''>
<!ENTITY % maxLengthAttrs ''>
<!ENTITY % enumerationAttrs ''>
<!ENTITY % patternAttrs ''>
<!ENTITY % encodingAttrs ''>
<!ENTITY % periodAttrs ''>
<!ENTITY % durationAttrs ''>
<!ENTITY % appinfoAttrs ''>
<!ENTITY % documentationAttrs ''>
<!-- annotation elements -->
<!ENTITY % annotation "%p;annotation">
<!ENTITY % appinfo "%p;appinfo">
<!ENTITY % documentation "%p;documentation">
<!-- Define some entities for informative use as attribute types -->
<!ENTITY % URIref "CDATA">
<!ENTITY % QName "CDATA">
<!ENTITY % NCName "NMTOKEN">
<!ENTITY % nonNegativeInteger "NMTOKEN">
<!ENTITY % boolean "(true|false)">
<!-- Note that the use of 'facet' below is less restrictive than is
really intended: There should in fact be no more than one of each of
minInclusive, minExclusive, maxInclusive, maxExclusive,
precision, scale,
length, maxLength, minLength, encoding, period within datatype,
and the min- and max- variants of Inclusive and Exclusive are
mutually exclusive.
On the other hand, pattern and enumeration may repeat -->
<!ENTITY % minBound '(%minInclusive; | %minExclusive '>
<!ENTITY % maxBound '(%maxInclusive; | %maxExclusive '>
<!ENTITY % bounds '%minBound; | %maxBound;'>
<!ENTITY % numeric '%precision; | %scale;'>
<!ENTITY % ordered '%bounds; | %numeric;'>
<!ENTITY % unordered '%pattern; | %enumeration; | %length; | %maxLength; | %minLength;
| %encoding; | %period; | %duration;'>
<!ENTITY % facet '%ordered; | %unordered;'>
<!ENTITY % facetAttr 'value CDATA #REQUIRED'>
<!ENTITY % facetModel '(%annotation ?'>
<!ELEMENT %simpleType; ((%annotation ?, (%facet *)>
<!ATTLIST %simpleType;
name NMTOKEN #IMPLIED
base CDATA #REQUIRED
%simpleTypeAttrs;
>
<!-- name is required at top level -->
<!ELEMENT %minExclusive; %facetModel;>
<!ATTLIST %minExclusive;
%facetAttr;
%minExclusiveAttrs;
>
<!ELEMENT %maxExclusive; %facetModel;>
<!ATTLIST %maxExclusive;
%facetAttr;
%maxExclusiveAttrs;
>
<!ELEMENT %maxInclusive; %facetModel;>
<!ATTLIST %maxInclusive;
%facetAttr;
%maxInclusiveAttrs;
>
<!ELEMENT %minInclusive; %facetModel;>
<!ATTLIST %minInclusive;
%facetAttr;
%minInclusiveAttrs;
>
<!ELEMENT %precision; %facetModel;>
<!ATTLIST %precision;
%facetAttr;
%precisionAttrs;
>
<!ELEMENT %scale; %facetModel;>
<!ATTLIST %scale;
%facetAttr;
%scaleAttrs;
>
<!ELEMENT %length; %facetModel;>
<!ATTLIST %length;
%facetAttr;
%lengthAttrs;
>
<!ELEMENT %minLength; %facetModel;>
<!ATTLIST %minLength;
%facetAttr;
%minLengthAttrs;
>
<!ELEMENT %maxLength; %facetModel;>
<!ATTLIST %maxLength;
%facetAttr;
%maxLengthAttrs;
>
<!-- This one can be repeated -->
<!ELEMENT %enumeration; %facetModel;>
<!ATTLIST %enumeration;
%facetAttr;
%enumerationAttrs;
>
<!-- This one can be repeated -->
<!ELEMENT %pattern; %facetModel;>
<!ATTLIST %pattern;
%facetAttr;
%patternAttrs;
>
<!ELEMENT %encoding; %facetModel;>
<!ATTLIST %encoding;
%facetAttr;
%encodingAttrs;
>
<!ELEMENT %period; %facetModel;>
<!ATTLIST %period;
%facetAttr;
%periodAttrs;
>
<!ELEMENT %duration; %facetModel;>
<!ATTLIST %duration;
%facetAttr;
%durationAttrs;
>
<!-- Annotation is either application information or documentation -->
<!-- By having these here they are available for datatypes as well
as all the structures elements -->
<!ELEMENT %annotation; (%appinfo; | %documentation *>
<!-- User must define annotation elements in internal subset for this
to work -->
<!ELEMENT %appinfo; ANY>
<!-- too restrictive -->
<!ATTLIST %appinfo;
source %URIref; #IMPLIED
%appinfoAttrs;
>
<!ELEMENT %documentation; ANY>
<!-- too restrictive -->
<!ATTLIST %documentation;
source %URIref; #IMPLIED
xml:lang CDATA #IMPLIED
%documentationAttrs;
>

could someone pls help me ??
thanks
 
GeeCON Prague 2014
 
subject: DTD Validation error