Hi Richard, Kiran and Gareth, A few things:
1. I think Kiran's problem is very significant. If we're to expose an interface returning XMLCh *, then it should preserve XML tags, namespace decls etc.; I think this could be provided for relatively easily by using the DOMWriter. 2. The problem I have with only exposing DOM nodes is that it's very DOM-centric; any SAX-based application that needs access to annotation components gets left out in the cold. So my take is that we need both: a way of getting at DOM node representations to satisfy DOM-based apps, and a way of serializing those nodes to that their contents can be piped to a SAXParser and consumed by SAX-based applications. 3. I'm not sure the approach (or implementation) currently under discussion takes into account the fact that section 3.13.2 of the schema structures spec [1] wants annotation components to contain more than just appInfo or userData: it also wants non-schema attributes from the parent component to be included. To whit, among the properties of an annotation component is [[ {attributes} A sequence of attribute information items, namely those allowed by the attribute wildcard in the type definition for the <annotation> item itself or for the enclosing items which correspond to the component within which the annotation component is located. ]] So I think the problem at hand is a bit more complex than has so far appeared... Cheers, Neil [1]: http://www.w3.org/TR/xmlschema-1/#declare-annotation Neil Graham XML Parser Development IBM Toronto Lab Phone: 905-413-3519, T/L 969-3519 E-mail: [EMAIL PROTECTED] |---------+----------------------------> | | Sir Woody | | | Hackswell | | | <[EMAIL PROTECTED]| | | com> | | | | | | 04/02/2003 01:59 | | | PM | | | Please respond to| | | xerces-c-dev | | | | |---------+----------------------------> >---------------------------------------------------------------------------------------------------------------------------------------------| | | | To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> | | cc: | | Subject: RE: RFC: Schema annotation support | | | | | >---------------------------------------------------------------------------------------------------------------------------------------------| On Wed, 2 Apr 2003, Bagepalli, Kiran wrote: > A small glitch when I started using the code. > > If I have XML embedded in the documentation > for eg. > <annotation> > <documentation><store><ID>12</ID><NAME>S1</NAME></store></documentation> > </annotation> > > Ideally speaking if I get the documentation I would be expecting a text of > <store><ID>12</ID><NAME>S1</NAME></store>. > However the traverseSchema DOM eats away this as a Node and only return > 12S1. This forces me escape all this content by > > < which is very inconvenient. > > Kiran This is exactly the reason I made documentation and appinfo domnodes. ;) You don't lose anything. And I clone the nodes, so that when the domtree is killed, you still have something to traverse. But this was a quick and easy hack. I'm sure there's something better... or is there? -Richard Balint ----- Hark! I am yclept ps, son of Bourne Shell, daughter of Emacs, son of Dash-shell, great-great-grandson of the ancient and holy INIT! [EMAIL PROTECTED] http://sir.woody.hackswell.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]