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?
> 

It's hard to do proper semantics like this, since microformats imply 
other elements than divs (for example links with rel, or abbr with title).

Another aspect I don't like is that there are so many HTML elements. Why 
is there a p and a strong?

Anyway, +1 for HTML.
-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to