You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Jochen Wiedmann <jo...@ispsoft.de> on 2004/01/06 02:29:54 UTC

Suggested API for xs:anyAttribute

Hi,

I am about to implement wildcard attributes. Unlike most other things, these 
aren't supported by the JAXB RI. In other words, we are free to choose our 
own API. I propose the following:

- Internally the wildcard attributes are stored in a Map. The keys of the
   Map are instances of javax.xml.namespace.QName. The values are instances
   of String.

- To access the Map, the following methods would be available:

     /** <p>Sets the attribute named pName to the value pValue.</p>
      * @throws IllegalArgumentException The attributes namespace URI
      * is invalid. See the "namespace" attribute of the wildcard
      * declaration.
      * @throws NullPointerException Either of the arguments was null.
      */
     public void setAnyAttribute(QName pName, String pValue);

     /** <p>Returns the value of the attribute named pName or null,
      * if the attribute is not set.</p>
      * @throws IllegalArgumentException The attributes namespace URI
      * is invalid. See the "namespace" attribute of the wildcard
      * declaration.
      * @throws NullPointerException The argument was null.
      */
     public void getAnyAttribute(QName pName);

     /** <p>Removes the attribute named pName.</p>
      * @return true, if the attribute was set and removed, false otherwise
      */
     public boolean unsetAnyAttribute(QName pName);

     /** <p>Returns the attribute names.</p>
      */
     public void getAnyAttributeNames();


Jochen


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: Suggested API for xs:anyAttribute

Posted by Jochen Wiedmann <jo...@ispsoft.de>.
Jochen Wiedmann wrote:

>     public void getAnyAttribute(QName pName);


Of course this ought to be

	public String getAnyAttribute(QName pName);


Sorry,

Jochen


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org