On Wed, 2 Apr 2003, Khaled Noaman wrote:

> There has been a demand for annotation support which is ignored
> after validation. I have few comments regarding your proposed
> solution. You are storing references to the appinfo/documentation
> dom nodes. First, this means that you are keeping around the whole
> dom tree in memory. Second, once the schema is processed, it's
> dom tree representation is no longer available in memory (it's deleted).

No. I was passing back deep-cloned DOMNodes for the AppInfo and 
Documentation Nodes.  When the tree is deleted, these nodes will still be 
around. They belong to SchemaAnnotation and are freed when the 
SchemaAnnotation is freed.  

Now, should the getDocumentation and getAppInfo methods return references to 
the internal DOMNode in SchemaAnnotation, or deep-clone yet again? (I'm 
thinking the latter)

> I think the solution would be to follow the same mechanism as the
> SchemaElementDecl class. Create a SchemaAnnotation,
> SchemaAppinfo and SchemaDocumentation classes that would be
> created and filled by TraverseSchema as it's processing the
> corresponding dom nodes.

Why do we need SchemaAppInfo and SchemaDocumentation sub-classes?  Should it 
be up to the library to store information that is of type "any"?  I say we 
pass back the DOM subtrees.  What the user really wants from annotation is 
the XML data inside the AppInfo and Documentation.  There is absolutely no 
format for the data inside an appInfo or Documentation.  It can be more than 
just a text node. It can contain its own XML tree inside of it.  It is 
completely generic.  Just like a DOM subtree is.  There is no 
schema-specific information in it.

By writing the AppInfo and Documentation sub-classes, we would in effect 
rewriting DOMNode, no?

The current method of passing back only XMLCh* has been pointed out that it 
will not pass back the XML... it assumes we just have text data, which is 
not necesarily the case.


-Richard
 
-----
Convert your soul into hex and quadword
Plus five volts... Minus two-point-nine core
Encode it and decrypt it... Until it is yours to control...

[EMAIL PROTECTED]       http://sir.woody.hackswell.com


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

Reply via email to