Having worked for years in VBA the lack of indentation in XML seems odd to me.
Is there any reason not to write things like this?
- It is currently Sun Nov 10, 2024 3:23 pm • All times are UTC - 5 hours [ DST ]
Attention:
Welcome to the old forum. While it is no longer updated, there is a wealth of information here that you may search and learn from.
To partake in the current forum discussion, please visit https://forums.presonus.com
Indentation
5 posts
• Page 1 of 1
Indentation
- Attachments
-
- Ind.jpg (49.17 KiB) Viewed 7428 times
Bill Reed
Notion 4, Sibelius 7.5, Finale 2011/14, Overture 4, Cubase 7.5
Win8 x64, 32GB RAM
M-Audio ProFire 2626
Kontakt, VSL VI Pro, VE Pro, EWQL Orch, Choirs and Pianos
Notion 4, Sibelius 7.5, Finale 2011/14, Overture 4, Cubase 7.5
Win8 x64, 32GB RAM
M-Audio ProFire 2626
Kontakt, VSL VI Pro, VE Pro, EWQL Orch, Choirs and Pianos
-
wcreed51 - Posts: 754
- Joined: Wed Oct 07, 2009 10:50 am
- Location: Berkshires, MA USA
Re: Indentation
As far as I can tell, you can use as many levels of indentation as you like, it doesn't affect anything. I use it in my rules, and as far as I can tell, so do most of Notion's own plugin rules.
I know different text readers will display indentation differently, though. With Notepad++ it works very well, but Notepad makes a mess of it.
I know different text readers will display indentation differently, though. With Notepad++ it works very well, but Notepad makes a mess of it.
- dcd111
- Posts: 73
- Joined: Wed Jun 06, 2012 6:07 pm
Re: Indentation
OK. I'm using Notepad2, but maybe I should try something different.
Bill Reed
Notion 4, Sibelius 7.5, Finale 2011/14, Overture 4, Cubase 7.5
Win8 x64, 32GB RAM
M-Audio ProFire 2626
Kontakt, VSL VI Pro, VE Pro, EWQL Orch, Choirs and Pianos
Notion 4, Sibelius 7.5, Finale 2011/14, Overture 4, Cubase 7.5
Win8 x64, 32GB RAM
M-Audio ProFire 2626
Kontakt, VSL VI Pro, VE Pro, EWQL Orch, Choirs and Pianos
-
wcreed51 - Posts: 754
- Joined: Wed Oct 07, 2009 10:50 am
- Location: Berkshires, MA USA
Re: Indentation
I don't use indentation as much simply because there aren't else or else-if statements within the rules. Each rule is usually one if statement after another (as is your example), so it becomes a little redundant to indent IMHO, but I know this isn't really the norm.
Also, +1 to Notepad++
Also, +1 to Notepad++
- pcartwright
- Posts: 796
- Joined: Sat Dec 05, 2009 2:47 pm
Re: Indentation
So far, I've found the best system for me is to indent <rule> and </rule> to the same level, then the <if /> statements to the next level, and then the modification statements to a third level, like this:
- Code: Select all
<rule name="implement straight mute, velo key">
<if flag="stra" />
<if not-flag="vfad" />
<if not-flag="afad" />
<channel-change channel="6" />
<cc controller="21" value="6" type="note-on-prefix" />
</rule>
- dcd111
- Posts: 73
- Joined: Wed Jun 06, 2012 6:07 pm
5 posts
• Page 1 of 1
Return to Custom Rules Discussion
Who is online
Users browsing this forum: No registered users and 1 guest