Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simply XML Schema Problem

    I bet it is simple, I'm just new to this XML world...

    I got multiple mistakes of this kind, when entering:

    Code:
    xmllint --schema file.xsd --noout file.xml
    Code:
    Schemas parser error : element decl. '{http: //www.bla.com/MyNamespace}players', attribute  'type': The QName value '{http://www.bla.com/MyNamespace}player' does not resolve to a(n) type definition.

    The corresponding line:
    Code:
    <xsd:element name="players" type="t:player"/>
    this t-prefix comes from the beginning in the namespace part:

    Code:
     xmlns:t='http://www.bla.com/MyNamespace'
    player is defined like this:

    Code:
    <xsd:element name="player">
    			<xsd:complexType>
    				<xsd:all>
    					<xsd:element name="date-of-birth" type="xsd:dateTime"/>
    					<xsd:element name="gender" type="t:Gender"/>
    				</xsd:all>
    				<xsd:attribute name="username" />
    			</xsd:complexType>
    		</xsd:element>

  • #2
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,460
    Thanks
    1
    Thanked 23 Times in 21 Posts
    Can you show us the incoming XML file?
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •