root / trunk / web / dojo / dojox / highlight / languages / xml.js @ 9
History | View | Annotate | Download (1.15 KB)
1 |
/*
|
---|---|
2 |
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
|
3 |
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
4 |
see: http://dojotoolkit.org/license for details
|
5 |
*/
|
6 |
|
7 |
|
8 |
if(!dojo._hasResource["dojox.highlight.languages.xml"]){ |
9 |
dojo._hasResource["dojox.highlight.languages.xml"]=true; |
10 |
dojo.provide("dojox.highlight.languages.xml");
|
11 |
dojo.require("dojox.highlight._base");
|
12 |
(function(){
|
13 |
var _1={className:"comment",begin:"<!--",end:"-->"}; |
14 |
var _2={className:"attribute",begin:" [a-zA-Z-]+=",end:"^",contains:["value"]}; |
15 |
var _3={className:"value",begin:"\"",end:"\""}; |
16 |
var dh=dojox.highlight,_4=dh.constants;
|
17 |
dh.languages.xml={defaultMode:{contains:["pi","comment","cdata","tag"]},case_insensitive:true,modes:[{className:"pi",begin:"<\\?",end:"\\?>",relevance:10},_1,{className:"cdata",begin:"<\\!\\[CDATA\\[",end:"\\]\\]>"},{className:"tag",begin:"</?",end:">",contains:["title","tag_internal"],relevance:1.5},{className:"title",begin:"[A-Za-z:_][A-Za-z0-9\\._:-]+",end:"^",relevance:0},{className:"tag_internal",begin:"^",endsWithParent:true,contains:["attribute"],relevance:0,illegal:"[\\+\\.]"},_2,_3],XML_COMMENT:_1,XML_ATTR:_2,XML_VALUE:_3}; |
18 |
})(); |
19 |
} |