Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » invalid QName for EMF but not for javax.xml.namespace
invalid QName for EMF but not for javax.xml.namespace [message #655098] Fri, 18 February 2011 10:16 Go to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 636
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

I have a QName value that works with javax.xml.namespace.QName but not with org.eclipse.emf.ecore.xml.type.internal.QName

I suppose that there is better check to follow W3C recommendation but due to this issue I cannot load the EMF resource.
Is there a way to avoid this check?


BTW you can test it with the following code:
		final String qname = "https://editor";
		new javax.xml.namespace.QName(qname);
		new org.eclipse.emf.ecore.xml.type.internal.QName(qname);

You will see that it hrows the exception for the third line:
org.eclipse.emf.ecore.xml.type.InvalidDatatypeValueException: cvc-datatype-valid.1.2.1: invalid QName: https://editor


Regards,




Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team

[Updated on: Fri, 18 February 2011 10:16]

Report message to a moderator

Re: invalid QName for EMF but not for javax.xml.namespace [message #655645 is a reply to message #655098] Tue, 22 February 2011 06:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30551
Registered: July 2009
Senior Member
Aurelien,

Comments below.

Aurelien Pupier wrote:
> Hi,
>
> I have a QName value that works with javax.xml.namespace.QName but not
> with org.eclipse.emf.ecore.xml.type.internal.QName
>
> I suppose that there is better check to follow W3C recommendation but
> due to this issue I cannot load the EMF resource.
> Is there a way to avoid this check?
>
>
> BTW you can test it with the following code:
>
> final String qname = "https://editor";
This doesn't look like a QName to me. I.e., I don't think / is a valid
character in an NCName.
> new javax.xml.namespace.QName(qname);
> new org.eclipse.emf.ecore.xml.type.internal.QName(qname);
>
> You will see that it hrows the exception:
>
> org.eclipse.emf.ecore.xml.type.InvalidDatatypeValueException :
> cvc-datatype-valid.1.2.1: invalid QName: https://editor
>
>
> Regards,
>
>
>
Re: invalid QName for EMF but not for javax.xml.namespace [message #655717 is a reply to message #655645] Tue, 22 February 2011 12:37 Go to previous messageGo to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 636
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi Ed,

Ed Merks wrote on Tue, 22 February 2011 07:20

final String qname = "https://editor";
This doesn't look like a QName to me. I.e., I don't think / is a valid
character in an NCName.



I also think that it is not valid following w3c Recommendation.
Unfortunately,
- w3c Recommendation are just recommendation
- w3c Recommendation are not very understandable( which is the correct patterns for a QName?)
- default javax.xml allows to use '/'
- the file that I get is generated by a third party with these bad QNames (yes there are several Sad)

So I was wondering if there is way to ignore QName errors?
I don't find how to do it until now.
Or do you know if there is a place where there is a readable and easy-understandable definition of QName?

Regards,



Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: invalid QName for EMF but not for javax.xml.namespace [message #655878 is a reply to message #655717] Wed, 23 February 2011 00:45 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30551
Registered: July 2009
Senior Member
Aurelien,


Comments below.



Aurelien Pupier wrote:
> Hi Ed,
>
> Ed Merks wrote on Tue, 22 February 2011 07:20
>> final String qname = "https://editor";
>> This doesn't look like a QName to me. I.e., I don't think / is a
>> valid character in an NCName.
>
>
> I also think that it is not valid following w3c Recommendation.
> Unfortunately,
> - w3c Recommendation are just recommendation
> - w3c Recommendation are not very understandable( which is the correct
> patterns for a QName?)
> - default javax.xml allows to use '/'
> - the file that I get is generated by a third party with these bad
> QNames (yes there are several :()
>
> So I was wondering if there is way to ignore QName errors?
No.
> I don't find how to do it until now.
> Or do you know if there is a place where there is a readable and
> easy-understandable definition of QName?

http://www.w3.org/TR/1999/REC-xml-names-19990114/#ns-qualnam es
http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName
>
> Regards,
>
>
Previous Topic:EMF Code Generation: Separating generic classes according to schema structure
Next Topic:Losing atributes after saving and reopening Dynamic Instances
Goto Forum:
  


Current Time: Fri Oct 18 05:18:24 GMT 2019

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

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

Back to the top