Ok after thinking more about this with Thomas (and thanks to Marius'  
email) here's our vision (Thomas and I).

There are 2 separate needs:
* semantic markup (a la microformat).
* document metadata

Semantic markup
==============

This was the need solved by semantic properties in wikimodel
(see http://code.google.com/p/wikimodel/wiki/AdvancedStructuralElements)

However we've realized that with the group feature we want to  
introduce we already support semantic properties.

Here's an example:

I am (% class="person" %)(((Vincent Massol))

As a consequence there's no need to introduce a new syntax and I  
propose to revert all the changes I've done locally on my machine and  
not commit them and thus close http://jira.xwiki.org/jira/browse/XWIKI-3320 
  as won't fix.

<implementation>
* introduce group events to replace beginDocument/endDocument when  
it's not the initial doc
* introduce begin/endProperty events to replace current begin/ 
endFormat() which is used for parameters (we'll keep begin/endFormat  
for wiki syntax elements such as **bold**, //italic//, etc.)
</implementation>

Document metadata
================

This is a separate discussion and we need to decide if we want to have  
the ability to specify document metadata inside document content or not.
I'm not sure yet that we need that. If not then we'll need to continue  
having a separate way to specify document metadata be it with some  
special metadata object(s) or with a specific UI for setting metadata.

In any case we'll need to add some new metadata like:
* whether we want headers to be numbered or not for the full document  
for ex
* whether we want left/right panels to be displayed
* whether we want attachments/comments/information tabs to be displayed
* etc.

So we need to find how we want to support generic document metadata.

Note that if we want only some headers to be numbered we can use:

--------- cut here -------------------
= not numbered header

(% xwiki:numberedHeaders="true" %)(((
== numbered header1

blah blah

==numbered header2

blah blah
)))
--------- cut here -------------------

Thanks
-Vincent

On Apr 20, 2009, at 10:31 AM, Vincent Massol wrote:

> Hi,
>
> I'm implementing semantic properties in XWiki Syntax 2.0
> http://jira.xwiki.org/jira/browse/XWIKI-3320
>
> I've done the wikimodel part and I'm now wondering how what XHTML we  
> should generate in the XHTML renderer (and thus what XHTML should  
> the wysiwyg handle).
>
> Here's an example input:
>
> %%property1 (((
>  %%property2 **value2**
>  %%property3 value3
> )))
>
> Right now one solution I've found is to serialize the property  
> content in xwiki syntax 2.0 and output it as a comment in the XHTML  
> renderer:
>
> <!--startproperty %%property1 (((
>  %%property2 **value2**
>  %%property3 value3
> )))--><!--stopproperty-->
>
> (note: we could have <!--property--> instead of start/stopproperty,  
> that's a detail)
>
> Then the XHTML parser would use the xwiki syntax 2.0 parser on the  
> content of the comment to generate events.
>
> Since it's not very trivial to serialize to xwiki syntax in the  
> XHTML renderer I'd like to know what you think or if you have a  
> better idea. I guess we could also do something like:
>
> <div class="'xwiki-semantic property1">
>  <div class="xwiki-semantic property2>
>    <p>
>      <strong>value2</strong>
>    </p>
>  </div>
> <div class="xwiki-semantic property3">
>     <p>
>        value3
>    </p>
>  </div>
> </div>
>
> Note: we would use span for inline semantic properties instead of  
> divs.
>
> And then have a CSS with display:none for ".xwiki-semantic"
>
> The advantage of this latter solution are:
> * Easier to implement for the XHTML renderer and XHTML parser
> * Is in line with HCARD if we want to support it (and we probably  
> do), see
> http://jira.xwiki.org/jira/browse/XWIKI-3320?focusedCommentId=39554&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_39554
>
> WDYT?
>
> Thanks
> -Vincent
>

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to