java - Understand xmlns , xmlns:somePreFix , targetNamespace in the XSD -
i tried understand these 3 attributes in xsd
definition. not sure if right . please correct me .if wrong. thanks
compared java class
definition xsd definition.
the targetnamespace
package definition of java class. indicating members including fields , properties , class belong targetnamespace
.
and need import class members other class consuming them. xmlns
, xmlns:someprefix
work for. , xmlns
default one.
yes, targetnamespace tells scope elements of xsd reside in. similar package not same tags inside xml file reside in targetnamespace. on other hand, in java instance variables/methods not belong package directly, belong class.
xmlns:someprefix provides convenient "someprefix" alias imported xml schema's namespace. xmlns not not import members of targetnamepace have separate xsd:import tag. rather, referring namespace. can of course use in conjunction xsd:import have "java import like" effect.
Comments
Post a Comment