[xwiki-devs] [GSOC] Sample code to test the xwiki parser

malaka ekanayake malaka.ekanayake at gmail.com
Wed Jun 25 23:11:18 CEST 2008


hi Fabio/Vincent

As you have requested, I have uploaded the sample code which uses the xwiki
parser. I have written a maven script to build the sample code. It prints
the xdom object model in to a tree structure. And it also uses the
Parser.traverse() to reprint the xwiki document to the console.

hear is the url http://svn.xwiki.org/svnroot/sandbox/xdom/

In order to undestand how the parser wokes i exaimed it with several xwiki
documents.I think there are some points needed to be clarified about the
parser.It would be greate if you can tell me the criteria which has been
used to build the xdom tree from the xwiki.

For an example consider the following xwiki
plaintext*bold~~bolditalik~~bold*
is this syntax valid?

This is the tree structure of the xdom

XDOM
---ParagraphBlock
   ---WordBlock
   ---BoldBlock
      ---WordBlock
   ---BoldBlock
      ---WordBlock
   ---BoldBlock
      ---WordBlock

In the above tree bolditalic part is not reflected.
Any comment on this


Thanks
-- Malaka Ekanayake
CSE UOM


More information about the devs mailing list