IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

XMLSPY moves comments :-( Options · View
mm@muellermario.de
Posted: Wednesday, February 28, 2018 6:51:40 AM
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




vlad
Posted: Wednesday, February 28, 2018 9:43:53 AM
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.
mm@muellermario.de
Posted: Friday, March 2, 2018 12:31:31 PM
Rank: Newbie

Joined: 1/31/2018
Posts: 4
Hi vlad,

thanks a lot.

Regards
Mario
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.