473,772 Members | 2,292 Online
Bytes | Software Development & Data Engineering Community
+ 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 18388
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 "asdflj234l k234/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*********@bi gfoot.com> skrev i meddelandet
news:bd******** ***********@new s.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
2556
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 simple example, and created an XSD, XML and XSL that work. They are; ---XSD-- <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
2
10029
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 others' thoughts on it (disclaimer, obviously I'm no XML expert so forgive me if these are basic). --------Exhibit A: The start of a response message schema----------- <xsd:schema targetNamespace="http://www.QQQ.com"
1
1483
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 targetNamespace a http and I don't know what's the well formed URI to say my Schem is in C:\skima\ C:\skima\
3
2583
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? Marcus
0
1234
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 attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.ciber.com/myfile" version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
1
1345
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 targetnamespace the program works fine. I want to create an xsd with the following namespaces <xsd:schema targetNamespace"http://www.homedepot.com/HD"
5
5402
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 separate files for ease of maintainability. These schemas are all part of the same namespace. When defining a web service that access more than one of these entities, the wsdl file generated by BEA contains multiple schema elements with the same...
0
865
by: steph | last post by:
Is there a way to specify targetNamespce for the out parameter of a web service method? -- steph
4
3941
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): ---------------------------------------------------------------------------- <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns="http://tempuri.org/ae" elementFormDefault="qualified" targetNamespace="http://tempuri.org/ae" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="FileContratti">
0
9621
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8937
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7461
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6716
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4009
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.