jEdit Community - Resources for users of the jEdit Text Editor
XInsert:Respecting CDATA in CDATA and more global references
Submitted by mabra on Wednesday, 5 July, 2006 - 14:35
Hi All, I am new to JEdit and after discovering XInsert, it becomes my most importent module!!!

With other libraries, I was not that successful [like "Clipper" and "Templates"]. Although, IMO, some enhancements would be very welcome.

First, I try to manage my VBScript library with it, but my most scripts are based on the xml-format [usual extension is ".wsf"]. Inside this scripts/snippets, I have always to include CDATA sections to surround the code-blocks, but this is not possible in XInsert using "xinsert_script" item-types:

<item name="Feature.Request" type="xinsert_script"><![CDATA[ ?XML version="1.0"?> <package> <job> <![CDATA[ -- This is the "inner" CDATA section required for VBScript 'My script body here Option Explicit Dim someObject ]]> -- end "inner" CDATA </job> </package> ]]> !!!!!!!!!!!!!!!!!!!!!! The whole library is no longer usable after this, not only the current file! All libraries below the current module are no longer displayed. I am not sure, if this is a bug, I'll just request for respecting CDATA in CDATA sections, which works well in my other xml's.

My workaround was to use "CDATA.BEGIN" and "CDATA.END" inside my snippets and replace them by macros. Even this is not easy:

String search = "CDATA.BEGIN";
String repl = "<![CDATA["; The last line is not possible at all and I have to recode it like:
cdataBeginReplace.append((char) 0x3C).append("!").append("[").append("CDATA").append("]");
..... Sad

It might be, this is simply JEdit's xml interpretion itself?

Additionally, a "global reference" to the current XInsert file would be very useful;All my modules contain currently a "Edit this lib" entry-macro, which has to be hardcoded.

Further, another tag like "macro" would be a good idea, just to put library common code into the module. Currently, I put all this things in my startup as global code.

This should not be considered as a complaint Eye-wink , just a wish for some useful enhancements!

Thanks a lot!
Manfred

Note:This was not easy to write!!! Luckily, I discovered, that one may use the "xmp" tag inside the post [just to help others with this note]
User login
Browse archives
« March 2024  
MoTuWeThFrSaSu
 
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
31
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   82339
Context Free Art (*.cfdg)   0.31   46046
JBuilder scheme   .001   18487
BBEdit scheme   1.0   18108
ColdFusion scheme   1.0   18016
R Edit Mode - extensive version   0.1   17465
Advanced HTML edit mode   1.0   16198
Matlab Edit Mode   1.0   16060
jEdit XP icons   1.0   15221
XP icons for jEdit   1.1   14285