Hi Uwe,

On 12/7/08 11:02 PM, "Uwe Schindler" <[EMAIL PROTECTED]> wrote:

> Hi Matt,
> ...
>
> There is another way to map the string-only variant: QName.valueOf(). This
> static method parses the QName in the same way, like XSL-Parameters are
> given as string to stylesheets. Not-namespaced QNames are generated the same
> way like above, so the DC variant could also be generated this way using a
> string only: QName.valueOf("{http://purl.org/dc/elements/1.0}format";). The
> ns-prefix is uninteresting, because QNames do not need one without a XML
> parser content (the URI identifies the namespace alone). This is why
> equals() and hashCode() only use namespace and localName.

The problem with what you are suggesting is that it implies that we know (in
the String only case) that there is an implicit ns of
"http://purl.org/dc/elements/1.0"; attached to format. In the String only
case, we aren't always guaranteed this (b/c we still want to support
arbitrarily defined keys as well.

I will file a JIRA issue and prepare a patch to upgrade o.a.t.m.Metadata to
use a Map<QName,List<String>> internally and to keep existing API
compatibility. Then you can let me know if and how it meets your needs.

Also, as an FYI, my name is "Chris", not "Matt".

Thanks!

Cheers,
Chris


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: [EMAIL PROTECTED]
WWW:   http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Disclaimer:  The opinions presented within are my own and do not reflect
those of either NASA, JPL, or the California Institute of Technology.


Reply via email to