All Downloads are FREE. Search and download functionalities are using the official Maven repository.

modes.html.xml Maven / Gradle / Ivy

Go to download

This project aims to build a command line tool that can create HTML view with syntax highlighted source code. It uses Jedit syntax highlighting engine and support all languages that are supported in JEdit. Which are currently: ActionScript, Ada 95, ANTLR, Apache HTTPD, APDL, AppleScript, ASP, Aspect-J, Assembly, AWK, B formal method, Batch, BBj, BCEL, BibTeX, C, C++, C#, CHILL, CIL, COBOL, ColdFusion, CSS, CVS Commit, D, DOxygen, DSSSL, Eiffel, EmbPerl, Erlang, Factor, Fortran, Foxpro, FreeMarker, Fortran, Gettext, Groovy, Haskell, HTML, Icon, IDL, Inform, INI, Inno Setup, Informix 4GL, Interlis, Io, Java, JavaScript, JCL, JHTML, JMK, JSP, Latex, Lilypond, Lisp, LOTOS, Lua, Makefile, Maple, ML, Modula-3, MoinMoin, MQSC, NetRexx, NQC, NSIS2, Objective C, ObjectRexx, Occam, Omnimark, Parrot, Pascal, Patch, Perl, PHP, Pike, PL-SQL, PL/I, Pop11, PostScript, Povray, PowerDynamo, Progress 4GL, Prolog, Properties, PSP, PV-WAVE, Pyrex, Python, REBOL, Redcode, Relax-NG, RelationalView, Rest, Rib, RPM spec, RTF, Ruby, Ruby-HTML, RView, S+, S#, SAS, Scheme, SDL/PL, SGML, Shell Script, SHTML, Smalltalk, SMI MIB, SQR, Squidconf, SVN Commit, Swig, TCL, TeX, Texinfo, TPL, Transact-SQL, UnrealScript, VBScript, Velocity, Verilog, VHDL, XML, XSL, ZPT

The newest version!
<?xml version="1.0"?>

<!DOCTYPE MODE SYSTEM "xmode.dtd">

