Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8124903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:37:25+00:00 2026-06-06T06:37:25+00:00

I’m trying to create an xsd schema that will validate a map with an

  • 0

I’m trying to create an xsd schema that will validate a map with an unknown depth of nodes.

(In the schema below, i would like mapnode to contain, among other elements, more mapnodes.)

This requires recursion that starts below the root node.

Neither of the two methods described here seem to work for me: http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=%2Fcom.ibm.db2.luw.xml.doc%2Fdoc%2Fc0051286.html

with the schema below, i get this error:
src-resolve: Cannot resolve the name ‘mapnode’ to a(n) ‘element declaration’ component.

<?xml version="1.0" encoding="utf-16"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="knowledgemap">
    <xs:complexType>
  <xs:sequence>
    <xs:element name="mapdata">
      <xs:complexType>
    <xs:all>
        <xs:element name="title" type="xs:string"/>
        <xs:element name="version" type="xs:string"/>
        <xs:element name="author" type="xs:string"/>
        <xs:element name="authorid" type="xs:string"/>
        <xs:element name="width" type="xs:positiveInteger"/>
        <xs:element name="height" type="xs:positiveInteger"/>
        <xs:element name="xpos" type="xs:positiveInteger"/>
        <xs:element name="ypos" type="xs:positiveInteger"/>
        <xs:element name="scalefactor" type="xs:float"/>
        <xs:element name="mapid" type="xs:string"/>
        <xs:element name="beehivedata">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="maxresults" type="xs:positiveInteger"/>
                    <xs:element name="upiproduct" maxOccurs="unbounded">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element name="upiproduct" type="xs:string"/>
                                <xs:element name="upiversion" type="xs:string"/>
                                <xs:element name="upilanguage" type="xs:string"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        <xs:element name="styledata">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="nodelevel" maxOccurs="unbounded">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element name="level"/>
                                <xs:element name="width"/>
                                <xs:element name="height"/>
                                <xs:element name="fontsize"/>
                                <xs:element name="fontcolor"/>
                                <xs:element name="fontweight"/>
                                <xs:element name="strokecolor"/>
                                <xs:element name="strokewidth"/>
                                <xs:element name="linkcolor"/>
                                <xs:element name="linkhighlight"/>
                                <xs:element name="colorunexplored"/>
                                <xs:element name="colorexplored"/>
                                <xs:element name="colorshadow"/>
                                <xs:element name="iconsize"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
    </xs:all>
          </xs:complexType>
        </xs:element>
        <xs:element name="map">
            <xs:complexType>
        <xs:sequence>
            <xs:element name="mapnode">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="nodedata">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="title" type="xs:string"/>
                                    <xs:element name="description" type="xs:string"/>
                                    <xs:element name="xpos" type="xs:integer"/>
                                    <xs:element name="ypos" type="xs:integer"/>
                                    <xs:element name="nodeid" type="xs:string"/>
                                    <xs:element name="level" type="xs:positiveInteger"/>
                                    <xs:element name="parent" type="xs:string"/>
                                    <xs:element name="localconnection" type="xs:string"/>
                                    <xs:element name="parentconnection" type="xs:string"/>
                                    <xs:element name="covericon" type="xs:string"/>
                                    <xs:element name="activesocket"  type="xs:string" maxOccurs="unbounded"/>                               
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="contentitem" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:all>
                                    <xs:element name="title" type="xs:string"/>
                                    <xs:element name="contentid" type="xs:string"/>                                 
                                    <xs:element name="description" type="xs:string"/>
                                    <xs:element name="type" type="xs:string"/>
                                    <xs:element name="size" type="xs:string"/>  
                                    <xs:element name="col" type="xs:positiveInteger"/>
                                    <xs:element name="row" type="xs:positiveInteger"/>                              
                                    <xs:element name="contenturl" type="xs:string"/>
                                    <xs:element name="contenticon" type="xs:string"/>
                                    <xs:element name="contentdata"  type="xs:string" minOccurs="0"/>
                                </xs:all>
                            </xs:complexType>                       
                        </xs:element>
                        <xs:element  ref="mapnode" minOccurs="0" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
            </xs:complexType>
        </xs:element>
     </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:37:27+00:00Added an answer on June 6, 2026 at 6:37 am

    To define a recursive structure, you will need to make the node that refers to itself (or if there is a cycle, one of the nodes in the cycle) into a global element declaration. When you use ref=”name”, it must refer to a global element – one declared as a child of the xs:schema element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I would like to count the length of a string with PHP. The string
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.