[jsr-314-open-mirror] [jsr-314-open] [490-XmlViews] Chapter 11: The JSF XML View Syntax

Ed Burns edward.burns at oracle.com
Tue Oct 26 17:10:23 EDT 2010


>>>>> On Tue, 26 Oct 2010 13:15:18 -0400, Andy Schwartz <andy.schwartz at oracle.com> said:

AS> BTW, regarding Ed's earlier comment:
EB> the most important manifestation of that, in my opinion, is the
EB> requirement to have *all* elements prefixed.  For example, a 
EB> proper JSF
EB> XML Syntax View would look like this.
EB> 
EB> <?xml version="1.0" encoding="UTF-8"?>
EB> <weNeedSomeRootElement
EB> xmlns:html="http://www.w3.org/1999/xhtml"
EB> xmlns:h="http://java.sun.com/jsf/html">


AS> We already have several potential elements/tags that can serve as the 
AS> root level element, including eg:

AS> - <html>
AS> - <h:html>
AS> - <f:view>

Ok, here's what we'll do for JSF XML syntax.

<f:view xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html">
  <html>
    <h:head><h:title>Title</h:title></h:head>
    <h:body>

      <h2>HTML elements ok</h2>

    </h:body>
  </html>
</f:view>

AS> As such I don't believe that we need to add yet another element.

Ok, agreed.  It's <f:view>  If you want to do Facelets XHTML, then you
just put your stuff on the root <html> element.

AS> This got me to thinking though...  I believe that we have a fairly big 
AS> gap in our XML strategy: I don't see any straightforward way to specify  
AS> a doctypte that will be passed through to the browser.  Earlier Dan had 
AS> suggested adding new elements for this purpose:

>> 3) All markup declarations should be produced by the component tree 
>> (e.g., XML declaration, doctype, namespaces, CDATA, XML comments, etc)
>> This means we need the following tags:
>> f:document
>> f:doctype
>> f:comment (why not, it is just xml)
>> f:cdata
>> (The prefix is debatable, I'm just throwing it out there)

AS> We have added an h:html component in 2.1 - but as far as I can see we 
AS> haven't addressed the other items.  I think that we minimally need some 
AS> way to specify the doctype - eg. an h:doctype element since without this 
AS> the documents rendered in our XML processing mode will be doctype-less.

AS> BTW, one thing that I am not totally clear on... What value does 
AS> <h:html> add over plain old <html>?

It's a resource target, in addition to rendering the <html> element.

Yes, I read Dan's initial comments but decided to go with the minimal
set you have seen in the design thus far.  So, I'll not be introducing
<f:doctype> in this revision.  

Ed

-- 
| edward.burns at oracle.com | office: +1 407 458 0017
| homepage:               | http://ridingthecrest.com/
| 11 work days until German Oracle User's Group Conference



More information about the jsr-314-open-mirror mailing list