This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Invalid type defined... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Invalid type defined..." Watch "Invalid type defined..." New topic
Author

Invalid type defined...

Donald R. Cossitt
buckaroo
Ranch Hand

Joined: Jan 31, 2003
Posts: 401

The above code produces this error in the browser:

Invalid type defined in ATTLIST. Error processing resource 'file:///C:/xml/rml.xml'. Line 21, Position 25
<!ATTLIST Category name ENUMERATED (chinese, japenese, home cooking, tex-mex, contintental, haute cuisine, other)>
------------------------^

I would appreciate if someone could tell me why?
TIA
[ September 20, 2003: Message edited by: Donald R. Cossitt ]
[ September 20, 2003: Message edited by: Donald R. Cossitt ]

doco
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5

I think the problem is that you're trying to define an attribute called "Category name" while whitespace is not allowed in the name. See the format definition for the ATTLIST at http://www.w3.org/TR/REC-xml#attdecls:
[CODE].
What surprises me however is that the parser didn't complain for the previous line, "Recipe cook"...


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Donald R. Cossitt
buckaroo
Ranch Hand

Joined: Jan 31, 2003
Posts: 401
Category is an element; name is an attribute

"tex-mex" being one of the names in the attribute list in want of verification.
[ September 20, 2003: Message edited by: Donald R. Cossitt ]
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Sorry. My bad. Where did you come up with the ENUMERATED keyword? Would this work for you:

[ September 21, 2003: Message edited by: Lasse Koskela ]
Donald R. Cossitt
buckaroo
Ranch Hand

Joined: Jan 31, 2003
Posts: 401

The "ENUMERATED" keyword was a suggestion in a manual - go figure
I removed that and replaced the character ',' with '|' in the attribute list along with a closing #IMPLIED and it works fine now. Thanks for the heads up
[ September 21, 2003: Message edited by: Donald R. Cossitt ]
 
 
subject: Invalid type defined...
 
Similar Threads
DTD questions
passing Invalid characters within XML tags
DTD
#CDATA and #PCDATA
XML Scripting is not working