% listings setup
\definecolor{LISTING_background}{RGB}{245,245,245}
\lstset{
	basicstyle=\footnotesize\ttfamily,
	extendedchars=true,
	backgroundcolor=\color{LISTING_background},
	showspaces=false, 
	showstringspaces=false,
	showtabs=false, 
	frame=single, 
	tabsize=2,  
	breaklines=true, 
	breakatwhitespace=true,
	postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\hookrightarrow\space}}
}

\definecolor{XML_string}{RGB}{0,0,0}
\definecolor{XML_identifier}{RGB}{0,0,128}
\definecolor{XML_keyword}{RGB}{200,0,0}
\lstdefinelanguage{XML}
{
	morestring=[b]",
	morestring=[s]{>}{<},
	morecomment=[s]{<?}{?>},
	stringstyle=\color{XML_string},
	identifierstyle=\color{XML_identifier},
	keywordstyle=\color{XML_keyword},
	morekeywords={cmis,cmisra,atom}
}

\lstdefinelanguage{CMISAtomPubHTTP}
{
	morestring=[b]",
	morestring=[s]{>}{<},
	morecomment=[s]{<?}{?>},
	stringstyle=\color{XML_string},
	identifierstyle=\color{XML_identifier},
	keywordstyle=\color{XML_keyword},
	morekeywords={cmis,cmisra,atom,HTTP,GET,POST,PUT,DELETE}
}

\lstdefinelanguage{CMISJSONHTTP}
{
	morestring=[b]",
	morecomment=[l]{//},
	morecomment=[l]{\#},
	stringstyle=\color{XML_string},
	identifierstyle=\color{XML_identifier},
	keywordstyle=\color{XML_keyword},
	morekeywords={HTTP,GET,POST,PUT,DELETE}
}

\definecolor{CMISQuery_string}{RGB}{0,0,0}
\definecolor{CMISQuery_identifier}{RGB}{0,0,128}
\definecolor{CMISQuery_keyword}{RGB}{200,0,0}
\lstdefinelanguage{CMISQuery}
{
	morecomment=[l]{!!},
	stringstyle=\color{CMISQuery_string},
	identifierstyle=\color{CMISQuery_identifier},
	keywordstyle=\color{CMISQuery_keyword},
	morekeywords={SELECT,FROM,WHERE,ORDER,BY,AS,JOIN,LEFT,INNER,OUTER,ON,NOT,LIKE,IS,NULL,IN,ANY,IN_FOLDER,IN_TREE,TIMESTAMP,OR,AND,CONTAINS,SCORE,ASC,DESC}
}

\definecolor{Orderly_string}{RGB}{0,0,0}
\definecolor{Orderly_identifier}{RGB}{0,0,128}
\definecolor{Orderly_keyword}{RGB}{200,0,0}
\lstdefinelanguage{Orderly }
{
	morestring=[b]",
	morecomment=[l]{//},
	morecomment=[l]{\#},
	stringstyle=\color{Orderly_string},
	identifierstyle=\color{Orderly_identifier},
	keywordstyle=\color{Orderly_keyword},
	morekeywords={object,string,id,integer,number,boolean,null,array,union,map,ref,base,any}
}

\definecolor{OrderlyGrammer_string}{RGB}{0,0,0}
\definecolor{OrderlyGrammer_identifier}{RGB}{0,0,128}
\definecolor{OrderlyGrammer_keyword}{RGB}{200,0,0}
\lstdefinelanguage{OrderlyGrammer}
{
	morestring=[b]",
	morestring=[b]',
	morecomment=[l]{!!},
	morecomment=[l]{\#},
	morecomment=[l]{---},
	stringstyle=\color{OrderlyGrammer_string},
	identifierstyle=\color{OrderlyGrammer_identifier},
	keywordstyle=\color{OrderlyGrammer_keyword}
}
