Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » XSD ID Attribute Validation
XSD ID Attribute Validation [message #495773] Fri, 06 November 2009 00:18 Go to next message
Tom  is currently offline Tom Friend
Messages: 3
Registered: November 2009
Junior Member
Is there a way to how to stop or replace the automatic validation of the attributes of elements that I mark as type xsd:ID in my schema?

The validation uses the EMF XML validator (XMLTypeValidator::validateID) that doesn't allow spaces or numeric entries for these attributes in my editor. Is there a reason why the ID types need to have this type of validation?

Regards,
Tom

Re: XSD ID Attribute Validation [message #495845 is a reply to message #495773] Fri, 06 November 2009 11:48 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Tom,

Comments below.

Tom wrote:
> Is there a way to how to stop or replace the automatic validation of
> the attributes of elements that I mark as type xsd:ID in my schema?
No.
> The validation uses the EMF XML validator
> (XMLTypeValidator::validateID) that doesn't allow spaces or numeric
> entries for these attributes in my editor. Is there a reason why the
> ID types need to have this type of validation?
That's what XML Schema defines for this type. You could use xsd:int or
xsd:string and use ecore:id="true" instead. Note that spaces and
characters like : and # can get you into trouble with EMF as well.
I.e., often we serialize a list of references as space separated IDs.
Also, we recognize a QName representing the type by looking for a : or
recognized a URI verses and ID by looking for the #.
>
> Regards,
> Tom
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: XSD ID Attribute Validation [message #495898 is a reply to message #495845] Fri, 06 November 2009 14:54 Go to previous message
Tom  is currently offline Tom Friend
Messages: 3
Registered: November 2009
Junior Member
That did it! ecore:id was exactly what I was looking for.

Thank you very much Ed.

Tom
Previous Topic:Refer to Enumerators in the ecore (not EEnums)
Next Topic:How to print the tree view for an Ecore model?
Goto Forum:
  


Current Time: Tue Apr 23 12:17:58 GMT 2024

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

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

Back to the top