Comments syntax for Idoc Script

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.

Comments:

Thanks guys finally some idoc colour coding :) Does the jdev sitestudio addon provide any colour coding for idoc?

Posted by John Sim on April 14, 2010 at 02:22 AM CDT #

Hey John, No, not that I know of. But that would be handy. I'll check to see if it's in the works. Thanks!

Posted by kyle.hatlestad on April 14, 2010 at 02:45 AM CDT #

Hi! Thanks for that great download for notepad++. I noticed a little bug though. In the XML-File for syntax hilighting (userDefineLang.xml) the command rsAppendRowvalues should be changed to rsAppendRowValues (capital V). Thanks again for this great blog! Greetings, Bernd

Posted by Bernd on April 15, 2010 at 01:25 AM CDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Kyle Hatlestad is a Solution Architect in the WebCenter Architecture group (A-Team) who works with WebCenter Content and other products in the WebCenter & Fusion Middleware portfolios. The WebCenter A-Team blog can be found at: https://blogs.oracle.com/ ateam_webcenter/

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today