On Fri, 03 Feb 2012 11:36:38 +0100, A McDowell <[email protected]> wrote:

And, BTW, I'm a bit confused about the relationship between HTML5 and
XHTML5, and whether the latter will be really adopted or not.


Just my 2ยข, but the value of XHTML isn't necessarily in delivering
XML-compliant web pages. With XML namespacing it's easy to integrate XHTML
into other XML formats to provide (for example) rich text elements.

Good points, but it depends on the context. For instance, for my sites I do some postprocessing on (X)HTML files (e.g. with XSLT) and XML can be manipulated in a better way (e.g. you don't need JTidy). On the other side, the idea of integrating elements from other namespaces is good, but it fails if you want to use a WYSIWYG editor. In my experience, most HTML editors won't properly manage extra-HTML elements in an efficient visual way. What I'm trying is a different approach, that is to stay with the XHTML scheme and using divs with special classes. For instance, I have the problem of representing photos in a compact way such as:

<myns:photo>
   <id>20050817-0092</id>
<caption>The lower Albegna valley and Isola del Giglio on the horizon.</caption>
</myns:photo>

The idea is that this compact information can be converted in something more complex, including JQuery support for pop ups, slideshows, etc... when rendered in a browser. This approach for me failed for visual editing. What seems to work better is to use <div>s with classes having a semantic meaning:

            <div class="nwXsltMacro_Photo">
                <p class="nwXsltMacro_Photo_photoId">20050817-0092</p>
<p class="nwXsltMacro_Photo_caption">The lower Albegna valley and Isola del Giglio on the horizon.</p>
            </div>

Those classes don't match a CSS, but are used for a XSLT transformation. Actually, with XHTML5 I could do the same thing staying in HTML:


<figure>
<legend>The lower Albegna valley and Isola del Giglio on the horizon.</legend>
    <img src="20050817-0092" alt="" />
</figure>

which seems to be supported by editors such as Bluegriffon, unfortunately that 20050817-0092 is not a full image path, just an id that is later manipulated. With the 2nd approach I can see it while editing because it's a <p>, <img> in this case is rendered as blank.

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
[email protected]
http://tidalwave.it - http://fabriziogiudici.it

--
You received this message because you are subscribed to the Google Groups "The Java 
Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to