Hi Malaka,
On Jul 1, 2008, at 6:20 AM, malaka ekanayake wrote:
Hi vincent
Now I'm working on the costume implementation of the IDocument
Partitioner which uses the XDOM parser.
But in order to to register partitions with the
IDocument,requires the offset and the length of each token returned
by the parser.
Did you get Marius' input on this?
I remember I said:
"
* Re the offset and lengthn I think this is something interesting that
could be added to the new rendering module. Since the underlying
parsers (wikimodel, doxia) don't pass this information to us we would
need to compute it. It would allow us to answer the question "what
block is located at location NN in the source document".
* We need to get Marius' input since he's working on the new WYSIWYG
editor for XWiki and maybe he has some similar needs/issues.
"
The reason I said this is because if the only requirement is for your
use case then you could easily compute the offset/lenght for your use
case only (by writing a very simple Listener and running
XDOM.traverse(yourllistener). However if the need is generic then it
makes sense to have it in the rendering component itself.
I'm still hesitating about the generic need about this.
If we agree to add it in the rendering component then I can implement
it for you.
Another question for you: once you have this information what's the
algorithm for finding the block that corresponds to a given location
in the source document? Dichotomy on the tree?
Thanks
-Vincent
But the current implementation of the parser don't
have that
information.Do I need to look at that issuer as well or what?
I have very little understanding of the implementation of the
parser and I will be difficult for me to implement that
functionality.
Vincent can you help me on this issuer.
-- Malaka Ekanayake
CSE UOM