[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Do we "own" XML namespace?

Trans

7/14/2008 5:41:00 PM

Hi--

Little bit of debate going on with LibXML, and I'd like to get some
general feed back.

Currently the module namespace used by libxml-ruby is "XML", so we see
code like:

require 'libxml'

XML::Document.new

The question is whether that's fair, since it sort of lays claim to
"XML" as owned by the libxml project. It also means the libraries name
does not correspond to the top module name. So we are considering
instead switching to:

LibXML::Document.new

(though we would leave backward compatibility in for a while). Another
option is:

LibXML::XML::Document.new

since one can always do

include LibXML

to get the same functionality that we have now.

What do others think? What is the best/proper approach here?

Thanks,
T.

6 Answers

hwake

4/5/2008 8:26:00 AM

0

On Apr 4, 1:27 pm, David Moss <q0320...@mail.connect.usq.edu.au>
wrote:
> In article <f214c26d-b718-4e58-8a90-
> 2789d59fb...@i36g2000prf.googlegroups.com>, hw...@freeispshares.co.uk
> writes...
>
> > > I see. You do it to deliberately insult a minority group.
> > > At least you are honest about it and I respect that.
>
> > Minority group?  How the hell do you work that out?!
> > I am from a minority group - so why don't insults to me count because
> > of my minority status?
>
> Which minority group do you belong to, and how have they been
> insulted?

Islam is reputed to be the fastest growing religion, and its adherents
for a very large global community.

My people are a global minority, a local minority in many areas, and
heading for a national minority. We've been insulted since 1948!

Besides, why did you link 'insult' so closely with 'minority group'.
Does an insult only count when you think the victim is in a minority?

> Islam is a minority group here in Australia. For a while it was the
> fastest growing religion here, but I think the Buddhists may be back in
> the lead again now. Both Islam and Buddhism operate off a very small
> base here. I'm pretty sure Islam is in the minority in Europe too.
>
> --
> DM
> Eristic extraordinaire
> personal opinion only
> The Australian Politics Resourcehttp://politics.sunnybar...

hwake

4/9/2008 2:58:00 PM

0

On Apr 6, 8:53 am, David Moss <q0320...@mail.connect.usq.edu.au>
wrote:
> In article <84d4ac46-026e-4a30-93eb-
> 7a5dc581e...@a1g2000hsb.googlegroups.com>, hw...@freeispshares.co.uk
> writes...
>
> > > Which minority group do you belong to, and how have they been
> >  > insulted?
>
> > Islam is reputed to be the fastest growing religion, and its adherents
> > for a very large global community.
>
> Islam is indeed a fast growing religion here in Oz, but its easy to grow
> fast off a small base. I.e. if there was only one Muslim and he
> recruited another, the growth rate would be 100% per annum. Christianity
> would have to add 1.25 million new recruits in Oz to grow at that rate!
>
> > My people are a global minority, a local minority in many areas, and
> > heading for a national minority.  We've been insulted since 1948!
>
> Have a word with the Mrs

You're an idiot.

> about it. You may even both enjoy trying to to
> increase the numbers of your ethnic and/or religious group.
>
>
>
> > Besides, why did you link 'insult' so closely with 'minority group'.
> > Does an insult only count when you think the victim is in a minority?
>
> Hey, I'm not the one who deliberately misspells the name of minority
> groups, I just noted that it was done. You are the one who linked insult
> with the minority group through deliberate misspelling.

There is no comparison with the sort of insults we have had to put up
with.


> I also point out that racial or religious propagandists generally don't
> attack the dominant ethnic group and religion within their society.

To whom are you addressing this? I've just been attacking Islam.

> Psychologists believe this may be due to inferiority complex.

So this is why you are constantly sticking up for mozlems. We did
wonder.



> DM
> Eristic extraordinaire
> personal opinion only
> The Australian Politics Resourcehttp://politics.sunnybar...

hwake

4/10/2008 8:23:00 AM

0

On Apr 10, 8:29 am, David Moss <q0320...@mail.connect.usq.edu.au>
wrote:
> On Wed, 09 Apr 2008 07:57:42 -0700, hwake wrote:
> > To whom are you addressing this?  I've just been attacking Islam.
>
> >> Psychologists believe this may be due to inferiority complex.
>
> > So this is why you are constantly sticking up for mozlems.  We did
> > wonder.
>
> Try insulting another minority group and see if I arc up.
> Aborigines is a good one to try here in aus.politics. I tend to watch for
> that too.
>
> I don't mind admitting I'm a liberal. I used to be a liberal Liberal but
> nowadays I'm just a liberal. Thats why I stick up for minorities

That doesn't explain why you stick up for mozlems rather than the
aboriginals.

> when
> fascists try to foment hatred against them. No other reason.
>
> --
> David Moss
> Personal Opinion Only
> The Australian Politics Resourcehttp://politics.sunnybar...

Martin DeMello

7/14/2008 8:33:00 PM

0

On Mon, Jul 14, 2008 at 10:40 AM, Trans <transfire@gmail.com> wrote:
> (though we would leave backward compatibility in for a while). Another
> option is:
>
> LibXML::XML::Document.new
>
> since one can always do
>
> include LibXML
>
> to get the same functionality that we have now.

I like this one - it lets you use the XML namespace without
monopolising it. It also allows someone writing a drop-in replacement
for LibXML to use the same trick and have code switch effortlessly
between the two.

martin

cfis

7/14/2008 11:58:00 PM

0

Some thoughts...

>
> > LibXML::XML::Document.new
>
> > since one can always do
>
> > include LibXML

So I didn't actually do that. Instead, I moved LibXML into a new
LibXML module.

So:

LibXML::Document.new

Then for backwards compatibility in libxml.rb:

module XML
include LibXML
end

I prefer this approach because having to type in LibXML::XML
constantly would be annoying (sure you could do an include, but that
would also be annoying). Since we're making this change, let's make
sure that future usage of the API is a pleasant as possible.

> I like this one - it lets you use the XML namespace without
> monopolising it. It also allows someone writing a drop-in replacement
> for LibXML to use the same trick and have code switch effortlessly
> between the two.

Right - and that should still work exactly the same. You'd have to
either uncomment out the libxml require code (true for both
approaches), or remove the XML module and replace it with your own
(also true for both approaches).

Charlie

matt

7/15/2008 1:22:00 AM

0

cfis <cfis@savagexi.com> wrote:

> Some thoughts...
>
> >
> > > LibXML::XML::Document.new
> >
> > > since one can always do
> >
> > > include LibXML
>
> So I didn't actually do that. Instead, I moved LibXML into a new
> LibXML module.
>
> So:
>
> LibXML::Document.new

Charlie - sounds great, just yell real loud when the gem update
implementing this change comes online... :) Thx! - m.

--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...