07-24-2023, 09:34 AM
We are using a third party XML schema, used to encode a GUI layout in terms of forms and tabs on those forms. This is read in by a third party application over which we have very little control (aka no control). We also get a limited MS JScript interface to handle keypress events, so it would be a fair guess the third party app is also some sort of JScript engine.
We are modifying the GUI layout to add a set of tabs to some forms. The modified xml looks like:
<forms>
<form name="form1">
<tab name="3rd party tab A">
...
</tab>
<tab name="Our standard tab">
...
</tab>
</form>
<form name="form2">
<tab name="3rd party tab B">
...
</tab>
<tab name="Our standard tab">
...
</tab>
</form>
</forms>
Is there any way of referencing the repeated "Our standard tab" to keep it DRY? Something along the lines of the following would be ideal:
<forms>
<form name="form1">
<tab name="3rd party tab A">
...
</tab>
<tab name="Our standard tab">
...
</tab>
</form>
<form name="form2">
<tab name="3rd party tab B">
...
</tab>
<?!@reference="/forms/form[@name='form1']/tab[@name='Our standard tab']">
</form>
</forms>
Nb We have no control of the reading application, i.e. the solution must leverage standard or Microsoft JScript DOM XML notation as opposed to a different schema.
We are modifying the GUI layout to add a set of tabs to some forms. The modified xml looks like:
<forms>
<form name="form1">
<tab name="3rd party tab A">
...
</tab>
<tab name="Our standard tab">
...
</tab>
</form>
<form name="form2">
<tab name="3rd party tab B">
...
</tab>
<tab name="Our standard tab">
...
</tab>
</form>
</forms>
Is there any way of referencing the repeated "Our standard tab" to keep it DRY? Something along the lines of the following would be ideal:
<forms>
<form name="form1">
<tab name="3rd party tab A">
...
</tab>
<tab name="Our standard tab">
...
</tab>
</form>
<form name="form2">
<tab name="3rd party tab B">
...
</tab>
<?!@reference="/forms/form[@name='form1']/tab[@name='Our standard tab']">
</form>
</forms>
Nb We have no control of the reading application, i.e. the solution must leverage standard or Microsoft JScript DOM XML notation as opposed to a different schema.