[xwiki-devs] Introduce XML based syntax mapping events/XDOM
Hi all, Since i finished a first POC, I would like to introduce a new XML based syntax. the goal is to provide an easy to parse exact mapping of the rendering events. You can look at http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax for more details. Would be great to have comments about this. The main things to discuss are: - what XML syntax exactly (http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax#HProposedformat) - what syntax identifier (http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax#Hfindagoodsyntaxidentif...) The first use case for this is the support of generic markers in XHTML: instead of having specialized macro marker in XHTML comment serialized in a generic, easy to parse and exact repesentation of a XDOM branch that as been replaced by something else during a transformations. So WDYT ? -- Thomas
On Tue, Dec 1, 2009 at 16:28, Thomas Mortagne <[email protected]> wrote:
Hi all,
Since i finished a first POC, I would like to introduce a new XML
Attached to http://jira.xwiki.org/jira/browse/XWIKI-4237
based syntax. the goal is to provide an easy to parse exact mapping of the rendering events.
You can look at http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax for more details.
Would be great to have comments about this.
The main things to discuss are: - what XML syntax exactly (http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax#HProposedformat) - what syntax identifier (http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax#Hfindagoodsyntaxidentif...)
The first use case for this is the support of generic markers in XHTML: instead of having specialized macro marker in XHTML comment serialized in a generic, easy to parse and exact repesentation of a XDOM branch that as been replaced by something else during a transformations.
So WDYT ?
-- Thomas
-- Thomas Mortagne
On Dec 1, 2009, at 4:28 PM, Thomas Mortagne wrote:
Hi all,
Since i finished a first POC, I would like to introduce a new XML based syntax. the goal is to provide an easy to parse exact mapping of the rendering events.
You can look at http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax for more details.
Would be great to have comments about this.
The main things to discuss are: - what XML syntax exactly (http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax#HProposedformat)
Just a remark, why not using names for parameters? This would make the format more robust wrt evolutions. Currently the order introduces a stronger coupling with the beginEvent semantics for a given event. Using names, this would not be the case anymore (and as a side effect debugging would be easier). -Fabio
On Tue, Dec 1, 2009 at 16:49, Fabio Mancinelli <[email protected]> wrote:
On Dec 1, 2009, at 4:28 PM, Thomas Mortagne wrote:
Hi all,
Since i finished a first POC, I would like to introduce a new XML based syntax. the goal is to provide an easy to parse exact mapping of the rendering events.
You can look at http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax for more details.
Would be great to have comments about this.
The main things to discuss are: - what XML syntax exactly (http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax#HProposedformat)
Just a remark, why not using names for parameters? This would make the format more robust wrt evolutions.
Currently the order introduces a stronger coupling with the beginEvent semantics for a given event. Using names, this would not be the case anymore (and as a side effect debugging would be easier).
I hesitated but as i said in the proposal, having names also mean having mapping between this name and where is it in the event, mapping which does not exist currently. Note that parameters are not internal implementation details, it's a public API used by both parsers and renderers so changing it is not that easy. I agree that adding the name information could be useful but it makes parser and the renderer doing more logic and make the format more verbose (it would be the first "in case of" information in the format) and I'm not sure it's really needed. From technical POV, it just make possible to randomize parameters instead of always have them in the same order. I'm 50/50 on this, if others think it's really important i can start to introduce more information in EventType enum.
-Fabio
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Thomas, I am positive it seems to be a useful thing! Two thoughts: - do you do a mapping java <-> schema in a somewhat automated manner? I would urge you to do this so as to maintain one single documentable code base. things like xsddoc have a chance for documentation maybe? - do you have already a full (de-)serialization and another implementation that would either produce or consume that XML? All of these things may affect your format thoughts. paul Le 01-déc.-09 à 16:28, Thomas Mortagne a écrit :
Hi all,
Since i finished a first POC, I would like to introduce a new XML based syntax. the goal is to provide an easy to parse exact mapping of the rendering events.
You can look at http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax for more details.
Would be great to have comments about this.
The main things to discuss are: - what XML syntax exactly (http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax#HProposedformat) - what syntax identifier (http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax#Hfindagoodsyntaxidentif... )
The first use case for this is the support of generic markers in XHTML: instead of having specialized macro marker in XHTML comment serialized in a generic, easy to parse and exact repesentation of a XDOM branch that as been replaced by something else during a transformations.
So WDYT ?
-- Thomas _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Tue, Dec 1, 2009 at 17:51, Paul Libbrecht <[email protected]> wrote:
Thomas,
I am positive it seems to be a useful thing! Two thoughts:
- do you do a mapping java <-> schema in a somewhat automated manner? I would urge you to do this so as to maintain one single documentable code base. things like xsddoc have a chance for documentation maybe?
Yes. See http://jira.xwiki.org/jira/browse/XWIKI-4237 and http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax#HProposedformat for details related to this proposal.
- do you have already a full (de-)serialization and another implementation that would either produce or consume that XML? All of these things may affect your format thoughts.
You can find full streaming and block parsers and renderers implementations (for the format described in http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax#HProposedformat) in http://jira.xwiki.org/jira/browse/XWIKI-4237.
paul
Le 01-déc.-09 à 16:28, Thomas Mortagne a écrit :
Hi all,
Since i finished a first POC, I would like to introduce a new XML based syntax. the goal is to provide an easy to parse exact mapping of the rendering events.
You can look at http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax for more details.
Would be great to have comments about this.
The main things to discuss are: - what XML syntax exactly (http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax#HProposedformat) - what syntax identifier
(http://dev.xwiki.org/xwiki/bin/view/Design/xmlsyntax#Hfindagoodsyntaxidentif...)
The first use case for this is the support of generic markers in XHTML: instead of having specialized macro marker in XHTML comment serialized in a generic, easy to parse and exact repesentation of a XDOM branch that as been replaced by something else during a transformations.
So WDYT ?
-- Thomas _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
participants (3)
-
Fabio Mancinelli -
Paul Libbrecht -
Thomas Mortagne