As per bug http://issues.apache.org/jira/browse/AXIS2-243, I'm attempting to resolve Javadoc issues, in part so that I can understand how Axis works, and I started with OM.

I find myself wondering about a general point of design as I'm proceeding. Is OM meant to do "fail-fast" validation? Some of the examples I can think of, where enforcement might matter:

   * Are namespace name parameters valid URIs?
   * Are local element names valid NCNames?
   * Can the contents of a text element be serialized (character
     &#0x1;, for example, is not allowed in XML 1.0)?
   * Can the contents of an attribute be serialized?
   * Can the namespaces associated with the prefix "xml" and "xmlns" be
     associated with other prefixes?
   * Can the prefixes "xml" and "xmlns" be reassigned to different
     namespaces?
   * Do you want to log a warning when redeclaring a namespace that is
     already in scope (performance issue)?

Should these be enforced? If so, is enforcement conditional? Or is it determined by code-path, namely factory creation done by the parsers assumes validity (because it is starting from a valid state), whereas direct manipulation of OM objects implies validation?

I have not been able figure out the intended design by looking at the code, so I thought I'd ask.

-Eric.

Reply via email to