Ok, what about
urn:/am.i/a/donut.jelly
is this mapped to i.am.a.jelly.donut
or is it mapped to i.am.a.donut.jelly
I think it should be the second one.
Propose the following algorithm
- reverse the hostname as we do today to get a package name
- if text after the host name:
- replace all occurrences of "/" and "\" with "."
- convert all occurrences of "-" with "_".
- tokenize the resulting string with "." delimitters.
- for each token do the following (like we do with the hostname words):
- makeNonJavaKeyword
- convert digits to "."
- append the tokens to package name separated by "."'s
Rich Scheuerle
XML & Web Services Development
512-838-5115 (IBM TL 678-5115)
Russell Butek/Austin/IBM@IBMUS 05/31/2002 04:23 PM
Please respond to axis-dev
To: [EMAIL PROTECTED]
cc:
Subject: Utils.makePackageName has problems
Our automagic namespace->package algorithm has problems. If we have two
types:
- http://www.x.com/a/b/c:Type
- http://www.x.com/x/y/z:Type
These would both get mapped to the class: "com.x.www.Type". Bad news.
The file info isn't being taken into account. But SHOULD it be? What
about
urn:i/am/a/jelly/donut
urn:i/think/therefore/i/am
These namespaces have the same problem, they will both map to package "i".
Before I dive into this mess, is there anyone who thinks taking file info
into account is a bad idea?
Russell Butek
[EMAIL PROTECTED]