Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using tagupdate file
21-01-2022, 11:13
Post: #1
Using tagupdate file
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
Find all posts by this user
Quote this message in a reply
21-01-2022, 12:18 (This post was last modified: 22-01-2022 21:57 by simoncn.)
Post: #2
RE: Using tagupdate file
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.
Find all posts by this user
Quote this message in a reply
21-01-2022, 14:51 (This post was last modified: 21-01-2022 14:52 by stefano_mbp.)
Post: #3
RE: Using tagupdate file
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?
Find all posts by this user
Quote this message in a reply
21-01-2022, 20:47
Post: #4
RE: Using tagupdate file
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.
Find all posts by this user
Quote this message in a reply
21-01-2022, 21:18
Post: #5
RE: Using tagupdate file
I noted your suggestion and thanks for confirming my assumption
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)