Comments syntax for Idoc Script

Posted by kyle.hatlestad on Oracle Blogs See other posts from Oracle Blogs or by kyle.hatlestad
Published on Wed, 14 Apr 2010 07:35:29 -0600 Indexed on 2010/04/14 14:54 UTC
Read the original article Hit count: 1499

Maybe this is widely known and I'm late to the party, but I just ran across the syntax for making comments in Idoc Script. It's been something I've been hoping to see for a long time. And it looks like it quietly snuck into the 10gR3 release.

So for comments in Idoc Script, you simply [[% surround your comments in these symbols. %]] They can be on the same line or span multiple lines.

If you look in the documentation, it still mentions making comments using the <$c="my comment"$> syntax. Well, that's certainly not an ideal approach. You're stuffing your comment into an actual variable, it's taking up memory, and you have to watch double-quotes in your comment. A perhaps better way in the old method is to start with <$if c$> my comments <$endif$>. Still not great, but now you're not assigning something to a variable and worrying about quotes.

Unfortunately, this syntax only works in places that use the <$...$> Idoc format. It can't be used in Idoc files that get indexed (.hcsp & .hcsf) and use the <!--$...--> format. For those, you'll need to continue using the older methods.

While on the topic, I thought I would highlight a great plug-in to Notepad++ that Arnoud Koot here at Oracle wrote for Idoc Script. It does script highlighting as well as type-ahead/auto-completion for common variables, functions, and services. For some reason, I can never seem to remember if it's DOC_INFO_LATESTRELEASE or DOC_INFO_LATEST_RELEASE, so this certainly comes in handy. I've updated his plug-in to use this new comments syntax.

notepad_idoc_min.jpg

You can download a copy of the plug-in here which includes installation instructions.

© Oracle Blogs or respective owner

Related posts about configuration

Related posts about Customizations