views:

97

answers:

3

(First of all, I'm trying to learn how to handle xsd files, I know very little)

I got this xsd, and just copy to Eclipse IDE, and it says there an error on line 26:

<xs:element name="Issuer" type="dkx:IssuerType" />

saying:

cvc-attribute.3: The value 'dkx:IssuerType' of attribute 'type' on element 'xs:element' is not valid with respect to its type, 'QName'.

Everything in this error message is in the specified line, except the "QName" (what is it?).

Any idea how to solve this? (as this is an example file, I'm assuming it is an independent file, hope it is)

+1  A: 

I suspect the type dkx:IssuerType has not been defined, according to Eclipse.

Maybe you should start with a more basic overview and work your way through. Try this: http://www.w3schools.com/Schema/default.asp

Cheeso
Thanks, I'm reading some tutorials, but I'm really looking for this issue answer now.
Tom Brito
By the way, you give a good hint with the dkx thing.. I'll study more it..
Tom Brito
maybe the dkx is defined in one of the imports, but why would Eclipse raise an error if so? I mean, when we import something, it is like it was there in the same file, so that should not give an error..
Tom Brito
Right. But maybe it is NOT defined in any of the imports.
Cheeso
A: 

The error is saying that the type attribute of the xs:element element must be a QName ("qualified name", an XML term). It doesn't recognise dkx:IssuerType as a QName.

The dkx prefix refers to another schema, declared at the start of the document as xmlns:dkx="http://www.daisy.org/DRM/2005/KeyExchange".

The tool will try and resolve that dkx schema by chasing that URL. A quick shows that that URL gives a 404 Not Found. My guess is that Eclipse is failing to locate this external dkx schema, and therefore cannot verify that dkx:IssuerType is a QName.

To fix it, you need to change that URL to something that is actually there, or add a schemaLocation attribute to point to where the dkx schema file is. But for that, you need a copy of that external schema.

skaffman
A: 

Found: I was using wrong file extension, ".xml", while the correct is ".xsd".

Tom Brito