Rank: Newbie
Joined: 1/31/2018 Posts: 4
|
Hi all,
I have to write tons of assert-statements. For my organisation I put a comment bevor every assert statement:
This is bevor saving ths XSD:
Quote:<!--This is a example comment--> <xsd:assert test="if (S_DTM_Z01/C_C507/D_2380/(substring(text(),4,1) = (' <xsd:assert test="if (not(S_DTM_93/C_C507/D_2005/text()=('93'))) then ((S <xsd:assert test="if (S_STS_7[C_C601/D_9015/text()=('E01')]/C_C556/D_9013 <xsd:assert test="if (S_STS_7[C_C601/D_9015/text()=('E01')]/C_C556/D_9013 <xsd:assert test="if (S_STS_7[C_C601/D_9015/text()=('E01')]/C_C556/D_9013
This is after reopening:
Quote:<xsd:assert test="if (S_DTM_Z01/C_C507/D_2380/(substring(text(),4,1) = (' <xsd:assert test="if (not(S_DTM_93/C_C507/D_2005/text()=('93'))) then ((S <xsd:assert test="if (S_STS_7[C_C601/D_9015/text()=('E01')]/C_C556/D_9013 <xsd:assert test="if (S_STS_7[C_C601/D_9015/text()=('E01')]/C_C556/D_9013 <xsd:assert test="if (S_STS_7[C_C601/D_9015/text()=('E01')]/C_C556/D_9013 <!--This is a example comment-->
As you can see, the comment moved and the logical connections between comment and assert gets lost. Is therer a way to prevent this bad behaviour? Thanks Regards Mario
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 2,856 Location: Mauritius
|
Comments have no predefined placement in XML Schema. To avoid such issues as a part of the standard XML Schema defines annotations. XSD annotations are bound to their elements and won't be moved.
|
Rank: Newbie
Joined: 1/31/2018 Posts: 4
|
Hi vlad,
thanks a lot.
Regards Mario
|