Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hello,
I was wondering if anyone here can shed some light on why the default behaviour of AE appears a little strange when creating new XML instances using an schema with fixed/required attributes.
<xs:attribute name="tipo" type="tf:tipoAttribsNotes" fixed="Fred" use="required" />
Problems being:
Maybe i'm missing something, but any experiences and resolutions are most appreciated.
Regards
Chris
Hi,
In Editor, if a default value is specified by the DTD or schema, we don't automatically set it. This helps to keep the document smaller and it's actually how customers have asked us to implement this. The instance is still valid (and any errors would still be found by the Completeness checker). We added the preference you mentioned, for those customers who've needed the attribtues written in for other downstream applications.
Is your desire for a setting to always write the default value or fixed value into the instance? If so, can you (and anyone else reading this and who desires this feature) please open an enhancement request via www.ptc.com with your suggestion and use case. It will help me to understand and keep track for future relases of Editor.
Thanks,
Pushpinder Toor
Hi Pushpinder,
Thanks for responding here.
The default/fixed value behaviour with 'implied' attributes makes sense and thats no problem thanks.
My issue is when the attribute is 'required' in the schema, (i.e. invalid without it), it is also not being inserted automaticaly AND not being picked up by the Completeness checker.
A case is now open with support also so i'll hope to follow this up later.
Regards
Chris
FYI: 1 part of this issue is now in motion with SPR 2061084