W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2004

Re: Namespace problem

From: Volker Zink <Volker.Zink@porabo.ch>
Date: Wed, 18 Aug 2004 13:38:44 +0200
Message-ID: <41233FC4.8000802@porabo.ch>
To: Burak Emir <Burak.Emir@epfl.ch>
CC: xmlschema-dev@w3.org

1. The Error mentioned was produced by the w3.org-Validator at 
http://www.w3.org/2001/03/webdata/xsv. Normally i use the validator in 
my programming environment (VisualWorks Smalltalk), but i trust the one 
at w3.org more, and it has more detailed error messages/warnings.

2. If i remove the "grips://xml.recom-verlag.de/comm/plem"-namespace 
completely (including "plem:"-prefixes), i get following result
PLEMGrips-Schema-Fall.xsd:6:5: Invalid: Undefined type 
{http://www.w3.org/2001/XMLSchema}:FallImportExport referenced as type 
definition of fallImportExport
Problems with the schema-validity of the target

I don't write an own validator. It just seems to me, that the validator 
in VisualWorks has other results as the w3.org-validator, so i want to 
know, whats really correct, and why.
As a programmer i use namespaces everyday. But XML-namespaces are a bit 
strange to me compared to the namespaces in VisualWorks Smalltalk. But 
probably because in XML its all about syntax, in Smalltalk its about 
objects (classes). One object is in one namespace. Thats quite easy.


Burak Emir schrieb:

> Hello Volker,
> 1. which parser are you using? Is it possible that is has 
> namespace-support disabled?
> 2. [unsure] does it work when you remove the "plem:" prefix from the 
> schema (both in root and in the type="plem:" attribute) ?
> I am implementing a schema validator myself, and I stubbed my toe on a 
> similar thing. The fact is, common sense would suggest namespaces make 
> element names unique by adding the URI to them. It would then be ok to 
> forget the namespace prefixes, representing element names as {uri:name}.
> Unfortunately, in XML schema this is not the entire truth - one has to 
> remember also the prefixes, because they appear in attribute values. I 
> consider this a real shortcoming of the XML schema definition language 
> - it is counter-intuitive, because one is forced to mix the structure 
> of the definition (a declaration xmlns:foo="..." in the root element 
> <schema ...>) with the structure of the instances (as in type="foo:...").
> Since there is no element "plem:...", it could be that your software 
> just "forgot" about that prefix, and defaulted it to "" - in any case, 
> a bug.
> cheers,
> Burak
> Volker Zink wrote:
>> when validating (strict) the included XML-document versus the 
>> included schema i get following error (its the only error):
>> Invalid per cvc-complex-type.1.2.4:
>>   element {grips://xml.recom-verlag.de/comm/plem}:fallImportExport 
>> not allowed here (1) in element 
>> {grips://xml.recom-verlag.de/comm/plem}:fallInterface, expecting 
>> [{None}:fallImportExport]:
>> I think by setting the targetNamespace in the schema, the elements 
>> and types are in the namespace 
>> "grips://xml.recom-verlag.de/comm/plem", so why is the namespace 
>> 'None' expected (and whats the meaning of the []-brackets)?
>> Thanks
>> Volker Zink
> <snip/>

Received on Wednesday, 18 August 2004 11:41:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:23 UTC