Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Simple type restriction(just in need of a small hint)
Simple type restriction [message #714761] Thu, 11 August 2011 09:03 Go to next message
Drd  is currently offline Drd
Messages: 20
Registered: August 2011
Junior Member
hello all!

if I put the restriction manual without predefining it i get this error:

src-resolve.4.2: Error resolving component 'spatii'. It was detected that 'spatii' is in namespace 'http://www.w3schools.com', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/adurnea/workspace/Schema/MyFiles/config.xsd'. If this is the incorrect namespace, perhaps the prefix of 'spatii' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/adurnea/workspace/Schema/MyFiles/config.xsd'.

this is the implementation i use:


<xs:element name="nume" type="spatii"/>

<xs:simpleType name="spatii">
<xs:restriction base="xs:string">
<xsattern value="[a-zA-Z0-9.]+"/>
</xs:restriction>
</xs:simpleType>

being a complete noob i dont know what should i do
I would really be grateful for the help.
Re: Simple type restriction [message #714763 is a reply to message #714761] Thu, 11 August 2011 09:06 Go to previous messageGo to next message
Drd  is currently offline Drd
Messages: 20
Registered: August 2011
Junior Member
i have the impression of a double post but i cant find the other through the forum... or this one....

[Updated on: Thu, 11 August 2011 09:07]

Report message to a moderator

Re: Simple type restriction [message #714778 is a reply to message #714763] Thu, 11 August 2011 09:32 Go to previous messageGo to next message
Drd  is currently offline Drd
Messages: 20
Registered: August 2011
Junior Member
how can I delete this identical thread? can I ?
Re: Simple type restriction [message #714819 is a reply to message #714778] Thu, 11 August 2011 10:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
No, it's a one way trip.

On 11/08/2011 6:32 AM, Drd wrote:
> how can I delete this identical thread? can I ?
Re: Simple type restriction [message #714820 is a reply to message #714761] Thu, 11 August 2011 10:55 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Comments below.

On 11/08/2011 6:03 AM, Drd wrote:
> hello all!
>
> if I put the restriction manual without predefining it i get this error:
>
> src-resolve.4.2: Error resolving component 'spatii'. It was detected
> that 'spatii' is in namespace 'http://www.w3schools.com', but
> components from this namespace are not referenceable from schema
> document
> 'file:///C:/Documents%20and%20Settings/adurnea/workspace/Schema/MyFiles/config.xsd'.
It sounds like there isn't an import statement for its schema.
> If this is the incorrect namespace, perhaps the prefix of 'spatii'
> needs to be changed. If this is the correct namespace, then an
> appropriate 'import' tag should be added to
> 'file:///C:/Documents%20and%20Settings/adurnea/workspace/Schema/MyFiles/config.xsd'.
Yep.
>
> this is the implementation i use:
>
>
> <xs:element name="nume" type="spatii"/>
>
> <xs:simpleType name="spatii">
> <xs:restriction base="xs:string">
> <xsattern value="[a-zA-Z0-9.]+"/>
> </xs:restriction>
> </xs:simpleType>
>
> being a complete noob i dont know what should i do
Do you know what an <xs:import> is for?
> I would really be grateful for the help.
Re: Simple type restriction [message #715077 is a reply to message #714820] Fri, 12 August 2011 06:05 Go to previous messageGo to next message
Drd  is currently offline Drd
Messages: 20
Registered: August 2011
Junior Member
nope i do not i would like to know and be thought
Re: Simple type restriction [message #715078 is a reply to message #715077] Fri, 12 August 2011 06:08 Go to previous messageGo to next message
Drd  is currently offline Drd
Messages: 20
Registered: August 2011
Junior Member
and google will be my teacher until further replies
Re: Simple type restriction [message #715090 is a reply to message #715078] Fri, 12 August 2011 06:43 Go to previous messageGo to next message
Drd  is currently offline Drd
Messages: 20
Registered: August 2011
Junior Member
the thing is that type definition is in the same xsd that is what throws me off.
Re: Simple type restriction [message #715100 is a reply to message #715090] Fri, 12 August 2011 07:13 Go to previous messageGo to next message
Drd  is currently offline Drd
Messages: 20
Registered: August 2011
Junior Member
its all done
i had problems because this was faulty
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3schools.com" elementFormDefault="qualified">
changed it to
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
and it worked
Re: Simple type restriction [message #715166 is a reply to message #715077] Fri, 12 August 2011 11:01 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
What have you done so far to try to answer this on your own?  In
general, you should expect people helping you to invest <b>less
effort </b>than you've invested yourself.<br>
<br>
<br>
On 12/08/2011 3:05 AM, Drd wrote:
<blockquote cite="mid:j22t8s$gor$1@news.eclipse.org" type="cite">nope
i do not i would like to know and be thought </blockquote>
</body>
</html>
Re: Simple type restriction [message #715966 is a reply to message #715166] Tue, 16 August 2011 02:14 Go to previous message
Drd  is currently offline Drd
Messages: 20
Registered: August 2011
Junior Member
thanks helped out a lot! rly now my life will be better now. maybe someday I could have 20k of msgs after I check a lot of noob threads and thell them where they went wrong in their life.
Previous Topic:Simple type restriction
Next Topic:reading inside a xml
Goto Forum:
  


Current Time: Wed Aug 20 12:51:09 EDT 2014

Powered by FUDForum. Page generated in 0.02946 seconds