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
-----Original Message-----
From: Gareth Reakes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 8:09 AM
To: [EMAIL PROTECTED]
Subject: Re: RFC: Schema annotation support
Sure, here it is:
class VALIDATORS_EXPORT SchemaAnnotation
{
public :
//
-----------------------------------------------------------------------
// Constructors and Destructors
//
-----------------------------------------------------------------------
SchemaAnnotation();
~SchemaAnnotation();
//
-----------------------------------------------------------------------
// Check methods
//
-----------------------------------------------------------------------
bool hasDocumentation() const;
bool hasAppInfo() const;
//
-----------------------------------------------------------------------
// Setter methods
//
-----------------------------------------------------------------------
void set( const SchemaAnnotation& );
//
-----------------------------------------------------------------------
// Getter methods
//
-----------------------------------------------------------------------
const XMLCh* getDocumentation() const;
const XMLCh* getAppInfo() const;
private :
friend class TraverseSchema;
//
-----------------------------------------------------------------------
// Setter methods
//
-----------------------------------------------------------------------
void addDocumentation( DOMElement* documentationNode );
void addAppInfo( DOMElement* appInfoNode );
void parseNode(DOMElement* from, XMLBuffer& buffer );
//
-----------------------------------------------------------------------
// Private instance variables
//
// fDocumentation
// The Documentation plain text;
//
// fAppInfo
// The AppInfo plain text;
//
-----------------------------------------------------------------------
XMLBuffer fDocumentation;
XMLBuffer fAppInfo;
};
Gareth
On Wed, 2 Apr 2003, Neil Graham wrote:
> Hi all,
>
> Just as another datapoint, there exists an (as yet unimplemented)
interface
> for accessing the contents of xs:annotations in Xerces-J. Go to
> http://xml.apache.org/xerces2-j/javadocs/xerces2/index.html and look at
the
> XSAnnotation class for details. Implementation would be tricky I'll
admit,
> but if we went in a direction like this then at least we'd be using
> standard interfaces.
>
> In general, I'm hoping to see us converge with Xerces-J as much as
possible
> in PSVI support. Obviously, some work has been done on the PSVI in
> Xerces-C already, and whatever's yet to do will need to be consistent with
> that; but it would surely benefit everybody if all the Xercen looked
> externally as similar as possible. I'm hoping to spend a fair bit of
> quality time enhancing our PSVI/schema component support in a couple of
> months, for folks information.
>
> BTW, it would be great Gareth if you could share the interfaces you're
> sending to Richard with the list; that way we can all hopefully provide
> constructive suggestions.
>
> Cheers!
> Neil
> Neil Graham
> XML Parser Development
> IBM Toronto Lab
> Phone: 905-413-3519, T/L 969-3519
> E-mail: [EMAIL PROTECTED]
>
>
>
>
> |---------+---------------------------->
> | | Gareth Reakes |
> | | <[EMAIL PROTECTED]|
> | | oft.com> |
> | | |
> | | 04/02/2003 10:11 |
> | | AM |
> | | Please respond to|
> | | xerces-c-dev |
> | | |
> |---------+---------------------------->
>
>---------------------------------------------------------------------------
------------------------------------------------------------------|
> |
|
> | To: [EMAIL PROTECTED]
|
> | cc:
|
> | Subject: Re: RFC: Schema annotation support
|
> |
|
> |
|
>
>---------------------------------------------------------------------------
------------------------------------------------------------------|
>
>
>
>
>
> > 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).
> > 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.
>
> Took the words right out of my pine window :) Richard, I will mail you
> what I have from the last implementation (I believe from Peter) that I
> think Khaled will be more happy with.
>
> Regarding the tests, take a look in the tests directory off of
> XERCESCROOT. I don't immediately see a directory in there that would be
> suitable, but you will see there are many different ways we tests
> depending on the situation.
>
>
> Gareth
>
>
> --
> Gareth Reakes, Head of Product Development +44-1865-203192
> DecisionSoft Limited http://www.decisionsoft.com
> XML Development and Services
>
>
>
>
> ---------------------------------------------------------------------
> 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]
>
>
--
Gareth Reakes, Head of Product Development +44-1865-203192
DecisionSoft Limited http://www.decisionsoft.com
XML Development and Services
---------------------------------------------------------------------
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]