In the documentation for XSComplexType, several method descriptions confusingly refer to an element, even though no element is involved:

* getComplexContentType's description says (emphasis added):

    If the _element_ hasn't simple content: Returns the _element_ contents
    type.

  Since getComplexContentType is a method is on XSComplexType, which
  represents a complex type and not an element, shouldn't that documentation
  really say something like the following?:

    If the _type_ doesn't have simple content:  Returns the _type's_
    content type.

There are a number of similar errors:


* isEmpty:

    If the _element_ hasn't simple content: Returns whether the _elements_
    content is empty. ...

    Throws:
        java.lang.IllegalStateException - The _element_ does not have
        complex content

* isMixed:

    If the _element_ hasn't simple content: Returns whether the _elements_
    content is mixed. ...

    Throws:
        java.lang.IllegalStateException - The _element_ does not have
        complex content


* getParticle:

    If the _element_ hasn't simple content: Returns the complex _elements_
    particle.

    Throws:
        java.lang.IllegalStateException - The _element_ has simple content


* isExtension:

    Returns whether the _element_ is a extension of another _element_.


* getExtendedType:

    If the _element_ is an extension: Returns the extended type.

    Throws:
        java.lang.IllegalStateException - The _element_ is no extension.

  (Also, "... is no extension" would be clearer as "... is not an extension"
  (or "... is not an extended type").)


* isRestriction:

    Returns whether the _element_ is a restriction of another _element_.


* getRestrictedType:

    If the _element_ is an restriction: Returns the restricted type.

    Throws:
        java.lang.IllegalStateException - The _element_ is no restriction.

  (And "is no restriction" would be clearer as "is not a restriction"
  (or is not a restricted type).)


Additionally, the lack of needed punctuation makes the documentation hard to read. Possessive forms of words almost always need an apostrophe ("'"). "Elements content" should be "element's content" (when the meaning is "the content of the element").

Note that where the above documentation says "contents type" (which
should be written "content's type"), it should probably say "content
type" (or "complex type's content type"), since that is the term
used in the XML Schema specification.




Daniel --



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to