Hi,
we saw it :) We were just waiting for the most appropriate person
to answer. I guess that has come down to me. There was some code written a
while ago that did this. I did not make it into the last version. There is
some demand for it and I would be happy to review/ commit the code if you
are happy to put some work in writing some tests for the stuff. Does this
sound OK to you?
Gareth
On Wed, 2 Apr 2003, Sir Woody Hackswell wrote:
> Did this message get eaten somewhere? Nobody responded to me. =snif= I may
> not be the best of programmers, but I'd still like to help. :)
>
> Should this be an issue for the list? Post to bugzilla? Just send the
> patch? (I'd like to clean it up first, though... after some good
> suggestions)
>
> -Richard Balint
>
> ---------- Forwarded message ----------
> Date: Thu, 27 Mar 2003 09:45:46 -0500 (EST)
> From: Sir Woody Hackswell <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: RFC: Schema annotation support
>
> Hello, all!
>
> I have a project in which I need to be able to use the <xsd:annotation>
> from a schema. After hours of studying undocumented code in the validators/
> directory (hint hint... why are there no docs on the validators?) I came to
> the conclusion that annotations seem to be completely ignored after
> validation. A user has no way of getting that information back!
> So... I hacked the code. I'll submit for review my basic (and I mean
> BASIC!) API here. I'll take suggestions on what is really needed... not
> just what I need. I hope that this will make it into Xerces-C++ some day.
> :)
>
>
> -Richard Balint
> Ball Aerospace & Technology Corp.
>
>
>
>
> New Class: SchemaAnnot class
> ----------------------------
>
> VALIDATORS_EXPORT SchemaAnnot
> { public :
> //-----------------------------------------
> // Constructors and Destructors
> //-----------------------------------------
> SchemaAnnot();
> SchemaAnnot
> (
> const DOMNode* appinfo
> , const DOMNode* documentation
> );
> virtual ~SchemaAnnot();
>
> // Reset SchemaAnnot.appinfo and SchemaAnnot.documentation to null
> void clear();
>
> void setAppInfo( const DOMNode* appinfo );
> void setDocumentation( const DOMNode* documentation );
>
> const DOMNode* getAppInfoNode();
> const DOMNode* getDocumentationNode();
> bool hasAnnotation();
>
> private :
> bool fHasAnnotation;
> DOMNode* fDocumentation;
> DOMNode* fAppInfo; };
> }
>
> This class is insanely simple. I just wanted to get appinfo and
> documentation out of the schema. ;) This method returns cloned DOMNodes,
> and their children (the data).
>
>
>
> Additions to SchemaElementDecl API:
> -----------------------------------
> virtual bool hasAnnotation() const;
> SchemaAnnot* getAnnotation() const;
>
> void setAnnotation(const DOMNode* appinfo, const DOMNode* documentation);
> void setAnnotation(const SchemaAnnot* annotation);
>
> additional private member: SchemaAnnot* fAnnotation;
>
>
> Additions to TraverseSchema:
> ----------------------------
> *Additional code to pull out the annotations and attach it to the
> SchemaElementDecl's.
> *additional private member: SchemaAnnot* fCurrentAnnotation;
>
>
>
>
> ---------------------------------------------------------------------
> 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]