Page 1 of 1

tooltip in text editor

Posted: Sat Mar 04, 2017 3:19 am
by avanlooveren
I put annotations in my schema on simple type definitions AND on the elements declared in complex types. Is it possible to have both "levels" of annotation show in the tooltip of an instance (XML) document?

For instance, let's say that I have a simple type restriction of xsd:string, characters 0-9 (allows for "007", for instance). Then, I have an "agentId" element of this type annotated as well. I would like the tooltip to read something like "identifier for secret agent, any number of characters 0-9" as a combination (ancestral aggregation?) of annotations: "agentid" element then string-subtype. Even in the case of a long ancestry, a complex-type type that composites elements of other complex types and so on, I would probably want the annotation aggregation to stop at 2 levels. That is, element annotation, type annotation, stop.

I think my purpose could be served best by allowing for cross-referencing inside the annotations, allowing for more custom tooltip behavior. For instance, a complex type annotation might call out to child elements' types and provide links to navigate to the annotations for those types without losing the current tooltip focus or jumping to the schema source.

Any guidance on this is appreciated.

Re: tooltip in text editor

Posted: Fri Mar 10, 2017 7:08 pm
by adrian
Hi,

Only the annotation that you placed on the element or attribute (in the schema) will show in the instance (XML) document on the element or attribute tooltip.

I don't have a solution for the complex behavior that you are describing.

Regards,
Adrian