cancel
Showing results for 
Search instead for 
Did you mean: 

Attributes iteration of a value node bound to a structure invalid?

Former Member
0 Kudos

A context value node bound to a structure always delivers all attributes of the structure bound instead of the attributes, which were selected from the available structure attributes.

For example, if structure S has the attributes A, B and C and the value node V is bound to S, but "inherits" attribute A only, the code

wdContext.nodeV().getNodeInfo().iterateAttributes()

delivers an iterator which loops 3 times and returns A, B and C as attribute infos.

Is this a wanted behaviour? I would expect that only the attributes, which are bound to the corresponding structure attributes (A in the sample) are returned.

Regards

Stefan

Just to be a little bit more accurate: the term "structure" means a complex type defined unter "Structures" in the "Local Dictionary" for example. Attributes and nodes are Value Attributes/Nodes.

Message was edited by: Stefan Klensch

Accepted Solutions (1)

Accepted Solutions (1)

uwe_reeder
Explorer
0 Kudos

Yes, it is the intended behaviour. These <i>are</i> the attributes at run time. And I don't see why the additional structure attributes should be hidden from the application (besides the fact that iterateAttributes() is used internally, too).

If you are interested whether an attribute was originally declared or was automatically added due to the structure binding, look at IWDAttributeInfo.isDeclared().

Former Member
0 Kudos

Thanks Uwe. In the API documentation of isDeclared() the automatic adding is described already, i haven't seen this so far...

iterateAttributes() is part of the IWDNodeInfo API, so if it's for internal use only, it should not exist there.

Answers (0)