|
From: Andrew S. H. <ste...@ha...> - 2001-04-18 12:50:33
|
Two problems. First, with my email, just adding those lines to the XML
or XSL mode doesn't work. The problem comes because XML markup is
allowed inside the Java code. For example:
<xsp:logic>
for(int i = 0; i < 10; i++) {
<sometag>
<xsp:content>This is tag number </xsp:content><xsp:expr>i</xsp:expr>
</sometag>
}
</xsp:logic>
And to further complicate things, <xsp:content> is used inside an
<xsp:logic> or <xsp:expr> tag to return to "normal" non-Java text. So,
just adding those edit modes might help a bit in making the Java more
readable, but you end up with the tags being undecorated. It is also
necessary to make sure that > and < and & and <![CDATA[ ]]>
all get highlighted correctly since these are also important withing XSP
code sections.
Second, having it's own mode is necessary, but XSP files are usually
used with the suffix .xml (content) or .xsl (logicsheets). So,
modifications to the xml.xml and xsl.xml file were necessary.
I put together a mode that works better, but doesn't yet highlight Java
code within the <![CDATA[ ]]> sections as it should. I modified xml.xml
and xsl.xml to put the editor into XSPJAVA mode from the xsp.xml file I
created by doing some interesting combinations of java.xml and xsl.xml.
I have them available for download at:
http://andrew.sterling.hanenkamp.com/home/downloads/index.html
Let me know what you think. I'll probably see about getting in the
CDATA fix sometime tonight--would have done it last night, but it didn't
even cross my mind since I'm not a big fan of the CDATA tag.
Later,
Sterling
|