srini456 Posted March 31, 2012 Report Share Posted March 31, 2012 can you please explain what is a namespace and a target namespace in XML. Emi anukokundi guys. e db naaku chaala help chestundi.So anduke posting qtions? ninna soa gurinchi adiga.Baga explain chesaru. Link to comment Share on other sites More sharing options...
bokuboy Posted March 31, 2012 Report Share Posted March 31, 2012 LTT Link to comment Share on other sites More sharing options...
google2012 Posted March 31, 2012 Report Share Posted March 31, 2012 [color=#000000][font=Calibri, Helvetica, Arial, sans-serif][size=4]namespace uniquely identifies a set of names so that there is no ambiguity when objects having different origins but the same names are mixed together, Using the Extensible Markup Language ([/size][/font][/color][url="http://searchsoa.techtarget.com/definition/XML"]XML[/url][color=#000000][font=Calibri, Helvetica, Arial, sans-serif][size=4])[/size][/font][/color] Link to comment Share on other sites More sharing options...
Nellore Pedda reddy Posted March 31, 2012 Report Share Posted March 31, 2012 Link to comment Share on other sites More sharing options...
guruvu Posted March 31, 2012 Report Share Posted March 31, 2012 A xml document type is a combination of elements of different types. In some cases your xml document may need to include elements from different locations i.e, all the elements may not be neccessarily declared in a single schema file. And while defining this there can be irregularities if both the sources may have same kind of names for the elements. For example schema 1 may have element by the name product defined. Another schema that you are trying to import may also have same element "product" defined. Now when you combine together you would have two references for the same element product and can be a problem. So they came up with the concept of namespaces which allows you to identify each element of the same time uniquely. Say schema1 product is referenced by ns0:product and other one is referenced by ns1:product. ns0 and ns1 are name space prefixes which actually point to a target namespace. Target namespace defines the location to which the elements point to i.e, element reference location say www.abctech.com/xyz/1234. You can have as my target namespaces defined. xml namespace defines the actual structure of the elements that you use in xml i.e, syntax for defining the xml document itself. This can be only one declaration and it is always the same for any xml document. Link to comment Share on other sites More sharing options...
rambabu304 Posted March 31, 2012 Report Share Posted March 31, 2012 LTT Link to comment Share on other sites More sharing options...
srini456 Posted March 31, 2012 Author Report Share Posted March 31, 2012 y to lift the thread rambabu.wats ur problem? thanks guruvu Link to comment Share on other sites More sharing options...
riddle Posted March 31, 2012 Report Share Posted March 31, 2012 [quote name='srini456' timestamp='1333230565' post='1301584463'] y to lift the thread rambabu.wats ur problem? thanks guruvu [/quote] thread nee page lo top lo unchataniki he is bumping the thread to help you.. Link to comment Share on other sites More sharing options...
Sapota Posted March 31, 2012 Report Share Posted March 31, 2012 nenu naku vachinattu ga simple ga cheptanu bayya...but correcto kado cant verify but this is how i can interpret it. namespace anedi oka container anuko. aa container lo u will define all your "types". for example namespace url: http://www.andhrafriends.com/example.dtd undi anuko example lo u will define some like name:String age:number address: String then xml lo u can use to construct datasets like this: <details> <example:name>srini</example:name> <example:age>25</example:age> </details> <details> <example:name>sapota</example:name> <example:age>twenty</example:age> </details> srini name unna detail will get validated perfectly. but sapota detail will throw error because age is number however its data is "twenty" which is a string. so age ane element ki definition namespace lo rastam anamata. xml is structured data. ee structure ela undali ani namespace lo define chestav. ala u can add multiple namespaces to an xml document and use the elements defined in those namespaces. hope u got it.. Link to comment Share on other sites More sharing options...
Sapota Posted April 1, 2012 Report Share Posted April 1, 2012 Link to comment Share on other sites More sharing options...
Recommended Posts