[jdom-interest] hashCode() and equals()

Amy Lewis amyzing at talsever.com
Sat Jun 2 15:09:54 PDT 2001

On Sat, Jun 02, 2001 at 03:50:00PM -0400, Elliotte Rusty Harold wrote:
>At 1:01 PM -0500 6/2/01, philip.nelson at omniresources.com wrote:
>>In both WSDL and as Bob pointed out, in XSLT, there are cases where
>>comparisons are made where you only know the prefix.
>There are simply no such cases in XSLT. Of that I'm 99.9% certain. 
>That you think there are indicates to me either that you're 
>misunderstanding something or that I'm misunderstanding you. An XSLT 

I believe that you are correct.  But ...

>>   That doesn't mean that
>>the uri doesn't matter and I never said that the spec reads that way.  If
>>you need to find the matching definition of an element with
>>type="xsd:string", you have to take into consideration the prefix, even if
>>all you do is find the matching uri.
>No, that's not how schemas work either. A schema does not look for 
>the definition of an xsd:string element. It resolves the xsd prefix 
>to a URL, say http://www.w3.org/2001/XMLSchema, and it looks for the 
>definition of the string type in the http://www.w3.org/2001/XMLSchema 
>namespace. The prefix is a lot less important than you seem to think 
>it is.

Again, correct.  But!

The "but" in both cases is that the namespace is referred-to, using the
prefix, in an attribute value.  If I understand the way that JDOM's
namespaces currently work, "prefixes are not important," which is
spec-compliant, but in fact, inside a document in which a prefix is
declared, not only the prefixes attached to elements may need to
change, but *also* the prefixes within embedded XPaths or schema
type-definition references may need to change.  Which means that the
processor cannot safely make changes, unless it can track the content
of attribute values to make certain that these have changed as well.

Now, is it possible to come up with a use case in which this is
significant?  It seems to me that the case would almost always involve
at least two documents, and may perhaps require working with at least
three (say ... attempting to paste together two XSLT stylesheets that
operate on the same namespace target, but that use different prefixes
for the target?  Hmmm, no, even there it's unambiguous; you have to
have a namespace clash ...).

At least, that's how I'm reading philip.  But I can't come up with an

Amelia A. Lewis          alicorn at mindspring.com          amyzing at talsever.com
Better to have thirty minutes of wonderful than a lifetime of nothing

More information about the jdom-interest mailing list