MinimServer Forum
Using tagupdate file - Printable Version

+- MinimServer Forum (https://forum.minimserver.com)
+-- Forum: MinimServer (/forumdisplay.php?fid=1)
+--- Forum: Support (/forumdisplay.php?fid=4)
+--- Thread: Using tagupdate file (/showthread.php?tid=6504)



Using tagupdate file - stefano_mbp - 21-01-2022 11:13

Hi Simon
I would like to define in tagupdate file a condition to change the content of a tag.
The rule should be
@STYLE=Concerto
&ORCHESTRA=
=STYLE=Concerto - Chamber Music

where the content of Orchestra is blank (empty)

but it doesn’t seem possible as the rule is ignored even trying to set
ORCHESTRA=‘ ‘

Is there something that can be done or is it just impossible?
Thanks


RE: Using tagupdate file - simoncn - 21-01-2022 12:18

The main issue with supporting this is that it would create an undesirable inconsistency between @ and & (it is not possible to support this for @). Also, supporting this for & would prequire special parsing and handling of every & line for every file with an @ match, which would slow down scanning.

A simple solution is to use the tagValue 'default' option to add a default literal value and use this default value in the & line (or in @ if desired).

Edit: The above suggestion doesn't work. See the following dscussion.


RE: Using tagupdate file - stefano_mbp - 21-01-2022 14:51

Following your suggestion I could assign a default value to Orchestra (x) defining in tagValue property

Orchestra.default={Orchestra, ‘x’}

but the rule

@STYLE=Concerto
&ORCHESTRA=x
=STYLE=Concerto - Chamber Music

doesn’t still work.
Could it be that the tagupdate file is processed before the tagupdate property?


RE: Using tagupdate file - simoncn - 21-01-2022 20:47

You are correct that tagUpdate processing happens before tagValue processing, so my suggestion doesn't work.

FYI, there is no need for the second Orchestra in

Orchestra.default={Orchestra, ‘x’}

This can be written more simply as

Orchestra.default={‘x’}

because the 'default' option is processed only when the Orchestra tag is omitted.


RE: Using tagupdate file - stefano_mbp - 21-01-2022 21:18

I noted your suggestion and thanks for confirming my assumption