<MODE>
	<PROPS>
		<PROPERTY NAME="commentStart" VALUE="&lt;!--" />
		<PROPERTY NAME="commentEnd" VALUE="--&gt;" />
	</PROPS>

	<RULES IGNORE_CASE="TRUE">
		<!-- SGML comment -->
		<SPAN TYPE="COMMENT1">
			<BEGIN>&lt;!--</BEGIN>
			<END>--&gt;</END>
		</SPAN>

		<!-- JavaScript -->
		<SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT">
			<BEGIN>&lt;SCRIPT</BEGIN>
			<END>&lt;/SCRIPT&gt;</END>
		</SPAN>

		<!-- stylesheet -->
		<SPAN TYPE="MARKUP" DELEGATE="CSS">
			<BEGIN>&lt;STYLE</BEGIN>
			<END>&lt;/STYLE&gt;</END>
		</SPAN>

		<!-- DTD instructions -->
		<SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
			<BEGIN>&lt;!</BEGIN>
			<END>&gt;</END>
		</SPAN>

		<!-- markup tags -->
		<SPAN TYPE="MARKUP" DELEGATE="TAGS">
			<BEGIN>&lt;</BEGIN>
			<END>&gt;</END>
		</SPAN>

		<!-- SGML entities -->
		<SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
			<BEGIN>&amp;</BEGIN>
			<END>;</END>
		</SPAN>
	</RULES>

	<!-- ESCAPE is not exactly right but it is needed to correctly
	     handle JavaScript in on* parameters.
             NOTE: ESCAPE moved from RULE to SPANs! -->
	<RULES SET="TAGS" DEFAULT="MARKUP">
		<!-- Inline CSS -->
 		<SPAN_REGEXP TYPE="MARKUP" DELEGATE="css::PROPERTIES" HASH_CHAR="style">
			<BEGIN>style\s*=\s*(["'])</BEGIN>
			<END>$1</END>
		</SPAN_REGEXP>

		<!-- NOTE: no ESCAPE for quotes, at least for attributes; e.g onclick="alert(\"foo\");" is invalid! -->
		<SPAN TYPE="LITERAL1">
			<BEGIN>"</BEGIN>
			<END>"</END>
		</SPAN>
		<SPAN TYPE="LITERAL1">
			<BEGIN>'</BEGIN>
			<END>'</END>
		</SPAN>

		<SEQ TYPE="OPERATOR">=</SEQ>

		<KEYWORDS>
			<!-- HTML/XHTML elements, taken from http://de.selfhtml.org/html/referenz/elemente.htm -->
			<MARKUP>a</MARKUP>
			<MARKUP>abbr</MARKUP>
			<MARKUP>acronym</MARKUP>
			<MARKUP>address</MARKUP>
			<MARKUP>applet</MARKUP>
			<MARKUP>area</MARKUP>
			<MARKUP>b</MARKUP>
			<MARKUP>base</MARKUP>
			<MARKUP>basefont</MARKUP>
			<MARKUP>bdo</MARKUP>
			<MARKUP>big</MARKUP>
			<MARKUP>blockquote</MARKUP>
			<MARKUP>body</MARKUP>
			<MARKUP>br</MARKUP>
			<MARKUP>button</MARKUP>
			<MARKUP>caption</MARKUP>
			<MARKUP>center</MARKUP>
			<MARKUP>cite</MARKUP>
			<MARKUP>code</MARKUP>
			<MARKUP>col</MARKUP>
			<MARKUP>colgroup</MARKUP>
			<MARKUP>dd</MARKUP>
			<MARKUP>del</MARKUP>
			<MARKUP>dfn</MARKUP>
			<MARKUP>dir</MARKUP>
			<MARKUP>div</MARKUP>
			<MARKUP>dl</MARKUP>
			<MARKUP>dt</MARKUP>
			<MARKUP>em</MARKUP>
			<MARKUP>fieldset</MARKUP>
			<MARKUP>font</MARKUP>
			<MARKUP>form</MARKUP>
			<MARKUP>frame</MARKUP>
			<MARKUP>frameset</MARKUP>
			<MARKUP>h1</MARKUP>
			<MARKUP>h2</MARKUP>
			<MARKUP>h3</MARKUP>
			<MARKUP>h4</MARKUP>
			<MARKUP>h5</MARKUP>
			<MARKUP>h6</MARKUP>
			<MARKUP>head</MARKUP>
			<MARKUP>hr</MARKUP>
			<MARKUP>html</MARKUP>
			<MARKUP>i</MARKUP>
			<MARKUP>iframe</MARKUP>
			<MARKUP>img</MARKUP>
			<MARKUP>input</MARKUP>
			<MARKUP>ins</MARKUP>
			<MARKUP>isindex</MARKUP>
			<MARKUP>kbd</MARKUP>
			<MARKUP>label</MARKUP>
			<MARKUP>legend</MARKUP>
			<MARKUP>li</MARKUP>
			<MARKUP>link</MARKUP>
			<MARKUP>map</MARKUP>
			<MARKUP>menu</MARKUP>
			<MARKUP>meta</MARKUP>
			<MARKUP>noframes</MARKUP>
			<MARKUP>noscript</MARKUP>
			<MARKUP>object</MARKUP>
			<MARKUP>ol</MARKUP>
			<MARKUP>optgroup</MARKUP>
			<MARKUP>option</MARKUP>
			<MARKUP>p</MARKUP>
			<MARKUP>param</MARKUP>
			<MARKUP>pre</MARKUP>
			<MARKUP>q</MARKUP>
			<MARKUP>s</MARKUP>
			<MARKUP>samp</MARKUP>
			<MARKUP>script</MARKUP>
			<MARKUP>select</MARKUP>
			<MARKUP>small</MARKUP>
			<MARKUP>span</MARKUP>
			<MARKUP>strike</MARKUP>
			<MARKUP>strong</MARKUP>
			<MARKUP>style</MARKUP>
			<MARKUP>sub</MARKUP>
			<MARKUP>sup</MARKUP>
			<MARKUP>table</MARKUP>
			<MARKUP>tbody</MARKUP>
			<MARKUP>td</MARKUP>
			<MARKUP>textarea</MARKUP>
			<MARKUP>tfoot</MARKUP>
			<MARKUP>th</MARKUP>
			<MARKUP>thead</MARKUP>
			<MARKUP>title</MARKUP>
			<MARKUP>tr</MARKUP>
			<MARKUP>tt</MARKUP>
			<MARKUP>u</MARKUP>
			<MARKUP>ul</MARKUP>
			<MARKUP>var</MARKUP>
		</KEYWORDS>
	</RULES>

	<RULES SET="JAVASCRIPT" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
		<SEQ TYPE="MARKUP" DELEGATE="javascript::MAIN">&gt;</SEQ>
		<!-- handle <SCRIPT SRC="..."> properly -->
		<SEQ TYPE="MARKUP" DELEGATE="BACK_TO_HTML">SRC=</SEQ>

		<!-- Inline CSS -->
 		<SPAN_REGEXP TYPE="MARKUP" DELEGATE="css::PROPERTIES" HASH_CHAR="style">
			<BEGIN>style\s*=\s*(["'])</BEGIN>
			<END>$1</END>
		</SPAN_REGEXP>
	</RULES>

	<RULES SET="BACK_TO_HTML" DEFAULT="MARKUP">
		<SEQ TYPE="MARKUP" DELEGATE="html::MAIN">&gt;</SEQ>
	</RULES>

	<RULES SET="CSS" DEFAULT="MARKUP">
		<SEQ TYPE="MARKUP" DELEGATE="css::MAIN">&gt;</SEQ>
	</RULES>
</MODE>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy