Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 75146 invoked from network); 14 Sep 2003 08:24:57 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 14 Sep 2003 08:24:57 -0000 Received: (qmail 72317 invoked by uid 500); 14 Sep 2003 08:24:28 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 72293 invoked by uid 500); 14 Sep 2003 08:24:27 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 72282 invoked from network); 14 Sep 2003 08:24:27 -0000 Message-ID: <0a7001c37a99$8cb7b320$72545ecb@lankabook2> From: "Sanjiva Weerawarana" To: References: Subject: Re: [PATCH] javax.xml.namespace.QName version 1.1 Date: Sun, 14 Sep 2003 14:23:57 +0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N +1 Glen .. this is totally retarded IMO too. Let's push Roberto .. he's the lead on this isn't he? We'll see him in a week @ the WSDL meeting. Sanjiva. ----- Original Message ----- From: "Glen Daniels" To: Sent: Sunday, September 14, 2003 9:35 AM Subject: RE: [PATCH] javax.xml.namespace.QName version 1.1 > > > > Argh. I am going to just note, for the record, that I think this was a poor change (not your patch, Ias, I mean the API change in the spec). > > Having the prefix in the actual QName class seems, IMO, to break the clean abstraction and introduce fuzzy dependencies on an ill-defined "context". A couple of choice quotes from the JavaDoc: > > "The prefix assigned to a QName may NOT be valid in a different context. For example, a QName may be assigned a prefix in the context of parsing a document but that prefix may be invalid in the context of a different document." > > "The prefix is NOT used to determine equality." > > "Note the prefix value is NOT returned as part of the String representation." > > "The prefix value CANNOT be represented in the String and will be set to """ > > Does this sound to anyone else like an implementation detail and not something that should be part of a core object like QName? It shoudn't have been shoehorned in there. > > Argh. > > > > --Glen > > > -----Original Message----- > > From: Davanum Srinivas [mailto:dims@yahoo.com] > > Sent: Saturday, September 13, 2003 9:47 AM > > To: axis-dev@ws.apache.org > > Subject: Re: [PATCH] javax.xml.namespace.QName version 1.1 > > > > > > Patched. Thanks Ias. > > > > -- dims > > > > --- Ias wrote: > > > The latest QName in Axis CVS Head is behind that of J2EE > > 1.4, JWSDP 1.2 and > > > J2ME Web Services. The major change is adding prefix field to its > > > constructor. In addition, handling null local part (and > > prefix) is slightly > > > modified to follow the new description from > > > > > http://java.sun.com/j2ee/1.4/docs/api/javax/xml/namespace/QNam > > e.html and > > > > > http://java.sun.com/webservices/docs/1.2/api/javax/xml/namespa > > ce/QName.html. > > > > > > Thanks, > > > > > > Ias > > > > > > ========================================================= > > > Lee, Changshin (Korean name) > > > Ias (International name) > > > Company Web Site: http://www.tmax.co.kr > > > Personal Web Site: http://www.iasandcb.pe.kr > > > --------------------------------------------------------- > > > Senior Researcher, Emerging Technology Evangelist > > > JCP member - http://jcp.org/en/participation/members/L > > > R&D Institute > > > Tmax Soft, Inc. > > > JCP member - http://jcp.org/en/participation/members/T > > > ========================================================= > > > > Index: QName.java > > > =================================================================== > > > RCS file: > > /home/cvspublic/xml-axis/java/src/javax/xml/namespace/QName.java,v > > > retrieving revision 1.8 > > > diff -u -r1.8 QName.java > > > --- QName.java 22 Apr 2003 19:33:47 -0000 1.8 > > > +++ QName.java 13 Sep 2003 02:29:48 -0000 > > > @@ -63,11 +63,11 @@ > > > * as specified in > href="http://www.w3.org/TR/xmlschema-2/#QName">XML > > > * Schema Part2: Datatypes specification. > > > *

> > > - * The value of a QName contains a namespaceURI and > > a localPart. > > > + * The value of a QName contains a namespaceURI, a > > localPart and a prefix. > > > * The localPart provides the local part of the qualified name. The > > > * namespaceURI is a URI reference identifying the namespace. > > > * > > > - * @version 1.0 > > > + * @version 1.1 > > > */ > > > public class QName implements Serializable { > > > > > > @@ -80,17 +80,16 @@ > > > /** Field localPart */ > > > private String localPart; > > > > > > + /** Field prefix */ > > > + private String prefix; > > > + > > > /** > > > * Constructor for the QName. > > > * > > > * @param localPart Local part of the QName > > > */ > > > public QName(String localPart) { > > > - > > > - this.namespaceURI = emptyString; > > > - this.localPart = (localPart == null) > > > - ? emptyString > > > - : localPart.intern(); > > > + this("", localPart, ""); > > > } > > > > > > /** > > > @@ -100,15 +99,33 @@ > > > * @param localPart Local part of the QName. > > > */ > > > public QName(String namespaceURI, String localPart) { > > > - > > > - this.namespaceURI = (namespaceURI == null) > > > - ? emptyString > > > - : namespaceURI.intern(); > > > - this.localPart = (localPart == null) > > > - ? emptyString > > > - : localPart.intern(); > > > + this(namespaceURI, localPart, ""); > > > } > > > > > > + /** > > > + * Constructor for the QName. > > > + * > > > + * @param namespaceURI Namespace URI for the QName > > > + * @param localPart Local part of the QName. > > > + * @param prefix Prefix of the QName. > > > + */ > > > + public QName(String namespaceURI, String localPart, > > String prefix) { > > > + this.namespaceURI = (namespaceURI == null) > > > + ? emptyString > > > + : > > namespaceURI.intern(); > > > + if (localPart == null) { > > > + throw new > > IllegalArgumentException("invalid QName local part"); > > > + } else { > > > + this.localPart = localPart; > > > + } > > > + > > > + if (prefix == null) { > > > + throw new > > IllegalArgumentException("invalid QName prefix"); > > > + } else { > > > + this.prefix = prefix; > > > + } > > > + } > > > + > > > /** > > > * Gets the Namespace URI for this QName > > > * > > > @@ -127,6 +144,15 @@ > > > return localPart; > > > } > > > > > > + /** > > > + * Gets the Prefix for this QName > > > + * > > > + * @return Prefix > > > + */ > > > + public String getPrefix() { > > > + return prefix; > > > + } > > > + > > > /** > > > * Returns a string representation of this QName > > > * > > > @@ -238,5 +264,6 @@ > > > > > > namespaceURI = namespaceURI.intern(); > > > localPart = localPart.intern(); > > > + prefix = prefix.intern(); > > > } > > > } > > > > > > > > > ===== > > Davanum Srinivas - http://webservices.apache.org/~dims/ > >