It's not a secret anymore!*
The moose likes XML and Related Technologies and the fly likes Confusion with namespace Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Confusion with namespace" Watch "Confusion with namespace" New topic
Author

Confusion with namespace

Micheal John
Ranch Hand

Joined: Nov 01, 2006
Posts: 344


I have a diffculty in understanding what is the purpose of targetNamespace and what value should be used for this?

"xmlns" --> default namespace (what is this means and what value should we use)

"xmlns:xs" --> what is this means and what value should we use.

I am started learning Web Services from RMH book. In RMH book, they have used the following:

xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xs="http://www.Monson-Haefel.com/jwsbook"
targetNamespace="http://www.Monson-Haefel.com/jwsbook"

Also, I have seen w3schools site tutorial, they have mentioned:

xmlns="http://www.w3schools.com"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3schools.com"

Why this different? In xmlns and xmlns:xs, the values used are differnet.(used interchangably)

I know we can have any value for uri, since it's not look into this location. but why this three things and what value should we used for it? Please throw some light on it..
[ March 06, 2007: Message edited by: Micheal John ]

Micheal John
SCJP 1.4 (86%), SCWCD 1.4 (86%), SCBCD 1.3 (85%), SCDJWS (Just Started...) - Satisfaction Lies in Our EFFORT, Not in the ATTAINMENT
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Confusion with namespace
 
Similar Threads
Differences between targetNamespace and default namespace
Doubt in WSDL import element
targetNamespace and default namespace
TargetNameSpace
Doubt in Schema