You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Witherspoon, David" <dw...@doubleclick.net> on 2001/03/19 17:28:42 UTC

Newbie needs a little help

Just getting started with schemas, and BAM...right into a wall.  I have a
very simple xml/xsd sample I'm trying to get going, but the parser keeps
giving me an error I just cannot resolve.

TMPpersonal.xml:
<?xml version="1.0" encoding="UTF-8"?>
<TaskMaster xmlns:xsi="http://www.w3.org/2000/4/XMLSchema-instance"
xsi:noNamespaceSchemaLocation='TMPpersonal.xsd'>
   <LogDirectory>D:\DataJanitor\Logs</LogDirectory>
   <Address>you@someplace.com</Address>
</TaskMaster>

TMPpersonal.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2000/4/XMLSchema">
   <xsd:element name="TaskMaster">
      <xsd:complexType>
            <xsd:element name="LogDirectory" type="xsd:string" />
            <xsd:element name="Address" type="addrType />
      </xsd:complexType>
   </xsd:element>
<!-- Email address type -->
   <xsd:simpleType name="addrType">
      <xsd:restriction base="xsd:string">
        <xsd:pattern value=".*@.*\.[a-zA-Z]{2,3}" />
      </xsd:restriction>
   </xsd:simpleType>
</xsd:schema>

I get this error: Element type "TaskMaster" must be declared.  Same error
message for LogDirectory and Address.  What am I missing?  Thanks in
advance!!

-=david=-

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org