Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Validation Error "use" parmeter
Validation Error "use" parmeter [message #74844] Fri, 11 July 2008 11:16 Go to next message
Sam Julian is currently offline Sam Julian
Messages: 29
Registered: July 2009
Junior Member
Hello!

<xsd:element default="name" name="simpleTypContainsEnumeration"
type="Nacl:simpleTypContainsEnumerationType" use="required"/>

ERROR: The "use" Value must be optinal when default is present.

Why? i work with the same Schema under Eclipse 3.3, the Validation Problem
occure only when I use Ganymede (3.4)

for your Comment i will be Thankful!

Sam
Re: Validation Error "use" parmeter [message #74862 is a reply to message #74844] Fri, 11 July 2008 11:42 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26126
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030901090302080706000002
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Sam,

See the second constraint for

http://www.w3.org/TR/xmlschema-1/#src-attribute

If you think about it, if the attribute must be present in the XML
instance, a default value is pointless because in a valid instance a
default will never be needed given an actual value will/must be present

Probably in the older version you were using a different validator that
didn't check this constraint properly.


Sam wrote:
> Hello!
>
> <xsd:element default="name" name="simpleTypContainsEnumeration"
> type="Nacl:simpleTypContainsEnumerationType" use="required"/>
>
> ERROR: The "use" Value must be optinal when default is present.
>
> Why? i work with the same Schema under Eclipse 3.3, the Validation
> Problem occure only when I use Ganymede (3.4)
>
> for your Comment i will be Thankful!
>
> Sam

--------------030901090302080706000002
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Sam,<br>
<br>
See the second constraint for<br>
<blockquote><a href="http://www.w3.org/TR/xmlschema-1/#src-attribute">http://www.w3.org/TR/xmlschema-1/#src-attribute</a><br>
</blockquote>
If you think about it, if the attribute must be present in the XML
instance, a default value is pointless because in a valid instance a
default will never be needed given an actual value will/must be present<br>
<br>
Probably in the older version you were using a different validator that
didn't check this constraint properly.<br>
<br>
<br>
Sam wrote:
<blockquote
cite="mid:4bdf374ce7ae50c1729234b12ba52fd0$1@www.eclipse.org"
type="cite">Hello!
<br>
<br>
&lt;xsd:element default="name" name="simpleTypContainsEnumeration"
type="Nacl:simpleTypContainsEnumerationType" use="required"/&gt;
<br>
<br>
ERROR: The "use" Value must be optinal when default is present.
<br>
<br>
Why? i work with the same Schema under Eclipse 3.3, the Validation
Problem occure
Re: Validation Error "use" parmeter [message #74877 is a reply to message #74862] Fri, 11 July 2008 13:07 Go to previous messageGo to next message
Sam Julian is currently offline Sam Julian
Messages: 29
Registered: July 2009
Junior Member
Hi Ed,

Thanks for the expalnation.
Do you think, that generating a ecore from this "invalid" Schema will
cause problem for EMF? Once i produce ECORE this should be Valid, or?

Cheers,
Sam
Re: Validation Error "use" parmeter [message #74890 is a reply to message #74877] Fri, 11 July 2008 13:12 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26126
Registered: July 2009
Senior Member
Sam,

You can generally ignore validation constraints on the XSD and still get
a Ecore model from it. Ecore doesn't have this constraint so the result
should be valid.


Sam wrote:
> Hi Ed,
>
> Thanks for the expalnation.
> Do you think, that generating a ecore from this "invalid" Schema will
> cause problem for EMF? Once i produce ECORE this should be Valid, or?
>
> Cheers,
> Sam
>
Re: Validation Error "use" parmeter [message #603129 is a reply to message #74844] Fri, 11 July 2008 11:42 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26126
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030901090302080706000002
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Sam,

See the second constraint for

http://www.w3.org/TR/xmlschema-1/#src-attribute

If you think about it, if the attribute must be present in the XML
instance, a default value is pointless because in a valid instance a
default will never be needed given an actual value will/must be present

Probably in the older version you were using a different validator that
didn't check this constraint properly.


Sam wrote:
> Hello!
>
> <xsd:element default="name" name="simpleTypContainsEnumeration"
> type="Nacl:simpleTypContainsEnumerationType" use="required"/>
>
> ERROR: The "use" Value must be optinal when default is present.
>
> Why? i work with the same Schema under Eclipse 3.3, the Validation
> Problem occure only when I use Ganymede (3.4)
>
> for your Comment i will be Thankful!
>
> Sam

--------------030901090302080706000002
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Sam,<br>
<br>
See the second constraint for<br>
<blockquote><a href="http://www.w3.org/TR/xmlschema-1/#src-attribute">http://www.w3.org/TR/xmlschema-1/#src-attribute</a><br>
</blockquote>
If you think about it, if the attribute must be present in the XML
instance, a default value is pointless because in a valid instance a
default will never be needed given an actual value will/must be present<br>
<br>
Probably in the older version you were using a different validator that
didn't check this constraint properly.<br>
<br>
<br>
Sam wrote:
<blockquote
cite="mid:4bdf374ce7ae50c1729234b12ba52fd0$1@www.eclipse.org"
type="cite">Hello!
<br>
<br>
&lt;xsd:element default="name" name="simpleTypContainsEnumeration"
type="Nacl:simpleTypContainsEnumerationType" use="required"/&gt;
<br>
<br>
ERROR: The "use" Value must be optinal when default is present.
<br>
<br>
Why? i work with the same Schema under Eclipse 3.3, the Validation
Problem occure
Re: Validation Error "use" parmeter [message #603133 is a reply to message #74862] Fri, 11 July 2008 13:07 Go to previous message
Sam Julian is currently offline Sam Julian
Messages: 29
Registered: July 2009
Junior Member
Hi Ed,

Thanks for the expalnation.
Do you think, that generating a ecore from this "invalid" Schema will
cause problem for EMF? Once i produce ECORE this should be Valid, or?

Cheers,
Sam
Re: Validation Error "use" parmeter [message #603141 is a reply to message #74877] Fri, 11 July 2008 13:12 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26126
Registered: July 2009
Senior Member
Sam,

You can generally ignore validation constraints on the XSD and still get
a Ecore model from it. Ecore doesn't have this constraint so the result
should be valid.


Sam wrote:
> Hi Ed,
>
> Thanks for the expalnation.
> Do you think, that generating a ecore from this "invalid" Schema will
> cause problem for EMF? Once i produce ECORE this should be Valid, or?
>
> Cheers,
> Sam
>
Previous Topic:Validation Error "use" parmeter
Next Topic:Need to update application schema, Please help.
Goto Forum:
  


Current Time: Tue Oct 21 00:34:28 GMT 2014

Powered by FUDForum. Page generated in 0.01789 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software