Re: AW: Best way to create and develop a kate syntax highlighting file

Alexander Zhigalin <[email protected]>
Newsgroups gmane.comp.kde.devel.kwrite
Message-ID <[email protected]>
+ cullmann@

Hello

Actually, there is a XML helper in Kate but it needs a specific meta DTD-file.

I tried to generate it from the syntax highlighting language.xsd with dtdparse but sadly I had no success...

dtdparse --xml syntax-highlighting/data/schema/language.xsd

Public ID: unknown

System ID: language.xsd

SGML declaration: unknown, using defaults for xml and namecaseError: Unexpected declaration: <xs:schema

29.09.2020, 13:26, "Christoph Cullmann" <[email protected]>:

On 2020-09-29 13:12, [email protected] wrote:

On Tuesday, September 29, 2020 03:45:23 AM Andreas Plank wrote:
> [email protected]
> I would look for another language that is similar to SPARQL which has a(n
> XML)
> syntax highlighter for kate and modify it.

sure, I did this ;-) but regarding the extensive KSyntaxHighlighting
attributes and elements is there a smart way to edit with? I mean an
editor
tool or text snippet tools or even a list of definitions? I saw and
read
the api of KSyntaxHighlighting and I guess I have to extract
KSyntaxHighlighting elements or attributes on my own.

It would be nice to have a tool to start with like Notepad++ has for
creating syntax highlighting files ;-)

Sorry, I don't know.

It was quite a few years ago (10+, maybe even 15) when I made the
syntax
highlighting XML file that I needed. At the time, I didn't find
anything better
than just using an editor and learning the rules required.

I don't keep up with all the latest things in kate (or even the latest
version) -- I primarily use version 3.8.4 (on KDE 4.8.4 on Debian
Wheezy).

I hope somebody more familiar with things will be aware of a better
tool.

I will say that (for me) doing it the way I did was not terribly
difficult,
especially compared to one of the ways that it could be done for
Scintilla,
that is, writing it in C++ code (an alternative is to write it in Lua
code
(for Scintilla).

Hi,

I think at the moment there is no better way than either just an plain
text editor,
or, if you have some of that, some XML editors might provide better
handling if
you pass them our language.xsd that defines the grammar of the XML files
we user.

But that will not provide a lot more than "you can open now this tag
here + autocomplete
for the attributes".

Greetings
Christoph

--
Ignorance is bliss...
https://cullmann.io | https://kate-editor.org

--

Alexander Zhigalin — G.T.S. srl

———————————————————————————————————————————

Email: [email protected]

Cell: +39 380 593 0050

Tel: +39 019 294 0240

Fax: +39 019 924 1167
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.