Java Technology & XML - Trouble Using Netbeans and XML Schema
I am currently experimenting on using XML files to store data for a game that I am developing. I had been using NetBeans 5.5 to validate my XML Schema (I am still new to XSD); however, now I am getting errors and have been trying for the better part of the week but am still unable to resolve them. Here is a clip from one of the schemas:
<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:cdt="http://JoaL.blissfulTragedy.com/Characters"
targetNamespace="http://JoaL.blissfulTragedy.com/Characters" >
<!-- Document to Define Character Attributes and their current Constraints -->
<!-- Character Name -->
<xs:simpleType name="name">
<xs:restriction base="xs:NMTOKEN">
<xs:maxLength value="15"/>
</xs:restriction>
</xs:simpleType>
...
When I validate the XML (the two down arrows) I get the following errors for every restriction I have declared:
s4s-att-invalid-value: Invalid attribute valuefor'base' in element'restriction'. Recorded reason: UndeclaredPrefix: Cannot resolve'xs:NMTOKEN' as a QName: the prefix'xs' is not declared.
After retyping the file three times I tried one of the stock NetBeans schemas, which will produce the same error whenever I add a restriction through the UI.
Any advice will be greatly appreciated :P

