Originally posted by anil kumar:
I have understood the url specified in the xmlns and also the url specified in the targetNamespace
Technically speaking they are URIs, not (necessarily) URLs - they identify something - they do not have to be a valid address.
i am not able to understand the attribute xmlns:mh
It isn't an attribute - it's a namespace declaration
xmlns:mh="http://www.Monson-Haefel.com/jwsbook"
means:
"I will refer to the {http://www.Monson-Haefel.com/jwsbook} namespace and will henceforth use the prefix 'mh' to refer to it"
targetNamespace declares the namespace into which you define your new elements, types and attributes - kind of like the
Java "package" statement. Unlike Java's "package" though targetNamespace doesn't make that namespace the default namespace. If you want to use any of the elements, types and attributes that you have just defined (even to simply refer to them in the definition of other new elements, types, and attributes) you have to establish a way to refer to them by either making your targetNamespace the default namespace
xmlns="http://www.Monson-Haefel.com/jwsbook"
or assigning a prefix to it
xmlns:mh="http://www.Monson-Haefel.com/jwsbook"
See also
namespace and targetnamespace Confusion in namespace Ronald Bourret's XML Namespaces FAQ James Clark: XML Namespaces