[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Why associate an attribute with a namespace ?


associate attributes with tags

----- Original Message ----- 
From: <mihaiu@m...>
To: "Jeff Greif" <jgreif@a...>
Cc: <xml-dev@l...>
Sent: Thursday, February 17, 2005 9:01 AM
Subject: Re:  Why associate an attribute with a namespace ?


> >By using an attribute from a particular namespace which has a "global"
>>declaration (for example in XML Schema), you can ensure that any reference
>>to that attribute name will require values of the same data type.
>>
>    This is a valid reason, indeed. The only valid reason in seven 7
> e-mails.
>
your trolling is massive...

as noted by others, there are other reasons.
one does not necissarily need to process xml as a tree (though often common
and simpler), one can process xml via a number of passes (the attributes may
hold info irrelevant to the semantics of the format, but maybe relevant to a
particular pass).

now, yes, sometimes they are overused, or it is easier to fudge over the
semantics (eg: treating 'xml:lang' as if it were a normal format tag), but
whatever.

on this route, why do we even need to distinguish between attributes and
tags at all?
everything done with attributes could also be done with tags, right?

until a certain kind of problem pops up:
one can't add tags in all circumstances without potentially effecting the
semantics of an app (or at least if the format ends up being designed
similarly to s-exps, vs. like tradiotional xml).

(foo "hello")
may not allways be safely altered to:
(foo "hello" (lang "english"))

as lang may well be interpreted as part of foo's data vs as a descriptive
tag. this is potentially remedied with namespaces:

(foo "hello" (bar:lang "english"))

implicitly, "hello" is under the default namespace, thus relevant to foo
(also under the same namespace), but lang is under the bar namespace, and
likely ignored by something only concerned with the default namespace.

imo, similar applies to attributes.

(I appologize to anyone if I am missing the point myself...).


not too long ago I had a similar kind of argument, however, with a person
who thought that dynamic typing offered no real possible advantage over
static typing (in the c++ or java sense), and that scripting languages and
interpreted languages had no practical reason to exist.

"dynamic" is sometimes important.

I will draw a comparrison.

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.