Hi,
I have a small doubt on how listener is implemented in
MediaWiki2XWikiExtension
Groovy Code Snippet --
http://code.xwiki.org/xwiki/bin/view/Extensions/MediaWiki2XWikiExtension
<%
import org.dom4j.io.SAXReader
import org.dom4j.*
import groovy.net.xmlrpc.*
import java.net.ServerSocket
import org.wikimodel.wem.mediawiki.MediaWikiParser
import org.wikimodel.wem.xwiki.*
class PruningPageHandler implements ElementHandler {
def proxy, token;
def counter = 0;
def max = 10000;
PruningPageHandler(proxy, token) {
this.proxy = proxy
this.token = token
}
def messages = []
public void onStart(ElementPath path) { }
public void onEnd(ElementPath path) {
def page = path.current
def title = page.elementText('title')
title = title.replaceAll(' ','_')
def id = page.elementText('id')
println(title+ '('+counter+')')
def revision = page.element('revision')
def revid = revision.elementText('id');
def revtext = revision.elementText('text');
def contributor = revision.element('contributor')
def username = contributor.elementText('username')
def index = revtext.substring(0,
Math.min(30,revtext.length())).toLowerCase().indexOf("redirect")
counter++;
if (counter < max && index < 0) {
revtext = revtext.replaceFirst("^-", "*");
revtext = revtext.replaceAll("__","")
revtext = revtext.replaceAll("[\\|][\\+]","")
def buffer = new StringBuffer()
buffer.append(revtext)
try {
*def reader = new StringReader(revtext);
def parser = new MediaWikiParser();
buffer = new StringBuffer()
def listener = new XWikiSerializer(buffer);
parser.parse(reader, listener);*
} catch (Exception e) {
println(e.getMessage())
}
def map = new HashMap()
map.put('content', buffer.toString())
map.put('modifier', username)
map.put('space','Wikipedia')
map.put('title',title)
try {
proxy.confluence1.storePage(token, map)
} catch (Exception e) {
println(e.getMessage())
}
}
page.detach() // prune the tree
}
}
%>
XWikiSerializer has a constructor with some class implementing IWikiPrinter
. But how come a StringBuffer is used here.
Am trying to simulate the same from a java application,and a fact that use
of StringBuffer fails here. How to create a listener object in that case.
Thanks and Best Regards,
Arun Reddy
Hi XWikiers,
Ludovic (XWiki's founder) and I (XWiki OSS product manager) will be at
JavaOne in San Francisco from Sunday, May 31 to Saturday, June 6 included.
We'd be really happy to meet and hook up with community members and XWiki
users from the far side of the world :-)
We'll be on OW2 booth from Tuesday, June 2 to Thursday, June 4 during the
conference. We'd be really happy to meet with users outside the timeframe of
the conference too... Simply let us know whether you're in the area and
we'll go grab a beer while feverishly discussing XObjects and XClasses ;-)
Also, Jim Grisanzio told me there would be many people from the OpenSolaris
community hanging around, so JavaOne will be the perfect opportunity for
other XWiki Users to discover what the OpenSolaris community has been doing
with XWiki of late (cf.
http://opensolaris.org/os/community/web/restructuring/preview/ for more
information on the topic).
Looking forward hearing from you guys (and gals !!),
Guillaume
--
Guillaume Lerouge
Product Manager - XWiki
Skype ID : wikibc
http://guillaumelerouge.com/
Hello guys,
I'm developing my first application in syntax 2 for a customer.
I started on a 1.8.2 XE and just moved on a 1.8 Snapshot (the latest
build - 05/16).
Here is my problem :
I have a little #if in a #foreach that works on my 1.8.2 but not on my
1.8 Snapshot and I totally don't know why.
#set($tradliste = $doc.getObjects("RimayCode.Traduction"))
#foreach($traduc in $tradliste)
#if($!traduc.langue == "Francais")
$!traduc.langue : $!traduc.traduction <br />
#end
#end
On my 1.8.2 the "foreach" returns all the objects with the good values,
and the "if" is a filter to display the items with a "Francais" value in
the "langue" field.
On my 1.8 Snapshot the "foreach" returns all the objects with the good
values, but the "if" doesn't work : not any result.
There is probably a pb, something new to do to create a test like this
but I can't see what...
"langue" is a static list with 4 options (1=Francais|2=Tibetain|3=...)
Any idea ?
Thomas
Hai...
I have some doubts regarding the Document Type Manager. I need some detail
specification regarding the Document Type Manager.This is what I realised
about it.
According to the mockups
http://incubator.myxwiki.org/xwiki/bin/view/Mockups/DocumentTypeManager
figure 1:
Is to define the class name and the space like the class editor wizard. But
I'm not clear about the other fields "Create Invitation Text" and "Grid
Invitation Text"
As in the heading of the mockup its says "DocumentTypeManagerEditType". I'm
not clear about from where the new document type is going to create. Is that
Mockup is missing.Or is it this UI also use in creating the document.If so I
feel that "Create this Document Type."button is missing.
figure2 & 3:
Use to add the properties for the new or existing document type and to
define the properties of properties.
I'm not clear about the next two tabs.
Grid Tab: Lists the documents with the same type.
Template Tab:Not clear about this tab.
This is the action flow I had realised.
1.User define a new document type by giving a name and space .(So document
manager creates the document based on the request paramerters)Or based on
the selection of the document types from the list shown in the left side,
Tab will shows the details regarding to the relevant selection.
2.Then user add the properties for the document type. Like in class editor
wizard.(After clicking the save button document type complete its
generation)
I'm not clear about the action flow of the other tabs. (Grid and Template
tab)
As an abstraction what I was feel that this is same as the class editor
wizard with different looking.Its like hiding the complxity of creating
classes and sheets. All the things will be automated using this wizard.If I
was wrong please correct me.
Currently I'm studying the "class editor wizard code,protoype and
smartclient".Hoping to get on to the design after I get the good
understanding about the document type manager.
Thank you.
--
~ Chathura Prabuddha Ganegoda~
Undergraduate,
Department of Computer Science & Engineering,
University of Moratuwa,
Sri Lanka.
http://gacpganegoda.blogspot.com/
Hi,
I want to change the color of links Login/Register wich is white to black
so i want to know wich css is responsible for this kind of links and what
should i do?
thank you very much
--
View this message in context: http://n2.nabble.com/Change-color-of-login-register-tp2932039p2932039.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
I have a java macro that requires the page to include an external js (e.g. jQuery) that works best if included in the head section of the document. Is there a way for a macro to trigger inclusion of resources like this to be included in the page header? In confluence this was done by having a #requireResource statement in a velocity template included by the macro.
How can this be done in xwiki?
--
Glenn
Hi developers,
I am currently working on getting the XWiki Watch trunk up to date working on a
1.8.x enterprise.
When I will be done with it, I would like to release a 1.1 M2 (to contain
currently fixed bugs + this update), based on 1.8.3 platform version, WDYT?
Here's my +1.
Happy coding,
Anca Luca
Hi,
I don't think we need different Macro Sources in the rendering module.
All we need is a single source that takes its macros from the
classloader.
What we do need are different modules that create Macro components so
that they are made available to the single Macro Source.
For example the annotations are defining macros and their not a
source. They don't need to be. All they have to do is call
ComponentManager.registerComponent() to register new macros.
The same should be done for macros defined as wiki pages or macros
defined in a remote repository. All we need are handlers that can
extract information and generate calls to
ComponentManager.registerComponent().
Now since we need to be performant we want to cache Macros at init
time in the Macro manager but we also need to support macros added
dynamically later on. For this I think we need to introduce Component
Manager events (this already exists in Plexus BTW) that would allow
listeners to get events when a component is created or disposed of. In
this manner the Macro Manager would subscribe to CM events for the
Macro.class role and be able to add/remove Macros on the fly.
WDYT?
Thanks
-Vincent
Hi Niels,
thanks for your feedback.
On Fri, May 15, 2009 at 12:03 AM, Niels Mayer <nielsmayer(a)gmail.com> wrote:
> On Thu, May 14, 2009 at 2:01 AM, Marius Dumitru Florea <
> mariusdumitru.florea(a)xwiki.com> wrote:
>
> >
> > For the first outcome I think we all agree that the user has to press
> > Shift+Enter. For the second and third outcomes I see two options:
> >
> > A) Enter for 2 and CTRL/META+Enter for 3
> > B) Enter for 3 and CTRL/META+Enter for 2
> > (if you see any other options please step up)
> >
>
> Sounds like wikimacs (wiki+emacs) :-)
>
> What about using a multiple-repeated enters. Kind of like a keyboard
> equivalent of a double, triple click, with some visual way of suggesting
> what level "upwards" in the DOM the return will create the next element
> (e.g
> a "box insertion caret" like for drag-drop operations):
>
> * a single enter in a list adds a paragraph or <br> within the current
> element. It does not create a new list or table entry.
>
> * double-enter, creates a new <li> <tr> etc (depending on if you're in a
> table, list etc) within the current table/list.
>
> * triple-enter, creates a new <li> <tr> <p> or <br> as the next element
> outside of the current list/table etc. (if in a nested table/list, it'll
> correctly add the next element)
We tried doing something similar for paragraphs (hit enter once to create
next line, twice for new paragraph) and the feedback we got from users was
pretty negative. It looks like the user's expectation about the enter key is
that it will create a new item (new paragraph, new list item, new whatever).
Thus the concept of double-enter similar to double-clicking doesn't seem to
work in practice so far. Thus I think we shouldn't reintroduce it.
-- Niels
> http://nielsmayer.com
>
> PS: I got to deal with all these fun issues back in ~1995 when i designed
> WWWeasel (reviewed at an early WWW conf
> here<http://nielsmayer.com/L27933-1529TMP.pdf>
> )
> http://nielsmayer.com/wwweasel/node26.html<
> http://nielsmayer.com/wwweasel/node26.html#SECTION00051000000000000000>
> http://nielsmayer.com/wwweasel/node27.html
> It is very helpful for the user to be able to see what's going on
> "structurally" at the same time as you're editing in WYSIWYG.... If you can
> graphically depict where in the DOM structure the "return" is pointing, at
> what level of scope, then it's a lot less confusing to the user.
The WYSIWYM concept is pretty interesting and powerful. I played around with
tools such as WYMeditor
http://files.wymeditor.org/wymeditor/trunk/src/examples/01-basic.html
and I definitely do like the concept. However, this is not the direction we
have taken so far with our new WYSIWYG editor. Changing it to make it a
WYSIWYM editor on top of what it currently does would require considerable
effort. Our focus right now is on eliminating quirks and bugs in all major
browsers to make the editor ready for production use. Therefore I think
we'll have to wait some time before even considering building a WYSIWYM
editor for XWiki.
However, please note that since you can store XWiki document contents as
XML, you could definitely try to plug WYMeditor on top of XWiki and make it
the default edition option. You'd lack the wiki-specific feature, but for
content insertion you'd benefit from the WYSIWYM interface :-)
Guillaume
> _______________________________________________
> users mailing list
> users(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
--
Guillaume Lerouge
Product Manager - XWiki
Skype ID : wikibc
http://guillaumelerouge.com/