🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.xml
Article #10130

XML Schema - deklaracje rekurencyjne

#10130
From: walec51
Date: Thu, 14 May 2009 22:43
62 lines
2668 bytes
Witam.

Zasłużmy że mój program akceptuje np takiego xml'a:

<Block>
	<Block>
		<PrintMessage/>
		<Block>
			<PrintMessage />
			<PrintMessage />
		</Blok>
	</Block>
	<Block>
		<PrintMessage />
		<PrintMessage />
	</Block>
</Block>

I teraz próbuje dla tego typu xml'ków ułożyć XML Schema:

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema">

	<group name="Statement">
		<choice>

			<element name="Block">
				<complexType>
					<sequence>
						<element ref="Statement" maxOccurs="unbounded" />
					</sequence>
				</complexType>
			</element>

			<element name="PrintMessage">

			</element>

		</choice>
	</group>

</schema>

Ale tu pojawia mi się błąd w schemie typu:

src-resolve.4.2: Error resolving component 'Statement'. It was
detected that 'Statement' is in
 namespace 'http://www.w3.org/2001/XMLSchema', but components from
this namespace are
 not referenceable from schema document 'file:///home/awalczak/
workspace/xmlstacks/src/
 info/adamwalczak/xmlstacks/res/lang.xsd'. If this is the incorrect
namespace, perhaps the
 prefix of 'Statement' needs to be changed. If this is the correct
namespace, then an
 appropriate 'import' tag should be added to 'file:///home/awalczak/
workspace/xmlstacks/src/
 info/adamwalczak/xmlstacks/res/lang.xsd'.

I tu że tak powiem treść tego błędu kompletnie do mnie nie przemawia :
(
Jakieś sugestie co mogę robić nie tak ?
Technical Details
Message-ID: <92ccb06a-5b21-463b-936f-583e472452ba@x6g2000vbg.googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!feed.news.interia.pl!news.nask.pl!news.nask.org.pl!newsfeed00.sul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!x6g2000vbg.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!feed.news.interia.pl!news.nask.pl!news.nask.org.pl!newsfeed00.sul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!x6g2000vbg.googlegroups.com!not-for-mail
From: walec51 <walec5@gmail.com>
Newsgroups: pl.comp.xml
Subject: XML Schema - deklaracje rekurencyjne
Date: Thu, 14 May 2009 15:43:10 -0700 (PDT)
Organization: http://groups.google.com
Lines: 63
Message-ID: <92ccb06a-5b21-463b-936f-583e472452ba@x6g2000vbg.googlegroups.com>
NNTP-Posting-Host: 77.253.17.172
Mime-Version: 1.0
X-Trace: posting.google.com 1242340991 16353 127.0.0.1 (14 May 2009 22:43:11 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 14 May 2009 22:43:11 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: x6g2000vbg.googlegroups.com; posting-host=77.253.17.172;  posting-account=9tq4iAoAAADadWm4WtMyxhLBjM0ShnOA
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; pl-PL; rv:1.9.0.10)  Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10,gzip(gfe),gzip(gfe)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit