Hi all,
I just started to study XML schemas and I am facing a doubt regarding namespaces in xml schema:
1:How does the parser know what are the defined elements in the namespace if namespaces themselves do not point to any physical location.i.e in below declaration
"xs: http://www.w3.org/2001/XMLSchema ",how does the parser knows that <xs:element> is valid declaration.
2:when we say <xs:element name="name" type="xs:string">,then "type" attribute belongs to which namespace,as it is not prefixed with anything?
Thanks.
Jimmy Clark
Ranch Hand
Joined: Apr 16, 2008
Posts: 2187
posted
0
Try to use your parser with the following declaration in your XML Schema and see what happens.
Hi Jimmy,
Thanks for the reply.I got my answer for the first question,but what about second question?Please be patient with me if it's a silly one.
Waiting for the reply.
2:when we say <xs:element name="name" type="xs:string">,then "type" attribute belongs to which namespace,as it is not prefixed with anything?
The type attribute, just like the name attribute, is in null (or sometime said empty for the same) namespace. But these attributes are somehow ontologically "attached" to the element (xs:element) they are "describing" (if you are somehow knowing the rudiment of renaissance philosophy, that might help a bit), their schema is normally appearing in the schema defining the xs namespace (that is the schema or schema). Does it make thing clearer? I think you might think, hell no! Maybe you might come back to it when time comes.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.