|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Namespaces,
> From: Richard Tobin [mailto:richard@c...] <snip/> > Incidentally, this use of unqualified local elements is very natural > for some applications. Consider structures in a traditional > programming language like C, and represent the fields of the structure > by subelements. Do you expect to have to qualify the field names? Yes, if you want to use them outside of their definition. > No, they are scoped by the type of structure containing them. In the definition, yes. That makes sense since the scope is implicit and cannot be otherwise (completely unlike XML namespaces). In any code that accesses the field, though, the field must be explicitly qualified with the name of the containing instance. This sort of analogy just lends itself to greater confusion on namespaces, not greater understanding. Unlike a struct in C, a namespace does not implicitly constrain the valid children of an element. A schema *may* do so if the author wishes, but that is not required. A C struct always implicitly does so, and there is no way around it -- except by defining a new struct (or defining some ugly (void *) field and doing dangerous coercions at runtime).
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








