<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello:</FONT></DIV>
<DIV><FONT face=Arial size=2> I'm using JDOM beta 5 and I want
to validate a XML document using a schema. I have followed some examples that
should work right but I have a JDOM Exception. I don't now if the problem is
from JDOM or from my XML files (.xml and .xsd). Here is my XML files, I thank if
someone can tell me what problem or send some files that work
right.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> -- XML</FONT></DIV>
<DIV><FONT face=Arial size=2><?xml version="1.0"
encoding="US-ASCII"?><BR><persona
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"<BR>xsi:noNamespaceSchemaLocation="schemaPrueba.xsd"><BR><nombre>Miguel</nombre>
<BR><apellidos>Medina</apellidos>
<BR></persona><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>-- Schema</FONT></DIV>
<DIV><FONT face=Arial size=2><?xml version="1.0"
encoding="US-ASCII"?></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><xsd:schema
xmlns:xsd="http://www.w3.org/1999/XMLSchema"></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> <xsd:ElementType name="nombre"
content="textOnly"/><BR> <xsd:ElementType name="apellidos"
content="textOnly"/></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> <xsd:ElementType name="persona"
content="eltOnly"><BR> <xsd:element type="nombre"
minOccurs="1" maxOccurs="1"/><BR> <xsd:element
type="apellidos" minOccurs="0"
maxOccurs="1"/><BR> </xsd:ElementType><BR></xsd:schema></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and the Exception:</FONT></DIV>
<DIV><FONT face=Arial size=2>Excepcion: org.jdom.JDOMException: Attribute
"xmlns:xsi" must be declared for element type "persona".: Error on line 3 of
document file:/pais/invitados/miguela/xml_java/jdom/Prueba.xml: Attribute
"xmlns:xsi" must be declared for element type "persona".</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thank You. Miguel
Angel.<BR><BR></DIV></FONT></BODY></HTML>