CVS Update: xmlpull-api-v1/src/java/api/org/xmlpull/v1

Aleksander Andrzej Slominski <[email protected]>
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <[email protected]>
aslom       02/07/15 13:00:50

  Modified:    src/java/api/org/xmlpull/v1 XmlSerializer.java
  Log:
  better description of get/setPrefix
  
  Revision  Changes    Path
  1.2       +15 -5     xmlpull-api-v1/src/java/api/org/xmlpull/v1/XmlSerializer.java
  
  Index: XmlSerializer.java
  ===================================================================
  RCS file: /l/extreme/cvspub/xmlpull-api-v1/src/java/api/org/xmlpull/v1/XmlSerializer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -t -w -r1.1 -r1.2
  --- XmlSerializer.java	2002/07/08 17:31:09	1.1
  +++ XmlSerializer.java	2002/07/15 18:00:50	1.2
  @@ -89,18 +89,28 @@
   
       /**
        * Binds the given prefix to the given namespace.
  -     * valid for the next element including child elements.
  +     * This call is valid for the next element including child elements.
  +     * The prefix and namespace MUST be always declared even if prefix
  +     * is not used in element (startTag() or attribute()) - for XML 1.0 infoset
  +     * it must result in declaring <code>xmlns:prefix='namespace'</code>
  +     * (or <code>xmlns:prefix="namespace"</code> depending what character is used
  +     * to quote attribute value).
        *
  -     * <p><b>NOTE:</b> this method MUST be called direclty before startTag()
  -     *   and if aything but startTag() or setPrefix() is called next there will be exception.
  +     * <p><b>NOTE:</b> this method MUST be called directly before startTag()
  +     *   and if anything but startTag() or setPrefix() is called next there will be exception.
        * <p><b>NOTE:</b> prefixes "xml" and "xmlns" are already bound
  +     *   and can not be redefined see:
  +     * <a href="http://www.w3.org/XML/xml-names-19990114-errata#NE05">Namespaces in XML Errata</a>.
        */
       public void setPrefix (String prefix, String namespace) throws IOException;
   
       /**
        * Return namespace that corresponds to given prefix
        * If there is no prefix bound to this namespace return null if
  -     * generatePrefix is false otherwise return null.
  +     * generatePrefix is false otherwise return generated prefix.
  +     * <p><b>NOTE:</b> prefixes "xml" and "xmlns" are already bound
  +     *   will have values as defined
  +     * <a href="http://www.w3.org/TR/REC-xml-names/">Namespaces in XML specification</a>
        */
       public String getPrefix (String namespace, boolean generatePrefix);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.