You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Kai BrĂ¼ning <ka...@RagTime.de> on 2003/03/03 13:15:34 UTC

Extracting custom attributes and annotations from schema in Xerces

Hi Peter,

I have found your letter below in the Xerces-C mail list.

I plan to annotate schemas with both namespaced attributes and annotations and use this information in my application.

As far as I can see from the Xerxes source code (2.2.0), neither custom attributes nor annotations are preserved during schema scanning. So probably your response below is still valid and I would be very interested to receive your modifications.

Concerning annotations, the simplest way to handle them would seem to keep the DOM subtree around for later inspection by the application. Is this feasable? Or is the whole DOM released after schema parsing?

Thanks a lot for any insight you can provide.

Kai BrĂ¼ning

PS: In case anybody is interested, what we try to do is to replace traditional application resources (dialogs, strings, you name it) with xml data thus avoiding the platform dependency of both the Mac OS and Windows resource formats and gaining a substantial amount of other advantages.

I want to use custom attributes and annotations in schemas to transport type information beyond that provided by XML schema (like a fixed 16.16 numeric format etc.) and use this to preprocess the data generically.


At 13:16 Uhr +0300 11.9.2002, Peter A. Volchek wrote:
> > I could like to extract the annotation information stored in the schema. I
> > believe there was a question posted a while ago. Is there any way I could
> > obtain this information rather than manually parsing it.
> > Thanks
>> Kiran
>>
>
>If you really need it, you should do the following:
>- Create a SchemaAnnotation class that fits your needs
>- Modify the corresponding classes that may hold the annotation, to keep the
>instance of SchemaAnnotation class.
>  (DatatypeValidator, ComplexTypeInfo, SchemaAttDef, SchemaElementDecl,
>SchemaGrammar)
>- Modify TraverseSchema.cpp to fill the annotation
>
>- When Xerces team implements his own annotation support, remove your code.
>
>Regards
>Peter A. Volchek
>
>P.S.
>I have sent you the modified sources so that may use them as an example.
>Unfortunately I was not able to post them to forum because of the message
>size limit
>(ezmlm-reject: fatal: Sorry, I don't accept messages larger than 100000
>bytes (#5.2.3) )
>
>If anyone else requires them as an example, let me know and I will send them
>asap.

-- 

RagTime GmbH                          Tel: [49] (2103) 9657-0
Itterpark 5                           Fax: [49] (2103) 9657-96
D-40724 Hilden                        mailto:kai@RagTime.de
Deutschland                           http://www.RagTime.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org