[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Detailes needed for XML-plugin implementation
From:       Milian Wolff <mail () milianw ! de>
Date:       2011-11-19 12:33:16
Message-ID: 201111191333.19998.mail () milianw ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Diana, 18.11.2011:
> > > 2.  For the XML document formatting : We saw that "plugin_katexmlcheck"
> > > uses "xmllint" application. xmllint can be used to format an xml
> > > document, too (using "--format" argument). What would be the best
> > > choice: using xmllint or writing the code that does the format using
> > > the parser (KateSyntaxDocument).
> > 
> > It depends on what you want to do: If you want to reindent the code, this
> > is
> > one way. However, it's not so good as we then depend on xmllint (which is
> > probably not available on Windows or so...).
> > So writing a small parser shoudn't be too hard. On the other hand, this
> > exists already in the XML Tool plugin, as far as I know, and that's also
> > where I would add the code to do the highlighting and so on (folder:
> > kate/plugins/xmltools/).
> 
> So we will tell the students to write a small parser for XML files and use
> it to implement these new features.

No, please don't. There are good XML parsers out there, two alone in Qt, and 
you should try to reuse them instead of reinventing the wheel please.

> We thought it would be better to have a separate plug-in for the students'
> work, because they are new to Kate's code (we don't want to mix their code
> with the current sources) and in this way it would be much easier to
> present their work when the course finishes.

You can easily achieve this. Take a look at kate/playground/kte_acomment - 
it's CMakeLists.txt looks like you can reuse it for a standalone Kate plugin.

Bye

-- 
Milian Wolff
mail@milianw.de
http://milianw.de

["signature.asc" (application/pgp-signature)]

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic