473,473 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

targetnamespace - what is it?!?!

hi there,

i'm reading up on schema - but am probably missing something obvious RE
targetnamespace

i know there can only be one...

is it that the elements which are defined in the schema which have no
prefix are somehow now part of the namespace - would it need to upload the
definitions?

it says
targetnamespace - 'namespace to which all global schema components belong'

but what the point of that - there is already a default namespace
xmlns="http://....."

and anyway - what is a 'global schema component'?

thanks for ANY help?

kev bailey
Jul 20 '05 #1
1 18367
gabriel wrote:
targetNamespace = "THIS" says that "this schema describes elements that
belong to THIS namespace". So it sorts of defines a namespace. Then it can
get more complicated of course, for instance several schemas can define
parts of the same namespace. Let's say one schema describes a "car"
element in namespace "asdflj234lk234/namespaces/vehicels", and another
schema defines a "truck" element in the same namespace.

The xmlns= "THIS" says that all elements and attributes that are NOT
prefixed belong to THIS namespace.

A global comonent (element) is defined at the "top level" of a schema
document. The "car" element is the at the top level, and then I might
define that it has wheels elements within the car element. The wheels
elements are not global then, they are local.
Global elements can be used several times, in different places and levels
(not top level again though).

a bit more advanced:
However, I COULD define a wheel element on the toplevel as well, and thus
make it global. They would not be WITHIN the car element then. I could
then say that a car has wheels by defining an element within the car that
_references_ the global wheel elements with the ref attribute.
If and instance was checked against this schema, it would conform if
1) it had a car element with wheels in it
2) it had a wheel only

This is because there is no in XSDL way to define a root element. All
global elements CAN be the root! (Personally I think that sucks :)


thanks loads for the reply - after reading it a couple of times it has
certainly helped to clear some of the mist!!

am i right in thinking that the targetnamespace is useful when a schema is
made up from several xsd files all linked together via
import/include/redefine - it means then that another part of the schema can
reference an element by using its namespace?

kev bailey

/Gabriel - new to XML as well :)

"kevin bailey" <de*********@bigfoot.com> skrev i meddelandet
news:bd*******************@news.demon.co.uk...
hi there,

i'm reading up on schema - but am probably missing something obvious RE
targetnamespace

i know there can only be one...

is it that the elements which are defined in the schema which have no
prefix are somehow now part of the namespace - would it need to upload
the definitions?

it says
targetnamespace - 'namespace to which all global schema components
belong'

but what the point of that - there is already a default namespace
xmlns="http://....."

and anyway - what is a 'global schema component'?

thanks for ANY help?

kev bailey


Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: CB | last post by:
I'm just picking up XSL, and am having problems with namespaces. None of the posts I've read through/tried seem to work so I must be missing something basic. Please help. I started with a...
2
by: Charles Fineman | last post by:
I've been asked to look over an integration toolkit that has a bunch of schemas to specify message format. There are a couple of strange things I noticed right off the bat and I wanted to get...
1
by: Gianni Rubagotti | last post by:
I'm writing an XMl schema to learn and I have a problem I want that my schema work on my PC, not to put it on the internet but everytime I serach in tutorials the examples put as value of...
3
by: Markus Meckler | last post by:
Somewhere (I don't remember where) that Is it possible to enter a simple string as namespace in a xsd schema definiton. E.g.: <xsd:schema targetNamespace="mydomainstring"> Is this true? ...
0
by: comic_rage | last post by:
Hi, I am trying to add the targetNamespace with the xmlns to my xml schema file, but I am getting the following <?xml version="1.0" encoding="utf-8"?> <xsd:schema...
1
by: Maansi Sanghi | last post by:
Hello, I am trying to write an xsd file using .NET System.Xml.Sxhema Class Library. (1) I get an error while writitng if the XSD has a taregetnamespace. (II) for any xsd with no...
5
by: Jeff | last post by:
We are using .Net and the wsdl Utility to generate proxies to consume web services built using the BEA toolset. The data architects on the BEA side create XML schemas with various entities in...
0
by: steph | last post by:
Is there a way to specify targetNamespce for the out parameter of a web service method? -- steph
4
by: fedrok | last post by:
Hi you all. I've got a problem validating an XML file using the following Schema (I'll post only the beginning of this): ...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.