Re: GtkSourceView - Is it possible to create a composite language definition? (XML + Script)
Paolo Borelli <[email protected]> Sun, 08 Mar 2009 12:43:10 +0100
| Newsgroups | gmane.comp.gnome.devtools |
|---|---|
| Message-ID | <1236512590.3939.8.camel@murdock> |
Hi, Il giorno gio, 05/03/2009 alle 06.06 -0800, pwnedd ha scritto: > I would like to create a language definition for handling Adobe Flex .mxml > files, which are a combination of XML and ActionScript > (http://blog.flexexamples.com/ has some examples of what the code looks > like). The main part of the document is XML, and is parsed fine by the > GTKSourceView XML language definition. > http://bugzilla.gnome.org/show_bug.cgi?id=540935 has some syntax files for mxml attached that may good or that may need further work... > The question I have is- is it possible to specify that the XML language > definition should be used for the document everywhere except inside of CDATA > blocks, in which case xxxx language definition should be used? This way I > could write a language definition for ActionScript, and then have the mxml > definition use that for the CDATA blocks. > Yes, this is possible you have to "replace" the xml cdata block with a custom one: see how docbook.lang replaces the generic xml element with docbook tags. Hope that helps, Paolo > Any thoughts? > > Thanks, > Keith